Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitnami/Keycloak Custom Themes #24302

Closed
ITS1988 opened this issue Mar 8, 2024 · 6 comments
Closed

Bitnami/Keycloak Custom Themes #24302

ITS1988 opened this issue Mar 8, 2024 · 6 comments
Labels
keycloak solved stale 15 days without activity tech-issues The user has a technical issue about an application

Comments

@ITS1988
Copy link

ITS1988 commented Mar 8, 2024

Name and Version

bitnami/keycloak 19.2.0

What architecture are you using?

amd64

What steps will reproduce the bug?

Hi,

We deploy Keycloak via the Helm charts bitnami/keycloak.

We would like to upload and use a custom theme for the login page, as well as for the different realms.
What we have done so far is to create a pv.yaml file and a pvc.yaml and include it via extraVolumes and extraVolumeMounts with the folder /opt/bitnami/keycloak/themes.

We can see the custom themes folder in the container from the filesystem, but unfortunately, we cannot see the themes under "Themes" in the web interface.

Are we doing something wrong? Is it possible to use custom themes with the bitnami/keycloak chart?

Thank you in advance!

Regards,
Ilias

Are you using any custom parameters or values?

extraVolumes:
  - name: keycloak-themes-volume
    persistentVolumeClaim:
      claimName: keycloak-themes-pvc
## @param extraVolumeMounts Optionally specify extra list of additional volumeMounts for Keycloak container(s)
##
extraVolumeMounts:
  - name: keycloak-themes-volume
    mountPath: /opt/bitnami/keycloak/themes/

What do you see instead?

I didn't get an error but I can not see the themes under "Themes"

@ITS1988 ITS1988 added the tech-issues The user has a technical issue about an application label Mar 8, 2024
@github-actions github-actions bot added the triage Triage is needed label Mar 8, 2024
@github-actions github-actions bot removed the triage Triage is needed label Mar 9, 2024
@github-actions github-actions bot assigned andresbono and unassigned carrodher Mar 9, 2024
@ITS1988
Copy link
Author

ITS1988 commented Mar 22, 2024

Hi,

any news for this?

@andresbono
Copy link
Contributor

Hi, it looks like your approach is correct, according to https://github.com/bitnami/containers/tree/main/bitnami/keycloak#adding-custom-themes, right? Did you check the Keycloak docs regarding themes? Are you missing any steps?

Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Apr 17, 2024
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
@casix
Copy link

casix commented Oct 17, 2024

I have the same problem, how did you solve it?

We have a theme that is working with the chart version 18.5.0.
We copy the jar file into the /opt/bitnami/keycloak/providers with an init container and a initdbScripts:

extraVolumes: 
  - name: theme
    emptyDir: {}
extraVolumeMounts: 
  - name: theme
    mountPath: /opt/themes_temp    
initContainers:
  - name: theme-provider
    image: XXXXXXXXXXXXXXXXXXXXX/keycloak/theme:v0.x.x
    imagePullPolicy: Always
    volumeMounts:
      - name: theme
        mountPath: /deployments

initdbScripts:
  my_init_script.sh: |
    #!/bin/bash
    cp /opt/themes_temp/newtheme.jar /opt/bitnami/keycloak/providers/

After upgrading to chart version 24.0.0, it fails because we get an error due to the filesystem being read-only.

We tried to mount it in the /opt/bitnami/keycloak/themes/newtheme folder (as the docs suggest):

extraVolumes:
  - name: theme
    emptyDir: {}

extraVolumeMounts: 
  - name: theme
    mountPath: /opt/bitnami/keycloak/providers/myautomatictv/

initContainers:
  - name: theme-provider
    image: XXXXXXXXXXXXXXXXXXXXXXXXXXXX/keycloak/theme:0.X.X
    imagePullPolicy: Always
    volumeMounts:
      - name: theme
        mountPath: /deployments

The folder and the jar theme file are present:

$ find 
.
./README.md
./newtheme
./newtheme/newtheme.jar

but the theme does not appear in the realm setting -> theme tab.

At keycloak startup there are no line logs entries indicating anything about the theme.

Any idea how can I fix this?

Thank you!!

@MugenTwo
Copy link

MugenTwo commented Jan 19, 2025

Hi! I was able to make this work by putting the following in the values.yaml file:

I have the following directory in my physical node: /root/keycloak/themes/custom-theme

extraEnvVars:
  - name: KEYCLOAK_EXTRA_ARGS
    value: "--import-realm"

extraVolumes: |
  - name: realm-import
    configMap:
      name: keycloak-realm-config
  - name: keycloak-theme-host-volume
    hostPath:
      path: /root/keycloak/themes
      type: Directory

extraVolumeMounts: |
  - name: realm-import
    mountPath: /opt/bitnami/keycloak/data/import
  - name: keycloak-theme-host-volume
    mountPath: /opt/bitnami/keycloak/themes

The realm's config.json had the realm in the client:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keycloak solved stale 15 days without activity tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

6 participants