[keycloak] Enable injecting themes by lllamnyp · Pull Request #2142 · cozystack/cozystack

gemini-code-assist[bot]

coderabbitai[bot]

sircthulhu

@lllamnyp @kvaps

This patch lets Cozystack admins specify initContainers that will run
`cp -r /themes/ /opt/keycloak/themes/` on startup, effectively providing
an interface for operators to inject custom themes into the keycloak
deployment to customize the UI.

```release-note
[keycloak] Enable injection of user-provided themes for Keycloak via
initContainers.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>

@lexfrei

Add securityContext to theme init containers matching the main
container security posture. Add input validation for theme entries:
required fields, DNS-1123 name sanitization, duplicate detection,
and container name length limit. Add imagePullSecrets support for
private registries and sizeLimit on the emptyDir volume.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>

@dosubot dosubot bot added size:M

This PR changes 30-99 lines, ignoring generated files.

and removed size:S

This PR changes 10-29 lines, ignoring generated files.

labels

Mar 30, 2026

lexfrei added a commit to cozystack/website that referenced this pull request

Mar 30, 2026
Document the theme injection feature: theme image contract,
configuration via Package resource, imagePullSecrets for private
registries, and theme activation in Keycloak admin console.

Companion to cozystack/cozystack#2142.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>

sircthulhu

@dosubot dosubot bot added the lgtm

This PR has been approved by a maintainer

label

Mar 30, 2026

@kvaps kvaps deleted the feat/keycloak-themes branch

March 30, 2026 18:16

kvaps added a commit to cozystack/website that referenced this pull request

Mar 31, 2026
## What this PR does

Adds documentation for custom Keycloak theme injection to the White
Labeling guide.

New sections cover:
- Theme image contract (`/themes/` directory structure)
- Configuration via `cozystack.keycloak` Package resource
- `imagePullSecrets` for private registries
- Theme activation in Keycloak admin console

### Companion PR

Implementation: cozystack/cozystack#2142

### Release note

```release-note
[docs] Add custom Keycloak themes documentation to White Labeling guide
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Added comprehensive guide for custom Keycloak themes, covering
container image directory structure, Package configuration, private
registry support, and admin console activation steps.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->