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
detect/report drift: compare desired with actual state #508
Compare deployed helm release with actual live/runtime manifests, and report changes (drift).
This is a missing feature at the moment (v3.8.1), helm-diff only works with releases/revisions.
I guess this task would require fetching actual manifest referenced by helm release/revision and compare desired with actual state, and helm-diff is very close to supporting this.
Reacted by Itai Spiegel, Kyle Kizirian, Gustavo Passini and Jack Henschel
@gustavobini , no. upgrade --dry-run shows all manifests in their TO-BE state. Proposed feature is about comparing AS-IS state with desired helm revision, and showing only DIFF.
Also note that helm upgrade needs local helm chart workspace. helm diff release/revision (which is the target of this proposal) does not need one, it works with k8s cluster only.
helm install my-release .
# manual edit some resource deployed by my-release
kubectl edit ...
# compare actual runtime manifests with revision 1 of my-release; i.e. show changes I made in previous kubectl-edit
helm diff revision my-release 1 runtime
runtime may be a keyword here; since revisions are integers, this keyword would tell helm-diff to take manifests from actual runtime, not from any specific revision.
Reacted by Gustavo Bini, Martin Morset, Dmitry Volodin and Or Cohen
Just looked into it and I think this is solved by using the --three-way-merge flag. At first I didn't understand the meaning of this flag, but then I found this documentation.
Just looked into it and I think this is solved by using the --three-way-merge flag. At first I didn't understand the meaning of this flag, but then I found this documentation.
--three-way-merge looks promising, but helm-diff-upgrade is missing --force
+1, if helm diff with--three-way-merge behaves like helm's three way merge algorithm, I don't think it will fully surface all manual changes that have been made.
E.g. if the live manifest has replicas: 3 and the Helm release specifies replicas: 1, helm diff upgrade --three-way-merge should report the full diff:
- replicas: 1
+ replicas: 3
However the docs for helm's three way merge give this example:
I would only expect helm diff upgrade --three-way-merge to report the diff as:
- image: nginx:2.0.0
+ image: nginx:2.1.0
Assuming this is the case (please correct me if not!), it would be great to have an option that shows the full changes that helm upgrade --force would make (as @patrikbeno said), which should include removing the sidecar container.
Activity
gustavobini commentedon Nov 17, 2023
I might have misunderstood this issue, but is this not what it does right now when doing an
upgrade --dry-run?patrikbeno commentedon Nov 18, 2023
@gustavobini , no.
upgrade --dry-runshows all manifests in their TO-BE state. Proposed feature is about comparing AS-IS state with desired helm revision, and showing only DIFF.Also note that
helm upgradeneeds local helm chart workspace.helm diff release/revision(which is the target of this proposal) does not need one, it works with k8s cluster only.patrikbeno commentedon Nov 18, 2023
The use case I had in mind is this:
runtimemay be a keyword here; since revisions are integers, this keyword would tell helm-diff to take manifests from actual runtime, not from any specific revision.itaispiegel commentedon Nov 28, 2023
My team also needs this feature so I'd like to thumbs up this issue 👍🏻
itaispiegel commentedon Nov 28, 2023
Just looked into it and I think this is solved by using the
--three-way-mergeflag. At first I didn't understand the meaning of this flag, but then I found this documentation.patrikbeno commentedon Jan 28, 2024
--three-way-mergelooks promising, buthelm-diff-upgradeis missing--forceraymondregrello commentedon Aug 28, 2025
+1, if helm diff with
--three-way-mergebehaves like helm's three way merge algorithm, I don't think it will fully surface all manual changes that have been made.E.g. if the live manifest has
replicas: 3and the Helm release specifiesreplicas: 1,helm diff upgrade --three-way-mergeshould report the full diff:However the docs for helm's three way merge give this example:
If the live is state is this:
And the helm release specifies:
I would only expect
helm diff upgrade --three-way-mergeto report the diff as:Assuming this is the case (please correct me if not!), it would be great to have an option that shows the full changes that
helm upgrade --forcewould make (as @patrikbeno said), which should include removing the sidecar container.