fix(chart): claimer falls through to image.tag when its own tag is unset#72
Conversation
Hoists the load-bearing piece of #62 (DT-164) so the drift hole closes before gitops#130 (ArgoCD Image Updater) reconciles in clusters. Today both `image.tag` and `claimerImage.tag` carry `$imagepolicy` markers and image-policy-applier bumps both — controller and claimer stay in lockstep. Once gitops#130 lands, Image Updater takes over and only rewrites `image.tag` (the `image-list` annotation covers `openfilter-pipelines-controller`, not the claimer). `claimerImage.tag` would freeze at its last set value while the controller advances, silently drifting until the next claimer-side flag or API change makes the gap user-visible. Fix: - `templates/deployment.yaml:121` — `CLAIMER_IMAGE` rendering gains a `default .Values.image.tag` fallback so the claimer follows the controller's tag whenever its own is unset. `Chart.AppVersion` stays as the last-resort floor for fresh installs. - 4 overrides drop the static `claimerImage.tag: <sha>` line (with the `$imagepolicy` marker). `claimerImage.repository: plainsightai/*` stays — that's the post-#71 Docker Hub path. With no `tag:` set, the template's fallback chain takes over. Validated by `helm template` against `overrides/production.yaml`: `CLAIMER_IMAGE=plainsightai/openfilter-pipelines-claimer:<image.tag>` as expected. Cross-refs: #71 (Docker Hub publish that introduced the drift hole), #62 (Sam's larger DT-164 refactor that originally bundled this fix), gitops#130 (the Image Updater rollout this guards against).
leandrobmarinho
left a comment
There was a problem hiding this comment.
Verified by rendering the chart across scenarios: with claimerImage.tag unset, CLAIMER_IMAGE correctly falls through to image.tag and then Chart.AppVersion, keeping controller and claimer in lockstep under ArgoCD Image Updater; removing the redundant claimerImage.tag overrides also drops a duplicate imagepolicy annotation that would otherwise drift. Looks good.
shingonoide
left a comment
There was a problem hiding this comment.
APPROVE.
The claimer image tag now falls through to the controller's image.tag before the chart appVersion, which is exactly what's needed once ArgoCD Image Updater rewrites only image.tag.
Confirmed the new expression in templates/deployment.yaml is {{ .Values.claimerImage.tag | default .Values.image.tag | default .Chart.AppVersion }}. Helm's default treats an empty string as falsy, so an unset or empty claimerImage.tag correctly inherits image.tag, and a bare install with both empty still resolves to the chart appVersion (0.5.1), so no empty or latest tag ever renders. The controller image line is untouched and stays the single field Image Updater targets. All four environment overrides drop their static claimerImage.tag while keeping the repository, and no other template references the claimer tag, so nothing inconsistent is left behind. CI is green.
One optional, non-blocking nit: README.md and the values.yaml comment for claimerImage.tag still say it "defaults to chart appVersion". With this change it defaults to image.tag first and only then to appVersion, so a one-line doc tweak would keep them accurate. Fine to fold into a later pass.
Clean, well-scoped change.
Summary
Hoists the load-bearing piece of #62 (DT-164) so the drift hole closes before gitops#130 (ArgoCD Image Updater) reconciles in clusters.
The bug
On current main,
deployment/openfilter-pipelines-controller/overrides/{development,lab,staging,production}.yamlcarries:Today image-policy-applier writes both
tag:values from the same source-of-truth and they advance together. Once gitops#130 lands, ArgoCD Image Updater takes over and only rewritesimage.tag— itsimage-listannotation coversopenfilter-pipelines-controller, not the claimer.claimerImage.tagwould freeze at whatever SHA it was last set to while the controller advances, silently drifting until a claimer-side flag or API change makes the gap user-visible (in prod, that means "the claimer is on a stale binary and you don't know it until something breaks").Fix
templates/deployment.yaml:121—CLAIMER_IMAGErendering gains adefault .Values.image.tagfallback so the claimer's tag follows the controller's whenever its own is unset.Chart.AppVersionstays as the last-resort floor for fresh installs (same as before).claimerImage.tag: <sha>line +$imagepolicymarker.claimerImage.repository: plainsightai/openfilter-pipelines-claimerstays — that's the post-feat(deploy): unify image + chart publishing under Docker Hub OCI #71 Docker Hub path. With notag:set, the template's fallback chain takes over.Same shape as the fix bundled in #62, lifted to its own PR so it can land independently of #62's broader workflow refactor (which currently conflicts with #71's
docker-publish.ymland needs a rebase regardless).Validation
(image.tag's value flowing through to the claimer as expected.)
helm lintcleanhelm templateagainst production override renders the post-fallback value correctlyCross-refs
tagfield Image Updater would target).Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.