|
| 1 | +# Helm Charts |
| 2 | + |
| 3 | +This directory contains Helm charts for nuts-knooppunt and its components. |
| 4 | + |
| 5 | +## Available Charts |
| 6 | + |
| 7 | +- `helm-nuts-knooppunt` - Main chart with fhir, pep, and nuts-node dependencies |
| 8 | +- `helm-fhir` - HAPI FHIR server (standalone) |
| 9 | +- `helm-pep` - Policy Enforcement Point (standalone) |
| 10 | + |
| 11 | +## Version Management |
| 12 | + |
| 13 | +Different charts have different versioning strategies: |
| 14 | + |
| 15 | +- **helm-nuts-knooppunt**: Automatic versioning (set by git tag) |
| 16 | +- **helm-fhir**: Manual versioning (set in Chart.yaml) |
| 17 | +- **helm-pep**: Manual versioning (set in Chart.yaml) |
| 18 | + |
| 19 | +**Why automatic for nuts-knooppunt?** |
| 20 | + |
| 21 | +This chart is only published on git tags, which by definition indicate app changes. Automatically coupling chart version to git tag simplifies versioning: `helm install --version 0.2.0` always deploys app v0.2.0. |
| 22 | + |
| 23 | +**Why manual for fhir/pep?** |
| 24 | + |
| 25 | +These components have independent release cycles from nuts-knooppunt: |
| 26 | +- **PEP**: Reference implementation, changes infrequently |
| 27 | +- **FHIR**: Third-party HAPI server, follows HAPI release schedule |
| 28 | + |
| 29 | +Following Helm best practices (Bitnami, Prometheus, etc.), chart version is managed manually and tracks chart development separately from app version. This allows: |
| 30 | +- Chart bug fixes without app version changes (0.1.0 → 0.1.1) |
| 31 | +- App upgrades with chart version bump (0.2.0 → 0.3.0 when upgrading HAPI 7.2.0 → 7.4.0) |
| 32 | +- Flexibility to release chart improvements independent of app releases |
| 33 | + |
| 34 | +### Releasing nuts-knooppunt |
| 35 | + |
| 36 | +The nuts-knooppunt chart version is coupled to the application version. |
| 37 | + |
| 38 | +1. Go to GitHub → [Releases](https://github.com/nuts-foundation/nuts-knooppunt/releases) → "Draft a new release" |
| 39 | +2. Choose a tag (e.g., `v0.2.0`) or create a new one |
| 40 | +3. Add release title and notes describing changes |
| 41 | +4. Click "Publish release" |
| 42 | + |
| 43 | +GitHub Actions automatically: |
| 44 | +- Extracts version from tag (`v0.2.0` → `0.2.0`) |
| 45 | +- Updates `helm/nuts-knooppunt/Chart.yaml` with `version` and `appVersion` |
| 46 | +- Pulls dependencies (helm-fhir, helm-pep, nuts-node-chart) from their registries |
| 47 | +- Packages and publishes helm-nuts-knooppunt to GHCR |
| 48 | + |
| 49 | +**Note:** The workflow runs on any git tag matching `v*`. |
| 50 | + |
| 51 | +**Result:** `helm install --version 0.2.0` deploys exactly application v0.2.0. |
| 52 | + |
| 53 | +### Updating helm-fhir or helm-pep |
| 54 | + |
| 55 | +These charts are published automatically when their directories change on the `main` branch. |
| 56 | + |
| 57 | +**⚠️ CRITICAL: Always bump chart version when changing image tags or config. OCI registries are immutable - publishing the same version twice overwrites the existing chart.** |
| 58 | + |
| 59 | +**Semantic versioning guide:** |
| 60 | +- **Patch (0.1.0 → 0.1.1)**: Chart bug fixes, config tweaks, same app version |
| 61 | +- **Minor (0.1.0 → 0.2.0)**: New app version, backwards compatible |
| 62 | +- **Major (0.1.0 → 1.0.0)**: Breaking chart changes (renamed values, removed features) |
| 63 | + |
| 64 | +**Example: Upgrading HAPI FHIR** |
| 65 | + |
| 66 | +1. Update `helm/fhir/Chart.yaml`: |
| 67 | + ```yaml |
| 68 | + version: 0.2.0 # Bump minor (new HAPI version) |
| 69 | + appVersion: "7.4.0" # New HAPI version |
| 70 | + ``` |
| 71 | +
|
| 72 | +2. Update `helm/fhir/values.yaml`: |
| 73 | + ```yaml |
| 74 | + image: |
| 75 | + tag: v7.4.0 # New HAPI FHIR image |
| 76 | + ``` |
| 77 | + |
| 78 | +3. Update `helm/nuts-knooppunt/Chart.yaml` dependency: |
| 79 | + ```yaml |
| 80 | + dependencies: |
| 81 | + - name: helm-fhir |
| 82 | + version: "0.2.0" # Reference new chart version |
| 83 | + ``` |
| 84 | + |
| 85 | +4. Create PR, merge to `main` → workflow automatically publishes helm-fhir:0.2.0 |
| 86 | + |
| 87 | +5. Create new nuts-knooppunt release (e.g., `v0.2.1`) to include the new FHIR version |
| 88 | + |
| 89 | +**Example: Chart config fix (no HAPI upgrade)** |
| 90 | + |
| 91 | +1. Update `helm/fhir/Chart.yaml`: |
| 92 | + ```yaml |
| 93 | + version: 0.1.1 # Bump patch (config fix only) |
| 94 | + appVersion: "7.2.0" # Same HAPI version |
| 95 | + ``` |
| 96 | + |
| 97 | +2. Fix config in templates or values.yaml |
| 98 | + |
| 99 | +3. Merge to `main` → workflow publishes helm-fhir:0.1.1 |
| 100 | + |
| 101 | +**Same process for helm-pep**: Always bump chart version when changing anything. |
| 102 | + |
| 103 | +## Published Charts |
| 104 | + |
| 105 | +Charts are available at GitHub Container Registry: |
| 106 | +``` |
| 107 | +oci://ghcr.io/nuts-foundation/helm-nuts-knooppunt |
| 108 | +oci://ghcr.io/nuts-foundation/helm-fhir |
| 109 | +oci://ghcr.io/nuts-foundation/helm-pep |
| 110 | +``` |
| 111 | + |
| 112 | +## Installation |
| 113 | + |
| 114 | +```bash |
| 115 | +# Install specific release version |
| 116 | +helm install my-knooppunt oci://ghcr.io/nuts-foundation/helm-nuts-knooppunt --version 0.2.0 |
| 117 | +
|
| 118 | +# Override specific values |
| 119 | +helm install my-knooppunt oci://ghcr.io/nuts-foundation/helm-nuts-knooppunt \ |
| 120 | + --version 0.2.0 \ |
| 121 | + --set replicaCount=3 |
| 122 | +
|
| 123 | +# Use custom image tag (not recommended - breaks version coupling) |
| 124 | +helm install my-knooppunt oci://ghcr.io/nuts-foundation/helm-nuts-knooppunt \ |
| 125 | + --version 0.2.0 \ |
| 126 | + --set image.tag=custom-build |
| 127 | +``` |
| 128 | + |
| 129 | +## Development |
| 130 | + |
| 131 | +For local development and testing: |
| 132 | + |
| 133 | +```bash |
| 134 | +# Package charts locally |
| 135 | +helm package helm/fhir -d .helm-packages |
| 136 | +helm package helm/pep -d .helm-packages |
| 137 | +helm package helm/nuts-knooppunt -d .helm-packages |
| 138 | +
|
| 139 | +# Install from local package |
| 140 | +helm install my-knooppunt .helm-packages/helm-nuts-knooppunt-*.tgz |
| 141 | +``` |
0 commit comments