问题描述
我使用操作员(版本12.0.1)安装了Keycloak..它使用的资料库 github资料库一切都可以无缝运行.密钥斗篷实例已启动,我可以使用管理员凭据登录.我可以看到某个领域,客户,用户等按预期工作.
I installed Keycloak using Operator (version 12.0.1). It's using the repository github repository Everything worked seamlessly. A keycloak instance has been launched and I could log in using admin credentials. I could see a realm, clients, users, etc working as expected.
但是我确实有一个想要使用的自定义主题.为此,我在 my-realm.yaml 中进行了以下更改.
But I do have a custom theme that I want to use it. For that, I make the following changes in my-realm.yaml.
apiVersion: keycloak.org/v1alpha1
kind: Keycloak
metadata:
name: my-keycloak
labels:
app: my-keycloak
spec:
instances: 1
extensions:
- https://github.com/aerogear/keycloak-metrics-spi/releases/download/1.0.4/keycloak-metrics-spi-1.0.4.jar
externalAccess:
enabled: False
podDisruptionBudget:
enabled: True
---
apiVersion: keycloak.org/v1alpha1
kind: KeycloakRealm
metadata:
name: my-realm
labels:
app: my-realm
spec:
realm:
id: "my"
realm: "my"
enabled: True
registrationEmailAsUsername: True
accountTheme: "account-theme" // THEMES
adminTheme: "admin-theme" // THEMES
emailTheme: "email-theme" // THEMES
loginTheme: "login-theme" // THEMES
users:
- username: "[email protected]"
firstName: "Service"
lastName: "Account"
instanceSelector:
matchLabels:
app: my-keycloak
但是,我在我的领域/my-realm/主题设置中没有看到任何主题.我只能在选择框中看到默认主题(例如,密钥斗篷,基本).我期望在各自的选择中分别使用 account-theme
, admin-theme
, email-theme
, login-theme
盒.
But, I didn't see any of the themes in my realms/my-realm/theme-settings. I can see only the default theme in the select box (i.e. keycloak, base). I am expecting account-theme
, admin-theme
, email-theme
, login-theme
in their respective select boxes.
我在这里想念东西吗?
推荐答案
问题是/是那样的-直到昨天 2021年1月,提交f2d0370290d6abe91724b2536748aa6b1245d1e1(拉请求#284 )-默认情况下Keycloak操作员无法识别与主题相关的字段(即 accountTheme
, adminTheme
, emailTheme
, loginTheme
).
The problem is/was that -- until yesterday the 26th of January of 2021, commit f2d0370290d6abe91724b2536748aa6b1245d1e1 (pull request #284) -- by default the Keycloak Operator did not recognize the Theme-related fields (i.e., accountTheme
, adminTheme
, emailTheme
, loginTheme
).
此功能尚未在当前的最新版本(12.0.2)中部署,但是它是master可用的.所以你可以从那里去.
This feature was not deployed on the current latest release (12.0.2), however it is available of master. So you can go from there.
这篇关于如何在Kubernetes上的Keycloak Operator部署中使用自定义主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!