fix: let Renovate set promtool in kube-prometheus-stack PRs #89

Merged
ivuorinen merged 1 commit from ivuorinen/fix/renovate-promtool-sync into main 2026-10-07 08:40:05 +00:00 AGit
Owner

promtool in mise.toml has to match the Prometheus that kube-prometheus-stack
deploys, and scripts/ci/check-promtool-parity.sh fails the render job until
it does. Renovate cannot read that version, because it lives inside the
chart, so the PR body asked a human to set the pin. #21 (chart 91.9.0, which
ships Prometheus 3.15.0) has been failing its render job on exactly that,
and every chart bump that moves Prometheus would fail the same way. The
Longhorn rule already shows the standard fix: a post-upgrade task that
renders the chart and writes the result into the same PR.

  • scripts/ci/check-promtool-parity.sh gains --write. On a disagreement it
    sets the pin to the rendered Prometheus instead of failing. Both sides are
    still read by one piece of code, so the value written is the one the check
    accepts. CI never passes --write.
  • scripts/sync-promtool-version.sh reads the chart repo and version from the
    Application with sed (Renovate's containerbase cannot install yq), renders
    only the Prometheus template with helm, and runs the check with --write.
    The Application overrides neither the image nor the version. If it ever
    does, the render job's parity check, which uses the Application's values,
    fails on the difference.
  • renovate.json gives the kube-prometheus-stack rule that script as a
    postUpgradeTasks command (helm only, fileFilters mise.toml), and replaces
    the PR note asking for the manual step.
  • gitops/apps/renovate/configmap.yaml adds the script to allowedCommands.
  • docs/11-renovate.md, README and CLAUDE.md describe it. The Renovate table
    also named scripts/15 and scripts/11, which no longer exist; those rows now
    name gitops/apps/crds/versions.yaml.

Tests: three --write cases in tests/check-promtool-parity.bats, and
tests/sync-promtool-version.bats, which runs the script against a stub helm.
All five failed before the code existed. Against the real chart, the script
leaves the pin alone at 88.6.5 and sets 3.14.0 -> 3.15.0 at 91.9.0.

After merging, wait for ArgoCD to sync the renovate ConfigMap, then tick
"rebase" for #21 on the Renovate Dashboard so the task runs on its branch.

promtool in mise.toml has to match the Prometheus that kube-prometheus-stack deploys, and scripts/ci/check-promtool-parity.sh fails the render job until it does. Renovate cannot read that version, because it lives inside the chart, so the PR body asked a human to set the pin. #21 (chart 91.9.0, which ships Prometheus 3.15.0) has been failing its render job on exactly that, and every chart bump that moves Prometheus would fail the same way. The Longhorn rule already shows the standard fix: a post-upgrade task that renders the chart and writes the result into the same PR. - scripts/ci/check-promtool-parity.sh gains --write. On a disagreement it sets the pin to the rendered Prometheus instead of failing. Both sides are still read by one piece of code, so the value written is the one the check accepts. CI never passes --write. - scripts/sync-promtool-version.sh reads the chart repo and version from the Application with sed (Renovate's containerbase cannot install yq), renders only the Prometheus template with helm, and runs the check with --write. The Application overrides neither the image nor the version. If it ever does, the render job's parity check, which uses the Application's values, fails on the difference. - renovate.json gives the kube-prometheus-stack rule that script as a postUpgradeTasks command (helm only, fileFilters mise.toml), and replaces the PR note asking for the manual step. - gitops/apps/renovate/configmap.yaml adds the script to allowedCommands. - docs/11-renovate.md, README and CLAUDE.md describe it. The Renovate table also named scripts/15 and scripts/11, which no longer exist; those rows now name gitops/apps/crds/versions.yaml. Tests: three --write cases in tests/check-promtool-parity.bats, and tests/sync-promtool-version.bats, which runs the script against a stub helm. All five failed before the code existed. Against the real chart, the script leaves the pin alone at 88.6.5 and sets 3.14.0 -> 3.15.0 at 91.9.0. After merging, wait for ArgoCD to sync the renovate ConfigMap, then tick "rebase" for #21 on the Renovate Dashboard so the task runs on its branch.
fix: let Renovate set promtool in kube-prometheus-stack PRs
All checks were successful
validate / render (pull_request) Successful in 1m59s
validate / hooks (pull_request) Successful in 3m17s
caf2183aaa
promtool in mise.toml has to match the Prometheus that kube-prometheus-stack
deploys, and scripts/ci/check-promtool-parity.sh fails the render job until
it does. Renovate cannot read that version, because it lives inside the
chart, so the PR body asked a human to set the pin. #21 (chart 91.9.0, which
ships Prometheus 3.15.0) has been failing its render job on exactly that,
and every chart bump that moves Prometheus would fail the same way. The
Longhorn rule already shows the standard fix: a post-upgrade task that
renders the chart and writes the result into the same PR.

- scripts/ci/check-promtool-parity.sh gains --write. On a disagreement it
  sets the pin to the rendered Prometheus instead of failing. Both sides are
  still read by one piece of code, so the value written is the one the check
  accepts. CI never passes --write.
- scripts/sync-promtool-version.sh reads the chart repo and version from the
  Application with sed (Renovate's containerbase cannot install yq), renders
  only the Prometheus template with helm, and runs the check with --write.
  The Application overrides neither the image nor the version. If it ever
  does, the render job's parity check, which uses the Application's values,
  fails on the difference.
- renovate.json gives the kube-prometheus-stack rule that script as a
  postUpgradeTasks command (helm only, fileFilters mise.toml), and replaces
  the PR note asking for the manual step.
- gitops/apps/renovate/configmap.yaml adds the script to allowedCommands.
- docs/11-renovate.md, README and CLAUDE.md describe it. The Renovate table
  also named scripts/15 and scripts/11, which no longer exist; those rows now
  name gitops/apps/crds/versions.yaml.

Tests: three --write cases in tests/check-promtool-parity.bats, and
tests/sync-promtool-version.bats, which runs the script against a stub helm.
All five failed before the code existed. Against the real chart, the script
leaves the pin alone at 88.6.5 and sets 3.14.0 -> 3.15.0 at 91.9.0.

After merging, wait for ArgoCD to sync the renovate ConfigMap, then tick
"rebase" for #21 on the Renovate Dashboard so the task runs on its branch.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ivuorinen/turingpi-cluster!89
No description provided.