This release includes breaking changes for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
Affected surfaces
Summary
AI summaryUpdates New contributors, Bug fixes, and Build, CI & dependencies across a mixed release.
Full changelog
This release focuses on cutting redundant write traffic against the Keycloak Admin API: every controller now diffs against the live representation and only PUTs when something actually changed. It also adds a new KeycloakIdentityProviderMapper CRD, fixes a handful of long-standing reconcile bugs (auth-flow execution order on Keycloak 25/26, KeycloakRole composites being silently dropped, firstBrokerLoginFlow deferred-binding crashes, public client secrets), and bumps to controller-runtime v0.24 / Kubernetes v0.36.
Highlights
- Cross-controller drift detection — every reconciler used to call
Update<Resource>on every pass, regardless of whether the CR had drifted from Keycloak's stored state. On larger realms this drove significant write load (a ~120-client realm saw ~100/120 clients "updated" every 5-minute sync because Keycloak returns array/map fields in non-deterministic order and the JSON-string compare always reported drift). A newdefinitionsMatchcomparator handles the three Keycloak-specific quirks — unordered string arrays (redirectUris,webOrigins, …), subset semantics forattributes-style maps, and name-keyed object arrays (protocolMappers) — and is wired intoKeycloakClient,KeycloakRealm,ClusterKeycloakRealm,KeycloakUser,KeycloakRoleMapping,KeycloakIdentityProviderandKeycloakIdentityProviderMapper. In-sync resources logalready in sync, skipping updateatV(1)and issue zero writes. Special-casesconfig.clientSecreton IdPs andsmtpServer.passwordon realms (Keycloak returns**********on GET) so masked fields don't loop forever. (#71, #74, follow-ups — huge thanks to @NerdySoftPaw!) - New
KeycloakIdentityProviderMapperCRD — manage IdP mappers as standalone resources, mirroring theKeycloakProtocolMapperpattern. Each mapper references its parentKeycloakIdentityProviderby name and inherits realm/instance from it. Works around the Keycloak API limitation where mappers embedded in anIdentityProviderRepresentationorKeycloakRealmimport are silently dropped on update. Ships with controller, client CRUD, RBAC, Helm wiring, export support, sample, docs, unit and e2e tests. (#68) - Kubernetes
Secretmaterialised for publicKeycloakClients — public OAuth clients (publicClient: true) have noclient_secret, so previously the operator wrote noSecretat all and every consumer chart had to special-case them. The operator now still creates/updates theSecretfor public clients, emitting only theclient-idkey (honouringClientSecretRefSpec.ClientIdKey). Matches the behaviour of the legacylegacy.k8s.keycloak.orgoperator and lets consumer charts inject the client-id viaenvFrom/secretKeyRefuniformly across public and confidential clients. (#72, thanks again @NerdySoftPaw!) Readycondition on every resource — all CRDs now expose a consistentReadystatus condition, making it straightforward to gate downstream automation on resource readiness. (#69)
Bug fixes
- Auth flow execution order on Keycloak 25/26 — newly added flow executions all default to priority 0 (keycloak/keycloak#35765), so the previous raise-priority bubble-sort silently no-oped and the live order depended on Keycloak's storage order. The controller now sets explicit, monotonically increasing priorities via
PUT(supported since Keycloak 25, keycloak/keycloak#27751) so the live tree matches the spec deterministically. Also drops theobservedGenerationshort-circuit so external drift (admin UI reorders,kcadmscripts, realm re-imports) is repaired on the next reconcile, with two new e2e regressions pinning the behaviour. (#78, fixes #76) KeycloakRolecomposites silently dropped — the role create/update endpoints in the Keycloak Admin API ignore thecompositesfield of aRoleRepresentation, so a role declared withcomposite: trueended up as a plain non-composite role and membership changes were never reconciled. Mirroring the client-scope handling pattern, the operator now stripscompositesfrom the payload and reconciles membership via/roles/{role}/composites(and the client-role variant) by diffing the desired set against what Keycloak returns. (fixes #73)KeycloakRealmcrash on deferredfirstBrokerLoginFlow— referencing a not-yet-createdfirstBrokerLoginFlowmade Keycloak crash on import with an NPE inRealmAdapter.setFirstBrokerLoginFlow, because the field was missing fromrealmFlowBindingFieldsand never deferred. Added to the strip list, covered by unit tests for every documented binding and an e2e regression. (fixes #70)- Realm SMTP password reconcile loop —
smtpSecretReftriggered drift on every reconcile because Keycloak maskssmtpServer.passwordas**********on GET. A dedicatedrealmDefinitionsMatchwrapper strips the password from both sides only when the live state shows the mask, so the firstPUTstill pushes the real value but subsequent reconciles converge cleanly. - Orphan
protocolMappersnot removed — the object-array branch invaluesMatchmatched desired against current by name and subset-compared their fields, but did not check array lengths. Orphan protocol mappers present in Keycloak but absent from the CR therefore failed to surface as drift. Equal-length is now required before the name-match loop so removals reconcile. KeycloakRoleMappinggroup mappings hammered on every reconcile — the reconciler skipped the already-mapped check for groups with a comment claiming noGetGroupRoleMappingsmethods existed; in practice the client hasGetGroupRealmRoleMappingsandGetGroupClientRoleMappings. Extended the check so group mappings stop hittingAdd…on every pass.
Build, CI & dependencies
- Bump
sigs.k8s.io/controller-runtimetov0.24.1andk8s.io/api/k8s.io/apimachinery/k8s.io/client-gotov0.36.1. - Replace the deprecated
scheme.Builderwith a local equivalent inapi/v1beta1to silence the SA1019 staticcheck warning.
Documentation
- Document the
KeycloakRequiredActionCRD. - Document the public-client
Secretmaterialisation behaviour. - De-duplicate the Supported Resources section.
Upgrade Guide
Helm Upgrade
helm upgrade keycloak-operator oci://ghcr.io/hostzero-gmbh/charts/keycloak-operator \
--namespace keycloak-operator \
--version 0.8.0
New contributors
- @NerdySoftPaw made their first contributions in #71 (drift detection across controllers) and #72 (public client secret materialisation).
Full Changelog: https://github.com/Hostzero-GmbH/keycloak-operator/compare/v0.7.0...v0.8.0
What's Changed
- chore(deps): bump sigs.k8s.io/controller-runtime from 0.23.3 to 0.24.0 by @dependabot[bot] in https://github.com/Hostzero-GmbH/keycloak-operator/pull/66
- Add keycloakidentityprovidermapper crd for managing idp mappers by @pehlert in https://github.com/Hostzero-GmbH/keycloak-operator/pull/68
- Add drift-detection across all controllers to skip redundant updates by @NerdySoftPaw in https://github.com/Hostzero-GmbH/keycloak-operator/pull/71
- Materialize Kubernetes Secret with client-id for public KeycloakClients by @NerdySoftPaw in https://github.com/Hostzero-GmbH/keycloak-operator/pull/72
- fix(idp-mapper): skip update when in sync to avoid reconcile storms by @NerdySoftPaw in https://github.com/Hostzero-GmbH/keycloak-operator/pull/74
- Enforce auth flow execution order and detect drift, fixes #76 by @pehlert in https://github.com/Hostzero-GmbH/keycloak-operator/pull/78
- chore(deps): bump k8s.io/apimachinery from 0.36.0 to 0.36.1 by @dependabot[bot] in https://github.com/Hostzero-GmbH/keycloak-operator/pull/82
- chore(deps): bump k8s.io/api from 0.36.0 to 0.36.1 by @dependabot[bot] in https://github.com/Hostzero-GmbH/keycloak-operator/pull/81
- chore(deps): bump sigs.k8s.io/controller-runtime from 0.24.0 to 0.24.1 by @dependabot[bot] in https://github.com/Hostzero-GmbH/keycloak-operator/pull/80
- chore(deps): bump k8s.io/client-go from 0.36.0 to 0.36.1 by @dependabot[bot] in https://github.com/Hostzero-GmbH/keycloak-operator/pull/79
New Contributors
- @NerdySoftPaw made their first contribution in https://github.com/Hostzero-GmbH/keycloak-operator/pull/71
Full Changelog: https://github.com/Hostzero-GmbH/keycloak-operator/compare/v0.7.0...v0.8.0
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
Related tools
Earlier breaking changes
- v0.9.0 Removes `spec.credentials` and `spec.client`; requires migration to new `spec.auth` block.
Beta — feedback welcome: [email protected]