-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oscillating reconciles for aggregated clusterroles #1041
Comments
As a workaround, you can add the following annotation for Flux to stop reconciling the cluster roles I suspect this change fluxcd/pkg#658 is the root cause, the change @hiddeco made to SSA is to normalize all objects, and I guess that the Can you please post here the output of |
|
Ok thanks for posting, we'll need to decide how to fix this, we can either skip normalisation for ClusterRoles but it may be that we have broken many other Kubernetes native kinds with optional fields that aren't marked as such with @erikgb for now please add the |
Thanks @stefanprodan. I was a bit surprised to see that the rules field in |
Given that the |
After upgrading Flux from version 2.1.2 to 2.2.1 (kustomize-controller from version 1.1.1 to 1.2.1), we observe oscillating reconciles for all our aggregated clusterroles. I asked on Slack about this but haven't gotten anything back yet.
This happens for all our aggregated clusterroles originating from Kyverno and Crossplane Helm chart. Note: even if the resource examples indicate that we are using Helm, this is untrue. We inflate all Helm charts into YAML manifests using kustomize (CLI) and use a Flux Kustomization to provision. I will use one of the Kyverno aggregated clusterroles as an example, but the symptom is the same for all aggregated clusterroles in our Flux installation.
Expected behavior (Flux 2.1.2): When Flux reconciles a Kustomization containing an aggregated clusterrole (without any rules in source), the SSA should be a no-op and don't create any update event.
Actualt behavior (Flux 2.2.1): When Flux reconciles a Kustomization containing an aggregated clusterrole (without any rules in source), it seems like the SSA performed by Flux is resetting the rules field creating an update event for each aggregated clusterrole. The rules field is immediately populated by the aggregated clusterrole controller. So the next time Flux performs a reconcile, this happens again....
Example clusterrole in source:
Resulting clusterrole in one of our clusters (note the timestamps on the managed fields)
The text was updated successfully, but these errors were encountered: