helm-controller icon indicating copy to clipboard operation
helm-controller copied to clipboard

Add `Drifted` condition to HelmRelease and log generation

Open yozel opened this issue 4 weeks ago • 0 comments

This PR does two things:

  • Introduces a new condition type "Drifted" to improve observability of Helm release drift detection.
  • Starts logging HelmRelease's metadata.generation

With this PR, it will be possible to list all helm releases with drift:

$ kubectl get helmrelease -o yaml | yq '[.items[] | .metadata as $md | .status.conditions[] | select(.type=="Drifted" and .status=="True") | {"namespace": $md.namespace, "name": $md.name, "observedGeneration": .observedGeneration}]'

- namespace: foo
  name: myrelease
  generation: 3
- namespace: bar
  name: another-release
  generation: 1

and then this to get exact diff for a specific drifted helm release

$ kubectl logs Deployment/helm-controller | jq 'select(.HelmRelease.namespace=="foo" and .HelmRelease.name == "myrelease" and .generation==3)'

Fix: #1241

yozel avatar Dec 04 '25 13:12 yozel