简体   繁体   English

在 Keycloak kube.netes helm 图表中设置新的扩展

[英]Set up new extensions in Keycloak kubernetes helm charts

I have a Kube.netes cluster on Azure, where I use Helm to make it easier to manage micro-services and other tools on it, and Keycloak is one of them.我在 Azure 上有一个 Kube.netes 集群,我在其中使用 Helm 来更轻松地管理其上的微服务和其他工具,而 Keycloak 就是其中之一。

I need to use magic link authenticator in one of my apps, I'm aware that I need to add an extension in my Keycloak chart, but I don't know how.我需要在我的一个应用程序中使用魔术链接验证器,我知道我需要在我的 Keycloak 图表中添加一个扩展,但我不知道如何。

In the image repository I'm using, they explain how to add custom themes, via extraInitContainers param on chart configuration.在我使用的图像存储库中,他们解释了如何通过图表配置上的extraInitContainers参数添加自定义主题。 I think I can achieve what I want through it.我想我可以通过它实现我想要的。

In this tutorial they say that's the extension, but I have no idea how to add this to my Keycloak instance on k8s by using helm charts.在本教程中,他们说这是扩展,但我不知道如何使用 helm 图表将它添加到我在 k8s 上的 Keycloak 实例。 How do I achieve that?我如何做到这一点?

Just more info about my config, I'm running louketo-proxy(as a side car) on some apps where I want to protect.关于我的配置的更多信息,我在一些我想要保护的应用程序上运行 louketo-proxy(作为边车)。

To publish a theme with original image, first create an archive with the thema .要发布带有原始图像的主题,首先使用 thema 创建一个存档

Create a file custom-themes-values.yml with a content:创建一个包含以下内容的文件custom-themes-values.yml

extraInitContainers: |
  - name: theme-provider
    image: busybox
    imagePullPolicy: IfNotPresent
    command:
      - sh
    args:
      - -c
      - |
        echo "wgetting theme from maven..."
        wget -O /theme/keycloak-theme.jar  https://repo1.maven.org/maven2/org/acme/keycloak-theme/1.0.0/keycloak-theme-1.0.0.jar
    volumeMounts:
      - name: theme
        mountPath: /theme

extraVolumeMounts: |
  - name: theme
    mountPath: /opt/jboss/keycloak/standalone/deployments

extraVolumes: |
  - name: theme
    emptyDir: {}

Run with:运行:

helm install keycloak codecentric/keycloak --values custom-themes-values.yml

ps: This example the theme was publish into maven repository, but you can copy a local file to. ps:本例主题发布到maven版本库,你也可以拷贝一个本地文件到。

This way you can adapt to magic-link.这样你就可以适应magic-link。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM