Skip to content

🐛 fix(release): stop chart clobbering the controller image tag on GHCR (DR-FIND-07) - #164

Merged
konih merged 1 commit into
mainfrom
fix/dr-find-07-ghcr-tag-collision
Aug 2, 2026
Merged

konih merged 1 commit into
mainfrom
fix/dr-find-07-ghcr-tag-collision

Conversation

@konih

@konih konih commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

DR-FIND-07 (P1) — GHCR tag collision: Helm chart clobbers the runnable controller image

Found in the driving-range lab + confirmed on GHCR: ghcr.io/platformrelay/kollect:0.13.0 is a Helm chart artifact (helm push to oci://ghcr.io/<owner> lands at the chart name kollect), clobbering the bare-tagged controller image; the runnable image survives only at :v0.13.0. Bare-tag pulls get a chart → CreateContainerConfigError. Separately, :latest is never published yet the chart defaulted image.tag: latest → a plain helm install deployed a nonexistent image.

Fix (Option B — see decisions.md 2026-08-02 · DR-FIND-07)

  • release.yaml: publish the controller image ONLY at the v-prefixed tag; the chart owns the bare :<version> tag (matches the current published state → no operator retag needed). Trivy scan switched to @digest (bare tag no longer exists at scan time). Added a regression guard asserting the image tag list never contains the bare <repo>:<version> the chart occupies.
  • chart: default image.tag now resolves to v<appVersion> (_helpers.tpl), values.yaml tag: "", schema allows empty — fixes the default-install bug.
  • hack/release-assets.sh + docs + release-notes: all controller-image refs realigned to the v-prefixed tag / digest.

Review

Independent reviewer: APPROVE, no P0/P1/P2. Exhaustive downstream trace confirmed zero surviving bare-tag controller references — the release pipeline survives the tag drop. Verified live: default renders :v0.13.0, override honored, 27 helm unittests + actionlint + shellcheck green.
Non-blocking P3 follow-ups: F1 move the guard tag-check before build-push so it's preventive not post-hoc; F2 the digest-compare is dead code (image vs helm digests always differ) — prune or keep as commented sanity check; F3 optional ADR for the tag-ownership reversal.

Workflow parts (tag drop, Trivy digest, guard) are NOT runnable this session — they confirm only on the next real release (v0.14.0). Chart/docs parts are verified. Finding closes on a live DR re-verify, not on merge.

Copilot AI review requested due to automatic review settings August 2, 2026 10:21
@konih
konih merged commit 2ab126a into main Aug 2, 2026
22 of 23 checks passed
@konih
konih deleted the fix/dr-find-07-ghcr-tag-collision branch August 2, 2026 10:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses DR-FIND-07 by preventing GHCR OCI tag collisions between the Helm chart artifact and the runnable controller image, and by fixing the chart’s default install behavior so it no longer deploys a nonexistent latest image.

Changes:

  • Update the release workflow to publish the controller image only under the v<version> tag, scan/sign by digest, and add a collision regression guard.
  • Change the Helm chart default image.tag behavior to resolve to v<appVersion> when unset/empty, and align schema/docs accordingly.
  • Update release assets generation, release notes template, and operator docs to reference the v-prefixed tag.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
hack/release-assets.sh Pins raw-manifest install.yaml to the v-prefixed controller image tag.
docs/RELEASE.md Aligns release verification steps with v-prefixed operator image tagging.
docs/operator-manual/upgrading.md Updates guidance to reflect the new default tag resolution behavior.
docs/operator-manual/index.md Updates lab/per-team install narrative for the v-prefixed default tag behavior.
docs/operator-manual/helm-values.md Updates the documented default for image.tag to empty → v<appVersion>.
docs/COMMAND-REFERENCE.md Updates image.tag documentation to match new chart default behavior.
charts/kollect/values.yaml Sets image.tag: "" and documents default resolution to v<appVersion>.
charts/kollect/values.schema.json Allows empty image.tag and documents its meaning.
charts/kollect/tests/deployment_image_tag_test.yaml Adds Helm unittest coverage for tag resolution and overrides.
charts/kollect/templates/_helpers.tpl Implements image.tag defaulting to v<appVersion> when empty.
charts/kollect/README.md Updates generated chart docs for the new image.tag default.
.github/workflows/release.yaml Removes bare-tag image publishing, switches Trivy to digest, publishes chart digest output, and adds a collision guard.
.github/release-notes-install.md Updates install snippets and operator image references to use ${TAG} (v-prefixed).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/RELEASE.md
@@ -249,7 +249,9 @@ and [`.github/release-notes-install.md`](https://github.com/platformrelay/kollec
TAG=v0.2.0-rc.1 # or your release tag
REPO=platformrelay/kollect
Comment on lines +9 to +11
- matchRegex:
path: spec.template.spec.containers[0].image
pattern: ^ghcr\.io/platformrelay/kollect:v[0-9]+\.[0-9]+\.[0-9]+$
@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

sonarqubecloud Bot commented Aug 2, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants