helmwave
helmwave copied to clipboard
Helmwave diff live does not seem to do 3-way diff
This is mainly a question , as we observed after deleting manually a resource from a deployed chart , diff (live mode) doesnt show the live object as missing/added. Is there support for 3-way diff against live k8s objects (i.e. not live state of helm release secret)?
Yep, it's because helm diff and helm returns manifest from HELM_DRIVER (k8s secrets). We don't have ideas on how to do it natively.
I see only 1 option today: Calling kube client behind the helm.
Right now we use helm get manifest
to get current release manifests. And it doesn't reflect any changes made as it just returns previously applied manifests (stored in secret)
We can try to use helm upgrade --dry-run --reuse-values
. This way helm should run its 3-way merge
@r3nic1e nice trick!
I've tried to do trick with helm upgrade --dry-run --reuse-values
- it doesn't do much. Works like current code
I've also checked what does helm-diff do - https://github.com/databus23/helm-diff/blob/c5d10a3e91f4ac3882eec23b7b35871eaeb9e895/cmd/upgrade.go#L243
Long story short: helm-diff prepares kubectl-like patch with lots of marshaling and unmarshaling
@samavasi you can try to use it with the new experimental --3-way-merge
flag (or HELMWAVE_DIFF_3_WAY_MERGE
envvar). But it may output a lot of generated fields (like uid, timestamps, etc.)