I was installing Keycloak using Operator (version 13.0.0). The updated code has theme related stuff github repository and supports custom theme integration quite well. All we need an URL where the custom theme
is located. I tried it and worked flawlessly.
However, what if we have themes in some local directory, not on some public URL. How do we suppose to upload the theme
in the Keycloak then?
I've tried using the File URL and file paths as well but didn't work for me.
The Keycloak.yaml
apiVersion: keycloak.org/v1alpha1
kind: Keycloak
metadata:
name: keycloak-test
labels:
app: keycloak-test
spec:
instances: 1
extensions:
- https://SOME-PUBLIC-URL/keycloak-themes.jar
externalAccess:
enabled: False
podDisruptionBudget:
enabled: True
We can add custom keycloak themes in keycloak operator (v13.0.0) using the below steps:
kubectl create cm customtheme --from-file customtheme.jar
Keycloak.yaml
and add the following code block keycloakDeploymentSpec:
experimental:
volumes:
defaultMode: 0777
items:
- name: customtheme
mountPath: /opt/jboss/keycloak/standalone/deployments/custom-themes
subPath: customtheme.jar
configMaps:
- customtheme
Note: Make sure the size of theme is less than 1MB.