Description
Bug Report
Starting an operator without having the CRDs installed should result in an Exception in initialization that would restart the pod.
What did you do?
You can reproduce the behaviour with the Keycloak nightly on minikube:
kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/nightly/kubernetes/minikube.yml
What did you expect to see?
The operator pod goes in CrashLoopBackoff
What did you see instead? Under which circumstances?
The operator pod goes into the Running state, but the Informers are not going to notify any event for the managed CRDs.
This is especially problematic when applying resources all together in a cluster (e.g. CRDs operators etc. etc.) since the following can happen:
- the operator gets created
- the CRDs are created
- the user creates a CR
- nothing happens since the operator is in "Running" state but the Informers are not in place
Environment
minikube
Quarkus Operator SDK 3.0.6
Possible Solution
Exceptions thrown by the informers should crash the Operator.
cc.: @vmuzikar