fix(k8s): declare every theme type in big-demo so the account console loads (refs #177)
CI / lint (pull_request) Successful in 2m0s
CI / k8s (pull_request) Successful in 9s
CI / build (pull_request) Successful in 1m22s
CI / unit (pull_request) Successful in 1m34s
CI / verify-stack (pull_request) Canceled after 0s
CI / frontend (pull_request) Canceled after 3m8s
CI / mutation (pull_request) Canceled after 8m10s

KC_SPI_THEME_DEFAULT applies to all theme types and Keycloak does not fall back
for one the theme lacks: the account console returned 500 (NPE on a null
theme). The theme is now one ConfigMap mounted as a directory with login,
account, admin and email types; the podspec gains `items` for that.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
not
2026-09-25 12:02:46 +02:00
co-authored by Claude Opus 5.5
parent 1cc04de630
commit 6cd2268be9
4 changed files with 26 additions and 14 deletions
@@ -94,6 +94,10 @@ volumes:
{{- with .defaultMode }} {{- with .defaultMode }}
defaultMode: {{ . }} defaultMode: {{ . }}
{{- end }} {{- end }}
{{- with .items }}
items:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }} {{- end }}
{{- with $w.data }} {{- with $w.data }}
- name: data - name: data
@@ -30,8 +30,8 @@ spec:
annotations: annotations:
checksum/portal-config: {{ include "big.keycloakUrl" $ | sha256sum }} checksum/portal-config: {{ include "big.keycloakUrl" $ | sha256sum }}
{{- end }} {{- end }}
{{- /* subPath mounts never refresh, so Keycloak restarts when the toggle flips. */}} {{- /* Keycloak reads the theme at startup, so it restarts when the toggle flips. */}}
{{- if eq .configMap "kc-theme-js" }} {{- if eq .configMap "kc-theme" }}
annotations: annotations:
checksum/otp-autofill: {{ $.Values.demo.otpAutofill | toString | sha256sum }} checksum/otp-autofill: {{ $.Values.demo.otpAutofill | toString | sha256sum }}
{{- end }} {{- end }}
@@ -1,9 +1,13 @@
{{- /* {{- /*
Keycloak login theme `big-demo`: keycloak.v2 plus one script. It is always Keycloak theme `big-demo`: keycloak.v2 plus one login script. It is always
mounted and always the default theme (KC_SPI_THEME_DEFAULT), so the only thing mounted and always the default theme (KC_SPI_THEME_DEFAULT), so the only thing
`demo.otpAutofill` switches is what that script does. Off, it is empty and the `demo.otpAutofill` switches is what that script does. Off, it is empty and the
login is exactly keycloak.v2. login is exactly keycloak.v2.
KC_SPI_THEME_DEFAULT covers every theme type, and Keycloak does not fall back
for a type the theme lacks (the account console 500s), so account, admin and
email are declared too, each a plain child of Keycloak 26's own default.
On, the medewerker OTP step computes the code from the realm fixture secret On, the medewerker OTP step computes the code from the realm fixture secret
(docs/runbooks/keycloak.md) and submits it: the demo still shows MFA being (docs/runbooks/keycloak.md) and submits it: the demo still shows MFA being
enforced without anyone needing an authenticator. The secret is committed and enforced without anyone needing an authenticator. The secret is committed and
@@ -17,18 +21,16 @@ metadata:
labels: labels:
{{- include "big.labels" (dict "root" $ "name" "kc-theme") | nindent 4 }} {{- include "big.labels" (dict "root" $ "name" "kc-theme") | nindent 4 }}
data: data:
theme.properties: | login.properties: |
parent=keycloak.v2 parent=keycloak.v2
import=common/keycloak import=common/keycloak
scripts=js/otp-autofill.js scripts=js/otp-autofill.js
--- account.properties: |
apiVersion: v1 parent=keycloak.v3
kind: ConfigMap admin.properties: |
metadata: parent=keycloak.v2
name: kc-theme-js email.properties: |
labels: parent=keycloak
{{- include "big.labels" (dict "root" $ "name" "kc-theme-js") | nindent 4 }}
data:
otp-autofill.js: | otp-autofill.js: |
{{- if .Values.demo.otpAutofill }} {{- if .Values.demo.otpAutofill }}
// RFC 6238 with Keycloak's default policy (HmacSHA1, 6 digits, 30 s) over the // RFC 6238 with Keycloak's default policy (HmacSHA1, 6 digits, 30 s) over the
+8 -2
View File
@@ -289,8 +289,14 @@ workloads:
probe: { tcpSocket: { port: 8080 }, initialDelaySeconds: 15 } probe: { tcpSocket: { port: 8080 }, initialDelaySeconds: 15 }
files: files:
- { configMap: rr-kc-realms, mountPath: /opt/keycloak/data/import } - { configMap: rr-kc-realms, mountPath: /opt/keycloak/data/import }
- { configMap: kc-theme, mountPath: /opt/keycloak/themes/big-demo/login/theme.properties, subPath: theme.properties } - configMap: kc-theme
- { configMap: kc-theme-js, mountPath: /opt/keycloak/themes/big-demo/login/resources/js/otp-autofill.js, subPath: otp-autofill.js } mountPath: /opt/keycloak/themes/big-demo
items:
- { key: login.properties, path: login/theme.properties }
- { key: otp-autofill.js, path: login/resources/js/otp-autofill.js }
- { key: account.properties, path: account/theme.properties }
- { key: admin.properties, path: admin/theme.properties }
- { key: email.properties, path: email/theme.properties }
# ── Flowable (S-03) ───────────────────────────────────────────────────────── # ── Flowable (S-03) ─────────────────────────────────────────────────────────
flowable-db: flowable-db: