# Upgrade Helm Chart Dependencies

An agent finds one of kube-prometheus-stack's four subcharts behind, bumps windows-exporter to 0.13.*, and passes helm lint, ct lint and 216 unit tests.

[Run this on Rush](https://cloud.getrush.ai/run/upgrade-chart-dependencies/helm/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent reads `charts/kube-prometheus-stack/Chart.yaml` and asks each OCI registry on ghcr.io for its newest tag. kube-state-metrics 8.8.0, prometheus-node-exporter 4.60.1 and grafana 14.3.0 were already the latest; only prometheus-windows-exporter had moved, from 0.12.9 to 0.13.2.

Before bumping it, the agent pulls both versions with `helm pull` and diffs them. The five values the parent sets (`prometheus.monitor.enabled`, `prometheus.monitor.jobLabel`, `releaseLabel`, `podLabels` and `config`) all still exist, `values.yaml` is byte-identical, and the one template change is how `sidecars` render, which the parent never sets. So it changes the range to `0.13.*`, bumps the chart version as CONTRIBUTING.md asks, and adds no UPGRADE.md section.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "In charts/kube-prometheus-stack only, upgrade each dependency in Chart.yaml to its latest compatible version, one at a time, with helm dependency update. For each, check that every value kube-prometheus-stack sets for that subchart still exists in the new version. Run helm lint, ct lint --config .github/linters/ct.yaml and helm unittest --strict on the chart's unittests. Bump the chart version as CONTRIBUTING.md asks, and add an UPGRADE.md section only if users must change their values. Leave out any upgrade that breaks the build or tests and say why. Open a pull request titled with the [kube-prometheus-stack] prefix, with one line per bump.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

Tried on prometheus-community/helm-charts at 05f6053a: 1 file changed, 2 insertions(+), 2 deletions(-), in `Chart.yaml` (chart 92.17.0 to 92.18.0, windows-exporter `0.12.*` to `0.13.*`). `helm lint` and `helm unittest --strict` passed before and after, ending `Tests:       216 passed, 216 total`. `ct lint` ended `All charts linted successfully` both times, but only through a wrapper script: the agent passed chart-testing's own `chart_schema.yaml` and `lintconf.yaml` explicitly and set `GITHUB_SHA` for `ci/lint.sh`. It installed helm 3.19.0, helm-unittest, chart-testing 3.13.0, yamllint, yamale, shellcheck and bzip2 to run the checks. No pull request was opened.

For the reviewer: `0.13.*` is a minor bump of a 0.x chart that changes the constraint itself, and the run found no incompatibility. The chart moves by a minor version, 92.18.0, matching how earlier dependency bumps were versioned.

## Run it on every Monday morning

An automation with a `schedule` trigger, `cron` `0 9 * * 1` in your time zone, runs this prompt once a week. In this trial three of the four subcharts were already current, so the pull request would carry one line.

## Why run it on Rush?

A subchart bump looks safe until a value the parent sets disappears. This run checked that by diffing the two published charts, not by trusting the version number, and it showed the 216 unit tests passing on both sides of the bump.

## Frequently asked questions

### Chart.lock is gitignored. What does the diff hold?

Only `Chart.yaml`. `Chart.lock` and `charts/*.tgz` are ignored in this repository, so `helm dependency update` fetches the subchart but the commit records just the new range and chart version.

### Why did ct lint first fail on the untouched clone?

Missing tools: the chart-testing config files, shellcheck and bzip2. Once installed, the clean clone passed. A later run exited 1 with `Please run ./hack/update_crds.sh` because `GITHUB_SHA` pointed at the old commit while the edit was uncommitted; committing locally cleared it.

## More Helm jobs

- [Write Unit Tests for a Helm Chart](https://getrush.ai/run/write-helm-unittest/helm/)
- [Add chart-testing and a kind Install Test to a Helm Chart's CI](https://getrush.ai/run/add-chart-testing/helm/)
- [Generate a Helm Chart README With helm-docs and Fail CI When It Is Stale](https://getrush.ai/run/add-helm-docs/helm/)

## More jobs like this: Upgrade dependencies weekly

- [Upgrade a Click CLI to Click 8.2 and Later](https://getrush.ai/run/upgrade-click/click/)
- [Upgrade Commander.js From v3 to the Latest Version in a Node CLI](https://getrush.ai/run/upgrade-commander/commander/)
- [Upgrade Filament and Composer Dependencies](https://getrush.ai/run/upgrade-composer-dependencies/filament/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
