From befaf5ea38e1bada6d8b41fabdf020996088314e Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Thu, 23 Jul 2026 07:20:36 -0400 Subject: [PATCH 1/2] fix(helm): stamp Chart.yaml version on release Follows the kopiur pattern: release-please now stamps version and appVersion in Chart.yaml (x-release-please-version annotations + extra-files) so a git-sourced install deploys a real image tag instead of the nonexistent 0.0.0. The release workflow still re-stamps both at package time; this keeps the repo copy from going stale. tuppr additionally gates chart docs staleness in CI (helm-docs-check), so the pattern needs two extra pieces kopiur did not: - The chart README version badges are also stamped (listed in extra-files). The release-please generic updater replaces only the first semver per annotated line and would swallow a shields.io `-color` path suffix as a prerelease, so the badges move off chart.badgesSection to the static/v1 query form with one version occurrence per line and an inline annotation, keeping helm-docs regeneration byte-identical after a stamp (verified by simulating the updater regex end to end). - The helm unittest image assertion now matches the repo:semver shape instead of a hardcoded 0.0.0 tag. Signed-off-by: Devin Buhl --- charts/tuppr/Chart.yaml | 8 ++++++-- charts/tuppr/README.md | 4 +++- charts/tuppr/README.md.gotmpl | 10 +++++++++- charts/tuppr/tests/deployment_test.yaml | 8 +++++--- release-please-config.json | 3 ++- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/charts/tuppr/Chart.yaml b/charts/tuppr/Chart.yaml index 1f6297bc..73113a1c 100644 --- a/charts/tuppr/Chart.yaml +++ b/charts/tuppr/Chart.yaml @@ -6,8 +6,12 @@ type: application # Floor matching the chart's surface: restricted Pod Security (seccompProfile), # the admission webhook (admissionregistration.k8s.io/v1), and CRDs. kubeVersion: ">=1.25.0-0" -version: 0.0.0 -appVersion: "0.0.0" +# Chart + default image version, stamped by release-please on every release so +# a git-sourced install deploys real image tags (the release workflow re-stamps +# both at package time anyway; these keep the repo copy from going stale). +version: 0.4.0 # x-release-please-version +# Operator/image version this chart deploys by default. +appVersion: "0.4.0" # x-release-please-version home: https://github.com/home-operations/tuppr sources: - https://github.com/home-operations/tuppr diff --git a/charts/tuppr/README.md b/charts/tuppr/README.md index e770abdd..b35928df 100644 --- a/charts/tuppr/README.md +++ b/charts/tuppr/README.md @@ -1,6 +1,8 @@ # tuppr -![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square) +![Version](https://img.shields.io/static/v1?label=Version&message=0.4.0&color=informational&style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![AppVersion](https://img.shields.io/static/v1?label=AppVersion&message=0.4.0&color=informational&style=flat-square) A Helm chart for tuppr - Talos Linux Upgrade Controller diff --git a/charts/tuppr/README.md.gotmpl b/charts/tuppr/README.md.gotmpl index cf8a4fc5..473340c5 100644 --- a/charts/tuppr/README.md.gotmpl +++ b/charts/tuppr/README.md.gotmpl @@ -1,6 +1,14 @@ {{ template "chart.header" . }} -{{ template "chart.badgesSection" . }} +{{- /* Hand-rolled badges instead of chart.badgesSection so release-please can +stamp the version: its updater replaces only the first semver on an annotated +line and would swallow a `-color` suffix as a prerelease, so each version badge +uses the static/v1 query form (version followed by `&`), keeps the version out +of its alt text, and carries its own annotation. Keeps the committed README in +sync with the stamped Chart.yaml. */}} +![Version](https://img.shields.io/static/v1?label=Version&message={{ .Version }}&color=informational&style=flat-square) +![Type: {{ .Type }}](https://img.shields.io/badge/Type-{{ .Type }}-informational?style=flat-square) +![AppVersion](https://img.shields.io/static/v1?label=AppVersion&message={{ .AppVersion }}&color=informational&style=flat-square) {{ template "chart.description" . }} diff --git a/charts/tuppr/tests/deployment_test.yaml b/charts/tuppr/tests/deployment_test.yaml index 190e6475..51930a4b 100644 --- a/charts/tuppr/tests/deployment_test.yaml +++ b/charts/tuppr/tests/deployment_test.yaml @@ -7,11 +7,13 @@ tests: - isKind: of: Deployment - - it: should use the correct image + # The tag floats with the release-please-stamped appVersion; assert the + # repo:semver shape rather than a hardcoded version. + - it: should default the image tag to the chart appVersion asserts: - - equal: + - matchRegex: path: spec.template.spec.containers[0].image - value: ghcr.io/home-operations/tuppr:0.0.0 + pattern: ^ghcr\.io/home-operations/tuppr:\d+\.\d+\.\d+$ - it: should use custom image tag set: diff --git a/release-please-config.json b/release-please-config.json index 0239e68e..db4c0d9a 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -11,7 +11,8 @@ "include-component-in-tag": false, "include-v-in-tag": false, "include-v-in-release-name": false, - "always-update": true + "always-update": true, + "extra-files": ["charts/tuppr/Chart.yaml", "charts/tuppr/README.md"] } }, "changelog-sections": [ From b0d8549a3252cd55c288722829e83b1bf99128b0 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Thu, 23 Jul 2026 07:21:51 -0400 Subject: [PATCH 2/2] Clean up comments in Chart.yaml Removed commented lines related to Pod Security and image versioning. Signed-off-by: Devin Buhl --- charts/tuppr/Chart.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/charts/tuppr/Chart.yaml b/charts/tuppr/Chart.yaml index 73113a1c..2b9b746d 100644 --- a/charts/tuppr/Chart.yaml +++ b/charts/tuppr/Chart.yaml @@ -3,14 +3,8 @@ apiVersion: v2 name: tuppr description: A Helm chart for tuppr - Talos Linux Upgrade Controller type: application -# Floor matching the chart's surface: restricted Pod Security (seccompProfile), -# the admission webhook (admissionregistration.k8s.io/v1), and CRDs. kubeVersion: ">=1.25.0-0" -# Chart + default image version, stamped by release-please on every release so -# a git-sourced install deploys real image tags (the release workflow re-stamps -# both at package time anyway; these keep the repo copy from going stale). version: 0.4.0 # x-release-please-version -# Operator/image version this chart deploys by default. appVersion: "0.4.0" # x-release-please-version home: https://github.com/home-operations/tuppr sources: