Repository navigation
fix(argo-rollouts): hash only config data in checksum/cm annotation - #4079
Conversation
The annotation hashed the entire rendered ConfigMap, whose metadata.labels include the helm.sh/chart value. That value changes on every chart version bump, so the controller was rolled on every upgrade even when no configuration actually changed. Use the same data-only hashing as argo-cd (argoproj#4044): a pure version bump no longer changes the checksum, while a real data change still rolls the pod. Signed-off-by: Ilia Lazebnik <ilia.lazebnik@gmail.com>
jmeridth
left a comment
There was a problem hiding this comment.
🤖 (summary) Verified port of the #4044 data-only checksum pattern, and verified empirically: with this PR applied, a chart version bump leaves checksum/cm unchanged while a real config change (e.g. adding a trafficRouterPlugins entry) moves it, and createConfigmap=false renders safely. Helper matches the argo-cd original, the controller deployment is the chart's only checksum site, and 2.43.2 is the right patch. One changelog item to align with the #4044 precedent (inline), then this is an approve. Thanks @DrFaust92 for spreading the fix.
Review: ship as kind: changed with the one-time roll disclosed, matching argoproj#4044. Signed-off-by: Ilia Lazebnik <ilia.lazebnik@gmail.com>
jmeridth
left a comment
There was a problem hiding this comment.
🤖 (summary) Suggestion applied verbatim: changelog now carries kind: changed with the one-time-roll disclosure, matching the #4044 precedent. Code was already verified empirically in the prior review (hash stable across a version bump, moves on config change, empty-CM safe). CI green. LGTM, thanks @DrFaust92.
Ports the argo-cd fix from #4044 to argo-rollouts.
checksum/cmhashed the entire rendered ConfigMap, whosemetadata.labelsincludehelm.sh/chart. That value changes on every chart version bump, so the controller was rolled on every upgrade even when no configuration had changed. Theargo-rollouts.config.checksumhelper hashes only thedata/stringDatasections instead.Rendered
2.43.1against a bumped version with the same values: the checksum is unchanged after this PR and differs before it. Changingcontroller.trafficRouterPluginsstill changes it. Upgrading to this version rolls the controller once as the annotation value changes.argo-workflows,argo-eventsandargocd-image-updaterhave the same pattern — happy to follow up with separate PRs.Checklist: