# Bump Operator Chart

> Use after pushing a new git tag (vMAJOR.MINOR.PATCH) on the operator main branch — bumps the Helm chart version, updates appVersion + operator image tag, and syncs the CRD into the chart if it changed.

- Skill: `glassflow/bump-operator-chart` (Agent Skill)
- Install (CLI): `npx skillmds@latest add glassflow/bump-operator-chart`
- Raw SKILL.md: https://api.skillmd.com/api/skills/glassflow/bump-operator-chart/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: glassflow (https://skillmd.com/u/glassflow)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/glassflow/bump-operator-chart

---


# Bump operator Helm chart for a new release tag

Use this skill when a new semver git tag has been pushed to `main` on the operator repo
(e.g. `v3.2.0`) and the chart needs to be updated to reflect that release.

## What changes

| File | Field | Rule |
|------|-------|------|
| `charts/glassflow-operator/Chart.yaml` | `version` | Increment patch (e.g. `0.8.2` → `0.8.3`) |
| `charts/glassflow-operator/Chart.yaml` | `appVersion` | Set to tag without `v` prefix (e.g. `"3.2.0"`) |
| `charts/glassflow-operator/values.yaml` | `operator.image.tag` | Set to full tag including `v` (e.g. `v3.2.0`) |
| `charts/glassflow-operator/templates/pipeline-crd.yaml` | entire file | Copy of `config/crd/bases/etl.glassflow.io_pipelines.yaml` — only if it changed since last tag |

## Steps

### 1 — Confirm the release tag

Ask the user for the new tag if not already provided. It must be in the form `vMAJOR.MINOR.PATCH`.

```bash
# Verify the tag exists on origin
git fetch --tags
git tag --list "<tag>"
```

If the tag does not exist remotely, stop and ask the user to push it first.

### 2 — Ensure you're on main and up to date

```bash
git checkout main
git pull origin main
git checkout -b kiran/bump-chart-<tag>
```

### 3 — Read current values

```bash
grep -E "^version:|^appVersion:" charts/glassflow-operator/Chart.yaml
grep "tag:" charts/glassflow-operator/values.yaml | head -5
```

Note the current chart `version` — you will increment its **patch** segment only.

### 4 — Check whether the CRD changed since the last tag

```bash
PREV_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || git tag --sort=-version:refname | sed -n '2p')
git diff "${PREV_TAG}"..HEAD -- config/crd/bases/etl.glassflow.io_pipelines.yaml
```

- If the diff is **empty**: the CRD did not change — skip to step 6.
- If the diff is **non-empty**: proceed to step 5.

### 5 — Sync the CRD into the chart (only if it changed)

```bash
make sync-chart-crd
```

This runs `make manifests` (regenerates the CRD from Go types) then copies
`config/crd/bases/etl.glassflow.io_pipelines.yaml` →
`charts/glassflow-operator/templates/pipeline-crd.yaml`.

Verify the result makes sense:

```bash
git diff charts/glassflow-operator/templates/pipeline-crd.yaml
```

### 6 — Update Chart.yaml

Edit `charts/glassflow-operator/Chart.yaml`:

- `version`: increment the **patch** part of the semver chart version (e.g. `0.8.2` → `0.8.3`).
  Do **not** change major or minor unless explicitly requested.
- `appVersion`: set to the release tag **without** the `v` prefix, wrapped in quotes
  (e.g. `"3.2.0"`).

### 7 — Update values.yaml

Edit `charts/glassflow-operator/values.yaml`:

- `operator.image.tag`: set to the full tag **with** the `v` prefix (e.g. `v3.2.0`).
  This is the only image tag to update — the ETL component tags (`ingestor`, `join`, `sink`, `dedup`)
  are versioned separately and must not be changed here.

### 8 — Verify the full diff

```bash
git diff charts/
```

Confirm:
- Chart `version` bumped by exactly one patch.
- `appVersion` matches tag without `v`.
- Only `operator.image.tag` changed in `values.yaml` (not the component image tags).
- `pipeline-crd.yaml` is updated only if the CRD changed (step 4).
- No other files changed.

### 9 — Lint the chart

```bash
helm lint charts/glassflow-operator
```

Fix any lint errors before proceeding.

### 10 — Commit and push

```bash
git add charts/glassflow-operator/Chart.yaml \
        charts/glassflow-operator/values.yaml \
        charts/glassflow-operator/templates/pipeline-crd.yaml   # only if updated
git commit -m "chore(chart): bump chart to <chart-version>, appVersion <app-version>"
git push origin HEAD
```

### 11 — Open a PR

```bash
gh pr create \
  --title "chore(chart): bump chart version to <chart-version> for <tag>" \
  --body "$(cat <<'EOF'
## Summary

- Bumped `charts/glassflow-operator/Chart.yaml` version to `<chart-version>`
- Set `appVersion` to `<app-version>` (matches release tag `<tag>`)
- Updated `operator.image.tag` in `values.yaml` to `<tag>`
- Synced `pipeline-crd.yaml` from `config/crd/bases/` (include only if CRD changed)

## Test plan

- [ ] `helm lint charts/glassflow-operator` passes
- [ ] `helm template` renders without errors
- [ ] CRD diff reviewed if `pipeline-crd.yaml` was updated
EOF
)"
```

## Common mistakes to avoid

- **Do not** strip or add the `v` prefix in the wrong place: `appVersion` has no `v`, `image.tag` keeps it.
- **Do not** bump the chart major/minor version — only the patch unless explicitly told otherwise.
- **Do not** touch the ETL component image tags (`ingestor`, `join`, `sink`, `dedup`) — those follow their own release cycle.
- **Do not** manually edit `pipeline-crd.yaml` — always use `make sync-chart-crd` so the source of truth stays in `config/crd/bases/`.
- **Do not** run `make sync-chart-crd` if the CRD has not changed — it regenerates unnecessarily.
- **Do not** commit `Chart.lock` or any other generated artifacts.

