Goal
Reconcile the Keycloak realm configuration (Keycloak Admin API state, not
Kubernetes objects) declaratively. Plan: docs/plans/gitops-adoption.md
(section 6.2).
In scope
The realm, the group tree, the group-membership protocol mapper on the coder
client, and the 8 persona users. Today these are created imperatively by
scripts/setup-keycloak-hierarchy.py, and start --import-realm only seeds the
realm on first boot (it skips an existing realm), so nothing is reconciled after
day one.
Recommendation: keycloak-config-cli as an Argo PostSync Job
Options rejected
- Keycloak Operator: the live Keycloak is a plain Deployment, not operator-managed; adopting the Operator means re-platforming the Keycloak instance itself, far larger than the realm-config problem. Its
KeycloakRealmImport is import-shaped, not full reconcile.
- Realm import on boot: only runs on first boot and skips an existing realm, so it cannot reconcile drift or apply post-hoc groups, mappers, or users. That is exactly the current gap.
Generated by Coder Agents.
Goal
Reconcile the Keycloak realm configuration (Keycloak Admin API state, not
Kubernetes objects) declaratively. Plan:
docs/plans/gitops-adoption.md(section 6.2).
In scope
The realm, the group tree, the group-membership protocol mapper on the
coderclient, and the 8 persona users. Today these are created imperatively by
scripts/setup-keycloak-hierarchy.py, andstart --import-realmonly seeds therealm on first boot (it skips an existing realm), so nothing is reconciled after
day one.
Recommendation: keycloak-config-cli as an Argo PostSync Job
scripts/images.txt.scripts/setup-keycloak-hierarchy.pyonce the declarative config reaches parity (verify withscripts/verify-oidc-login.py).Options rejected
KeycloakRealmImportis import-shaped, not full reconcile.Generated by Coder Agents.