* What provision *
The operator will be watching for shared service slices custom resources when it sees one it should do the following
- if the spec. type ServiceType is keycloak it should set the a finaliser and set its state to accepted - It should find a keycloak that has capacity in its ```Status.SharedConfig``` - It should increment the number of currentSlices - It should set the name of the keycloak resource in the SharedServiceSlice {code}Status.ServiceResource{code} - it should add a Realm to the keycloak definition and set the {code}status.Phase{code} to modified - Once the KeyCloak Resource is set to complete, the SharedServiceSlice should also be set to complete and a user friendly message set on the status
*Deprovision*
When a SharedServiceSlice is set to deleted we should do something close to the following:
- check if the Spec.ServiceType is keycloak - find the keycloak resource providing the slice by looking up the {code}Status.ServiceResource{code} - remove the realm definition based on the name of the realm (provided in the Params of the SharedServiceSlice resource) - mark the keycloak resource in the {code}status.Phase{code} as modified - When the keycloak resource is marked as complete or failed update the SharedServiceSlice accordingly - If the keycloak resource is marked as complete then we should remove our finalizer - if it is marked as failed we should keep checking it during the sharedserviceslice reconciliation loop |
|