This release includes 1 breaking change for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
Affected surfaces
Summary
AI summaryBroad release touches New Features, Upgrade Guide, clientIdKey: client-id, and Breaking Changes.
Full changelog
Release Notes - v0.4.0
Highlights
This release introduces support for pre-existing Kubernetes Secrets in KeycloakClient resources, enabling seamless integration with GitOps workflows using Sealed Secrets, External Secrets, Vault, or other secret management tools. The Helm chart CRD management has also been improved to auto-sync from generated sources while preserving all templating features.
New Features
Pre-existing Secret Support (clientSecretRef)
KeycloakClient resources can now reference existing Kubernetes Secrets for client credentials instead of requiring the operator to auto-generate them.
apiVersion: keycloak.hostzero.com/v1beta1
kind: KeycloakClient
metadata:
name: my-app
spec:
realmRef:
name: my-realm
definition:
clientId: my-app
publicClient: false
clientSecretRef:
name: my-app-credentials # Secret name (required)
clientIdKey: client-id # Optional, default: "client-id"
clientSecretKey: client-secret # Optional, default: "client-secret"
create: true # Optional, default: true
Behavior modes:
| Mode | create | Description |
|------|----------|-------------|
| Auto-generate | true (default) | If the secret doesn't exist, operator lets Keycloak generate a secret and creates the Kubernetes Secret |
| Strict/GitOps | false | Operator expects the secret to already exist and uses its value to configure Keycloak. Errors if missing |
Use Cases:
- Auto-generate secrets (default): Operator manages the full secret lifecycle
- Sealed Secrets: Create sealed secret, operator reads and uses the value
- External Secrets: External Secrets Operator provisions the secret, this operator consumes it
- Custom key names: Configure key names to match your application's environment variable expectations
Example with Sealed Secrets:
# 1. Create your SealedSecret (decrypts to my-app-secret)
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
name: my-app-secret
spec:
encryptedData:
client-id: AgBy8h...
client-secret: AgCtr...
---
# 2. Reference it with create: false
apiVersion: keycloak.hostzero.com/v1beta1
kind: KeycloakClient
metadata:
name: my-app
spec:
realmRef:
name: my-realm
definition:
clientId: my-app
publicClient: false
clientSecretRef:
name: my-app-secret
create: false # Strict mode - error if secret doesn't exist
See the KeycloakClient Documentation for full details.
Improvements
Helm Chart
- Auto-synced CRDs: Generated CRDs are now automatically synced to the Helm chart while preserving all templating features (
crds.install,crds.keep, standard labels) - Single source of truth: CRDs stored in
files/crds/with a single template that renders all of them conditionally
Export Command
- Confidential client detection: Export now automatically adds
clientSecretReffor confidential clients (non-public, non-bearer-only) - Exported clients include the appropriate secret reference structure ready for use
Developer Experience
- Simplified CRD sync:
make manifestsnow automatically copies CRDs to the Helm chart - No manual synchronization required when adding new CRDs
Breaking Changes
clientSecret renamed to clientSecretRef
The field structure has changed to support the new functionality:
# Before (v0.3.x)
spec:
clientSecret:
secretName: my-secret
key: client-secret
# After (v0.4.0)
spec:
clientSecretRef:
name: my-secret
clientSecretKey: client-secret
# New optional fields:
# clientIdKey: client-id
# create: true
Migration steps:
- Rename
clientSecrettoclientSecretRef - Rename
secretNametoname - Rename
keytoclientSecretKey(or remove if using defaultclient-secret) - Optionally add
create: falsefor strict GitOps mode
Bug Fixes
None.
Upgrade Guide
Helm Upgrade
helm upgrade keycloak-operator oci://ghcr.io/hostzero-gmbh/charts/keycloak-operator \
--namespace keycloak-operator \
--version 0.4.0
Manifest Migration
Update any KeycloakClient resources using the old clientSecret field:
# Find affected resources
kubectl get keycloakclients -A -o yaml | grep -l "clientSecret:"
# Update each resource with the new field structure
kubectl edit keycloakclient <name> -n <namespace>
What's Changed
- feat: support pre-existing Kubernetes Secrets for client credentials (#12)
Full Changelog: v0.3.0...v0.4.0
What's Changed
- chore(deps): bump sigs.k8s.io/controller-runtime from 0.23.0 to 0.23.1 by @dependabot[bot] in https://github.com/Hostzero-GmbH/keycloak-operator/pull/14
Full Changelog: https://github.com/Hostzero-GmbH/keycloak-operator/compare/v0.3.0...v0.4.0
Breaking Changes
- `clientSecret` renamed to `clientSecretRef`; fields `secretName` → `name`, `key` → `clientSecretKey`. Migration required for existing KeycloakClient resources.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About Hostzero-GmbH/keycloak-operator
All releases →Related context
Earlier breaking changes
- v0.9.0 Removes `spec.credentials` and `spec.client`; requires migration to new `spec.auth` block.
Beta — feedback welcome: [email protected]