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

Keycloak issue with enableDefaultInitContainers #30686

Open
anebi opened this issue Nov 29, 2024 · 1 comment
Open

Keycloak issue with enableDefaultInitContainers #30686

anebi opened this issue Nov 29, 2024 · 1 comment
Assignees
Labels
keycloak tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@anebi
Copy link
Contributor

anebi commented Nov 29, 2024

Name and Version

bitnami/keycloak 24.1.0

What architecture are you using?

None

What steps will reproduce the bug?

Set enableDefaultInitContainers to true

What is the expected behavior?

When enableDefaultInitContainers is enabled, in the final container we want to see

  • /opt/bitnami/keycloak/providers
  • /opt/bitnami/keycloak/data

What do you see instead?

When enableDefaultInitContainers is enabled In final container we see

  • /opt/bitnami/keycloak/providers/providers
  • /opt/bitnami/keycloak/data/data

Additional information

Once the final keycloak container gets running check dirs:

  • /opt/bitnami/keycloak/providers
  • /opt/bitnami/keycloak/data

In those directories you will notice that there are subdirectories like this:

  • /opt/bitnami/keycloak/providers/providers
  • /opt/bitnami/keycloak/data/data

This is caused by

              info "Copying writable dirs to empty dir"
              # In order to not break the application functionality we need to make some
              # directories writable, so we need to copy it to an empty dir volume
              cp -r --preserve=mode /opt/bitnami/keycloak/data /emptydir/app-data-dir
              cp -r --preserve=mode /opt/bitnami/keycloak/providers /emptydir/app-providers-dir

Doing a copy like this doesn't copy the directory content but instead, it copies the complete data and providers directories to /emptydir/app-data-dir and /emptydir/app-providers-dir. As a result, we get the problem:

  • /opt/bitnami/keycloak/providers/providers
  • /opt/bitnami/keycloak/data/data

In the final container the mount is like this:

            - name: empty-dir
              mountPath: /opt/bitnami/keycloak/data
              subPath: app-data-dir
            - name: empty-dir
              mountPath: /opt/bitnami/keycloak/providers
              subPath: app-providers-dir

This mounts the app-data-dir to /opt/bitnami/keycloak/data, but app-data-dir has also data/ subdirectory. The same is for providers

@anebi anebi added the tech-issues The user has a technical issue about an application label Nov 29, 2024
@github-actions github-actions bot added the triage Triage is needed label Nov 29, 2024
@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keycloak tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants