the resource will need to reference the keycloak resource name that represent the keycloak it want to create the realm in. For shared services this will be handled by the broker *Creation*
The KeycloakRealm resource will specify a realm name and a keycloak id. It may become more advanced in the future but for now this is enough to get started.
- When the operator sees this resource it should mark its status as accepted - It should look up the keycloak resource referenced by the keycloak id and if it exists set it as the owner reference https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ - It should set the finalizer as org.aerogear.keycloakoperator - it should authenticate using the credentials in the secret referenced by the keycloak resource - it should create the realm and mark the KeycloakRealm resource as complete
*Deletion*
When the resource is deleted, we should delete the realm in the keycloak referenced and then remove the finalizer reference |
|