← Back to Pull requests

helm: fix chart versioning #428

Closed
unknown closed this pull request without merging on Aug 19, 2026 12:53 UTC
View on GitHub
unknown unknown commented on Aug 19, 2026 04:24 UTC
Author

Description

This PR refactors how the Helm chart version is resolved.

Instead of injecting the appVersion using sed, we pass it through --app-version. Additionally, we pass the chart version using --version.

The version and appVersion are now correctly being populated by the current annotated tag.

If no tag is detected, a pseudo-version that matches the one created for the controller and reporter images is attributed to the appVersion and version.

Related Issue

xref #427

Type of Change

/kind cleanup

Testing

With a tagged commit:

$ git tag -a v0.5.1 -m "Release v0.5.1"

$ git describe
v0.5.1

$ IMG_PREFIX=test COMPONENT=chart ./scripts/build-and-publish.sh 
Using IMG_TAG=v0.5.1
Building Helm chart...
mkdir -p ./bin/chart
go run helm.sh/helm/v3/cmd/helm@v3.15.1 package ./charts/node-readiness-controller \
        --version "0.5.1" \
        --app-version "v0.5.1" \
        --dependency-update \
        --destination ./bin/chart
Successfully packaged chart and saved it to: bin/chart/node-readiness-controller-0.5.1.tgz
go run helm.sh/helm/v3/cmd/helm@v3.15.1 push ./bin/chart/node-readiness-controller-0.5.1.tgz oci://test/charts
Error: failed to do request: Head "https://test/v2/charts/node-readiness-controller/blobs/sha256:c0d461e5502817eb51158967912ded6202f0a2dde412723522a5bfccd77c9706": dial tcp: lookup test: no such host
exit status 1
make: *** [Makefile:519: publish-helm] Error 1

$ tar -zxvf bin/chart/node-readiness-controller-0.5.1.tgz 
node-readiness-controller/Chart.yaml
node-readiness-controller/values.yaml
node-readiness-controller/templates/_helpers.tpl
node-readiness-controller/templates/certificates.yaml
node-readiness-controller/templates/deployment.yaml
node-readiness-controller/templates/issuer.yaml
node-readiness-controller/templates/nodereadinessrules.yaml
node-readiness-controller/templates/rbac.yaml
node-readiness-controller/templates/serviceaccount.yaml
node-readiness-controller/templates/servicemetrics.yaml
node-readiness-controller/templates/servicewebhook.yaml
node-readiness-controller/templates/validatingwebhookconfiguration.yaml
node-readiness-controller/.helmignore
node-readiness-controller/README.md
node-readiness-controller/crds/nodereadinessrules.readiness.node.x-k8s.io.yaml
node-readiness-controller/tests/annotations_test.yaml
node-readiness-controller/tests/deployment_test.yaml
node-readiness-controller/tests/nodereadinessrules_test.yaml
node-readiness-controller/tests/rbac_test.yaml
node-readiness-controller/tests/webhook_and_metrics_test.yaml

$ cat node-readiness-controller/Chart.yaml 
apiVersion: v2
appVersion: v0.5.1
description: A Helm chart for the Node Readiness Controller
home: https://github.com/kubernetes-sigs/node-readiness-controller
keywords:
- kubernetes
- controller
- readiness
- node
kubeVersion: '>=1.25.0-0'
name: node-readiness-controller
sources:
- https://github.com/kubernetes-sigs/node-readiness-controller
type: application
version: 0.5.1

With an untagged commit:

$ git describe --exact-match 
fatal: no tag exactly matches '95e50f99c5eb7099cb73d80634ecb7e8b3acde0d'

$ IMG_PREFIX=test COMPONENT=chart ./scripts/build-and-publish.sh 
Using IMG_TAG=v20260819-95e50f9
Building Helm chart...
mkdir -p ./bin/chart
go run helm.sh/helm/v3/cmd/helm@v3.15.1 package ./charts/node-readiness-controller \
        --version "20260819-95e50f9" \
        --app-version "v20260819-95e50f9" \
        --dependency-update \
        --destination ./bin/chart
Successfully packaged chart and saved it to: bin/chart/node-readiness-controller-20260819-95e50f9.tgz
go run helm.sh/helm/v3/cmd/helm@v3.15.1 push ./bin/chart/node-readiness-controller-20260819-95e50f9.tgz oci://test/charts
Error: failed to do request: Head "https://test/v2/charts/node-readiness-controller/blobs/sha256:8f24e57571c0c0826eccb4ac78e82ae4448351f914631d50efb86611e5930d78": dial tcp: lookup test: no such host
exit status 1
make: *** [Makefile:519: publish-helm] Error 1

$ tar -zxvf bin/chart/node-readiness-controller-20260819-95e50f9.tgz 
node-readiness-controller/Chart.yaml
node-readiness-controller/values.yaml
node-readiness-controller/templates/_helpers.tpl
node-readiness-controller/templates/certificates.yaml
node-readiness-controller/templates/deployment.yaml
node-readiness-controller/templates/issuer.yaml
node-readiness-controller/templates/nodereadinessrules.yaml
node-readiness-controller/templates/rbac.yaml
node-readiness-controller/templates/serviceaccount.yaml
node-readiness-controller/templates/servicemetrics.yaml
node-readiness-controller/templates/servicewebhook.yaml
node-readiness-controller/templates/validatingwebhookconfiguration.yaml
node-readiness-controller/.helmignore
node-readiness-controller/README.md
node-readiness-controller/crds/nodereadinessrules.readiness.node.x-k8s.io.yaml
node-readiness-controller/tests/annotations_test.yaml
node-readiness-controller/tests/deployment_test.yaml
node-readiness-controller/tests/nodereadinessrules_test.yaml
node-readiness-controller/tests/rbac_test.yaml
node-readiness-controller/tests/webhook_and_metrics_test.yaml

$ cat node-readiness-controller/Chart.yaml 
apiVersion: v2
appVersion: v20260819-95e50f9
description: A Helm chart for the Node Readiness Controller
home: https://github.com/kubernetes-sigs/node-readiness-controller
keywords:
- kubernetes
- controller
- readiness
- node
kubeVersion: '>=1.25.0-0'
name: node-readiness-controller
sources:
- https://github.com/kubernetes-sigs/node-readiness-controller
type: application
version: 20260819-95e50f9

Diff: 650 lines (+487 / -163) across 8 files Reviewer: ajaysundark Review duration: 509m
All Vouch review confidence checks passed
Residual risk 0.33 = Change Risk (0.75) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
0.75
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.388
Shallow Review Depth shallow_review_depth
0.289
Sensitive Paths sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #428"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 75.2% (HIGH) · Higher = larger blast radius
75.2%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 32.5% · Safe to merge
32.5%