|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides context for Claude Code when working on this repository. |
| 4 | + |
| 5 | +## Project Overview |
| 6 | + |
| 7 | +This is a public Helm charts repository maintained by Helmcode. Charts are published as OCI artifacts to GitHub Container Registry (ghcr.io/helmcode/helm-charts). |
| 8 | + |
| 9 | +## Repository Structure |
| 10 | + |
| 11 | +``` |
| 12 | +helm-charts/ |
| 13 | +├── .github/workflows/ |
| 14 | +│ ├── helm.yml # CI pipeline (lint, build, publish on main) |
| 15 | +│ └── release.yml # Release pipeline (triggered by version tags) |
| 16 | +├── charts/ |
| 17 | +│ └── <chart-name>/ # Each chart in its own directory |
| 18 | +│ ├── Chart.yaml |
| 19 | +│ ├── values.yaml |
| 20 | +│ ├── README.md # Chart-specific documentation |
| 21 | +│ ├── .helmignore |
| 22 | +│ └── templates/ |
| 23 | +├── .gitignore |
| 24 | +├── LICENSE # Apache 2.0 |
| 25 | +├── README.md |
| 26 | +└── CLAUDE.md |
| 27 | +``` |
| 28 | + |
| 29 | +## Development Commands |
| 30 | + |
| 31 | +```bash |
| 32 | +# Lint a chart |
| 33 | +helm lint charts/<chart-name> |
| 34 | + |
| 35 | +# Package a chart |
| 36 | +helm package charts/<chart-name> |
| 37 | + |
| 38 | +# Template a chart (dry-run) |
| 39 | +helm template my-release charts/<chart-name> |
| 40 | + |
| 41 | +# Validate chart with custom values |
| 42 | +helm template my-release charts/<chart-name> -f custom-values.yaml |
| 43 | +``` |
| 44 | + |
| 45 | +## CI/CD Pipelines |
| 46 | + |
| 47 | +### helm.yml (Continuous Integration) |
| 48 | +Runs on every push and PR to main: |
| 49 | +1. **lint**: Validates all charts |
| 50 | +2. **build**: Packages charts into `.tgz` artifacts |
| 51 | +3. **publish**: Pushes to GHCR (only on main branch) |
| 52 | + |
| 53 | +### release.yml (Release) |
| 54 | +Triggered by chart-specific tags using format `<chart-name>-<version>`: |
| 55 | +- Extracts chart name and version from tag |
| 56 | +- Validates chart exists and version matches `Chart.yaml` |
| 57 | +- Lints, packages, and publishes only that chart to GHCR |
| 58 | + |
| 59 | +To release a chart: |
| 60 | +```bash |
| 61 | +# 1. Update version in charts/<chart-name>/Chart.yaml |
| 62 | +# 2. Commit and push changes |
| 63 | +# 3. Create and push tag |
| 64 | +git tag rabbitmq-0.2.0 |
| 65 | +git push origin rabbitmq-0.2.0 |
| 66 | +``` |
| 67 | + |
| 68 | +**Important**: The tag version must match the version in `Chart.yaml`. |
| 69 | + |
| 70 | +## Adding a New Chart |
| 71 | + |
| 72 | +1. Create a new directory under `charts/` |
| 73 | +2. Include at minimum: `Chart.yaml`, `values.yaml`, `templates/` |
| 74 | +3. Add `README.md` with chart documentation (prerequisites, configuration, examples) |
| 75 | +4. Add `.helmignore` to exclude unnecessary files |
| 76 | +5. Update root `README.md` with the new chart in the table |
| 77 | + |
| 78 | +## Versioning |
| 79 | + |
| 80 | +- **Single source of truth**: Each chart's version is defined ONLY in its `Chart.yaml` |
| 81 | +- **No hardcoded versions in docs**: READMEs use `helm install` without `--version` flag |
| 82 | +- **Tag format**: `<chart-name>-<semver>` (e.g., `rabbitmq-0.2.0`) |
| 83 | +- The release pipeline validates that tag version matches `Chart.yaml` |
| 84 | + |
| 85 | +## Code Standards |
| 86 | + |
| 87 | +- All code, comments, and documentation must be in English |
| 88 | +- Follow Helm best practices for chart structure |
| 89 | +- Use semantic versioning in `Chart.yaml` |
| 90 | +- Include meaningful default values in `values.yaml` |
0 commit comments