You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Drift detection incorrectly detects aggregated ClusterRole/Role rules as drift #1419
When using Kubernetes RBAC aggregation (aggregationRule in ClusterRoles/Roles), helm-controller's drift detection incorrectly identifies the auto-populated rules field as drift and attempts to remove it, causing a reconciliation loop.
Steps to reproduce
Deploy a HelmRelease with drift detection enabled
Include a ClusterRole with aggregationRule but no rules field in the Helm chart:
Kubernetes' clusterrole-aggregation-controller automatically populates the rules field
helm-controller detects drift (rules present in cluster vs. absent in chart manifest)
helm-controller attempts to remove the rules via drift correction
Aggregation controller immediately re-adds them
Loop continues on next reconciliation
Expected behavior
helm-controller should automatically ignore the rules field during drift detection when aggregationRule is present, similar to how kustomize-controller handles this (see fluxcd/kustomize-controller#1041).
Actual behavior
Continuous drift detection and correction attempts, causing unnecessary reconciliation loops and events.
The normalization skip for ClusterRole/Role already exists in fluxcd/pkg/ssa/normalize but only prevents setting rules: null during normalization, not during drift detection comparison
Root cause: Kubernetes API design where the rules field lacks omitempty despite being optional when aggregationRule is used
Activity
matheuscscp commentedon Feb 25, 2026
On which flux version did you observe that, please?
markussiebert commentedon Feb 25, 2026
we are running 2.7.3
matheuscscp commentedon Feb 25, 2026
What Kubernetes version? I tried to reproduce this with Flux 2.7.3 and was not successful
markussiebert commentedon Feb 25, 2026
we are running eks 1.32 - thank you for looking into this
matheuscscp commentedon Feb 26, 2026
I tried but was not successful in reproducing this with Flux 2.7.3 and EKS 1.32...