Skip to content

docs(keycloak): add custom themes documentation#463

Merged
kvaps merged 1 commit intomainfrom
docs/keycloak-themes
Mar 31, 2026
Merged

docs(keycloak): add custom themes documentation#463
kvaps merged 1 commit intomainfrom
docs/keycloak-themes

Conversation

@lexfrei
Copy link
Copy Markdown
Contributor

@lexfrei lexfrei commented Mar 30, 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

[docs] Add custom Keycloak themes documentation to White Labeling guide

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.

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>
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 30, 2026

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit a19dc58
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/69ca82a3f862890008ef569b
😎 Deploy Preview https://deploy-preview-463--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

📝 Walkthrough

Walkthrough

Documentation enhanced with comprehensive guidance on implementing custom Keycloak themes, including container image directory structure requirements, configuration setup through the Keycloak Package, and step-by-step activation procedures in the Keycloak admin console.

Changes

Cohort / File(s) Summary
Custom Keycloak Themes Documentation
content/en/docs/v1/operations/configuration/white-labeling.md
Added new "Custom Keycloak Themes" section detailing theme image directory contract, init container deployment mechanism, configuration via spec.components.keycloak.values.themes, imagePullSecrets setup for private registries, and console activation instructions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Themes now bloom in Keycloak's garden fair,
Custom colors dancing through the air,
From container images, themes take flight,
Admin console makes the realm just right!
Documentation guides us through the way,

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs(keycloak): add custom themes documentation' is fully related to the main change—adding documentation for custom Keycloak themes to the white-labeling guide.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/keycloak-themes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the white-labeling documentation to include a comprehensive guide on implementing custom Keycloak themes via container images. It details the required directory structure, configuration within the cozystack.keycloak Package, and the steps for activation in the admin console. Feedback was provided to improve the clarity of the private registry configuration by providing a complete YAML manifest instead of a partial snippet.

Comment on lines +207 to +213
keycloak:
values:
themes:
- name: my-brand
image: private-registry.example.com/my-keycloak-theme:v1.0
imagePullSecrets:
- name: my-registry-secret
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This YAML snippet is incomplete and could be misleading as it shows keycloak as a top-level key. To improve clarity and maintain consistency with the previous example, consider providing the full Package manifest.

Suggested change
keycloak:
values:
themes:
- name: my-brand
image: private-registry.example.com/my-keycloak-theme:v1.0
imagePullSecrets:
- name: my-registry-secret
apiVersion: cozystack.io/v1alpha1
kind: Package
metadata:
name: cozystack.keycloak
namespace: cozy-system
spec:
variant: default
components:
keycloak:
values:
themes:
- name: my-brand
image: private-registry.example.com/my-keycloak-theme:v1.0
imagePullSecrets:
- name: my-registry-secret

@lexfrei lexfrei marked this pull request as ready for review March 30, 2026 14:13
@lexfrei lexfrei requested review from kvaps and lllamnyp as code owners March 30, 2026 14:13
@lexfrei lexfrei self-assigned this Mar 30, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
content/en/docs/v1/operations/configuration/white-labeling.md (1)

178-178: Clarify why the namespaces differ to prevent operator confusion.

The example sets the Package in cozy-system (Line 178), but the note requires the pull secret in cozy-keycloak (Line 216). Add one short sentence explaining this is expected because Keycloak pods run in cozy-keycloak.

✏️ Suggested doc tweak
-The referenced Secret must exist in the `cozy-keycloak` namespace.
+The referenced Secret must exist in the `cozy-keycloak` namespace.
+This differs from the `Package` resource namespace (`cozy-system`) because the Keycloak workload pulls images from the `cozy-keycloak` namespace.

Also applies to: 216-216

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@content/en/docs/v1/operations/configuration/white-labeling.md` at line 178,
The docs show the Package resource in the cozy-system namespace but require the
pull secret in cozy-keycloak; add one short clarifying sentence after the
Package example stating that this is intentional because Keycloak pods run in
the cozy-keycloak namespace so the pull secret must be created there
(referencing the Package example and the cozy-keycloak namespace by name).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@content/en/docs/v1/operations/configuration/white-labeling.md`:
- Line 178: The docs show the Package resource in the cozy-system namespace but
require the pull secret in cozy-keycloak; add one short clarifying sentence
after the Package example stating that this is intentional because Keycloak pods
run in the cozy-keycloak namespace so the pull secret must be created there
(referencing the Package example and the cozy-keycloak namespace by name).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 444f680a-ca97-4baf-9b1b-7eb214ac224d

📥 Commits

Reviewing files that changed from the base of the PR and between 15d1429 and a19dc58.

📒 Files selected for processing (1)
  • content/en/docs/v1/operations/configuration/white-labeling.md

@kvaps kvaps merged commit 88bfea8 into main Mar 31, 2026
6 checks passed
@kvaps kvaps deleted the docs/keycloak-themes branch March 31, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants