fix(chart): stamp CRD labels with chart appVersion instead of hardcoded devel - #3940
Open
aqeelat wants to merge 1 commit into
Open
fix(chart): stamp CRD labels with chart appVersion instead of hardcoded devel#3940aqeelat wants to merge 1 commit into
aqeelat wants to merge 1 commit into
Conversation
The Helm chart CRD templates hardcoded version: "devel" and
operator.tekton.dev/release: "devel" on every CRD. Released OCI
charts are stamped only via Chart.yaml (version/appVersion), so
published charts shipped CRDs labeled "devel" while everything
else (chart metadata, deployment images) carried the real
release version — misleading for GitOps auditing (e.g. ArgoCD
diffs).
Use {{ .Chart.AppVersion | quote }} in the labels injected by
hack/sync-helm-crds.sh so in-tree renders keep "devel" and
released charts stamp the actual version. These labels are
inert metadata: the operator reads
operator.tekton.dev/release-version (a different key) on
InstallerSets, nothing selects on these CRD labels.
Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3940 +/- ##
=======================================
Coverage 26.33% 26.33%
=======================================
Files 465 465
Lines 24951 24951
=======================================
Hits 6572 6572
Misses 17661 17661
Partials 718 718
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
/assign @anithapriyanatarajan |
waveywaves
approved these changes
Aug 18, 2026
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: waveywaves The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
The OCI-published chart (e.g.
ghcr.io/tektoncd/operator/charts/tekton-operator:0.81.0) ships CRDs with labelsversion: "devel"andoperator.tekton.dev/release: "devel"even though the chart itself is correctly stamped (version: 0.81.0,appVersion: v0.81.0) and all deployment images pin:v0.81.0. For GitOps users (ArgoCD), every CRD diff showsrelease: develwhile everything else says the real version — misleading for auditing.Root cause:
hack/sync-helm-crds.sh(which generatescharts/tekton-operator/templates/{kubernetes,openshift}-crds.yaml) injects hardcoded"devel"labels, and the release workflow (.github/workflows/helm-release.yaml) stamps onlyChart.yaml— the CRD templates are never touched.Fix: the label injection now emits
{{ .Chart.AppVersion | quote }}. In-tree/dev renders keepdevel(Chart.yamlappVersion: "devel"), released OCI charts stamp the real version. No workflow change needed.These labels are inert metadata: the operator reads
operator.tekton.dev/release-version(a different key) on InstallerSets; nothing selects on these CRD labels.Render proof (13 CRDs per platform, both kubernetes and openshift sets):
"devel"(in-tree)operator.tekton.dev/release: "devel""v0.82.0"(release-stamped)operator.tekton.dev/release: "v0.82.0"Note: 0.81.0 is already published and stays as-is; this lands in the next release (maintainers may cherry-pick).
Submitter Checklist
make test lintbefore submitting a PR (chart-only change;lint-go0 issues,yamllintclean on changed files.helm lintfails on main pre-existing —version: "devel"is not valid semver)helm templaterenders above)Release Notes