Closed rlcundiff closed 4 years ago
@rlcundiff: I had spoken to the Appsody folks about this and they've had similar challenges with their operator in the past. Other controllers in Kubernetes may have a watch on some of the resources that our operator creates. That can end up in a loop where the operator and the other controller are thrashing, having different opinions on the "correct" state of the resource and that can lead to it being constantly updated.
ServiceAccount for instance has a list of pull secrets. Some additional ones might be getting injected that the operator is throwing out. We should check that we're playing fairly here and in the other places where updates are being triggered without changes to the CR.
This issue is caused by ServiceAccount kappnav-sa
It always modifies imagePullSecrets
by setting it to sa-kappnav
But OpenShift will inject its own secret (required for internal registry)
The data should be merged with a cluster not overwritten.
This creates infinite reconcile loop.
Exact lines to fix are here
With the fixes, I don't see repeatedly ServiceAccount on "kappnav-sa" and Service on "kappnav-ui-service" reconciled updated messages. I can also update kappnav CR (i.e.logging info) via console successfully.
Kubernetes is continually driving the kappnav operator which is continually updating the kappnav CR. This prevents editing the kappnav CR via the console. Note that updating via 'kubectl apply` works ok.
The operator log has this sequence repeatedly. The same four objects are always
Status: updated
.