-
Notifications
You must be signed in to change notification settings - Fork 4
Helm deployments #1156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Carl Sixsmith (carlsixsmith-moj)
merged 25 commits into
develop
from
feature/ci-workflow
Jun 23, 2026
Merged
Helm deployments #1156
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c4f1f96
Environment selection
samgibsonmoj 5b254bf
Helm deployments (with hmpps charts)
samgibsonmoj c1c5239
Pin helm setup
samgibsonmoj ed25300
Add helm validation ci step
samgibsonmoj 51b9bbc
Health checks for redis/rabbit + templates
samgibsonmoj a986944
Bump sdk
samgibsonmoj a82a3dd
Add flag for enabling/disabling prometheus alerts
samgibsonmoj 9da8e74
Fix for recreate strategy - most override rolling updates
samgibsonmoj b9614d3
Chart cleanup
samgibsonmoj bdb96e3
Add gating to manifests
samgibsonmoj 8b90b6d
Add --wait-for-jobs to wait until completion
samgibsonmoj a7bc4fb
Cleanup prometheus alerts (temporarily disabled)
samgibsonmoj 332ec6d
ModSec: enable WAF (detection only)
samgibsonmoj 5d9ddd3
use pods instead of jobs for migrate/seeding
samgibsonmoj e0116b0
Remove/ignore Chart.lock
samgibsonmoj 57b8dc6
Use CP's modsec defaults
samgibsonmoj 345acaf
Translate port-forward-deployment to helm
samgibsonmoj 90e50d1
Remove readme
samgibsonmoj 80a69ee
Reset global.json
samgibsonmoj d4c3c67
Pin .NET runtime/sdk version in Dockerfile
samgibsonmoj 57085f2
Pin dotnet container publishes to immutable digests
samgibsonmoj f4b2c40
Remove redundant sqlpackage install
samgibsonmoj b0d90fe
Add dockerfile's to individual projects
samgibsonmoj 328a4c8
Update helper comment
samgibsonmoj d69fa4a
Explicit port forward deploy for environments, excluding non-dev envs
samgibsonmoj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| .git | ||
| .github | ||
| **/bin | ||
| **/obj | ||
| test | ||
| **/.vs | ||
| **/.idea | ||
| **/.vscode | ||
| *.user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| name: Validate Helm | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - helm_deploy/** | ||
| - .github/workflows/validate-helm.yml | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| validate: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
|
|
||
| - name: Setup Helm | ||
| uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1 | ||
| with: | ||
| version: v3.21.2 | ||
|
|
||
| - name: Build chart dependencies | ||
| run: | | ||
| helm repo add hmpps-helm-charts https://ministryofjustice.github.io/hmpps-helm-charts | ||
| helm dependency update ./helm_deploy/cats | ||
|
|
||
| - name: Lint and template all environments | ||
| run: | | ||
| set -euo pipefail | ||
| for env in dev staging production; do | ||
| echo "::group::helm lint ($env)" | ||
| helm lint ./helm_deploy/cats --values ./helm_deploy/cats/values-$env.yaml | ||
| echo "::endgroup::" | ||
|
|
||
| echo "::group::helm template app ($env)" | ||
| # Render with placeholder per-deploy values that CI normally supplies via --set, | ||
| # so templating exercises the same paths as a real deploy. | ||
| helm template cats ./helm_deploy/cats \ | ||
| --namespace "cfocats-$env" \ | ||
| --values ./helm_deploy/cats/values-$env.yaml \ | ||
| --set app.enabled=true \ | ||
| --set worker.enabled=true \ | ||
| --set rabbitmq.enabled=true \ | ||
| --set redis.enabled=true \ | ||
| --set serviceAccountName="cfocats-$env" \ | ||
| --set app.serviceAccountName="cfocats-$env" \ | ||
| --set app.image.repository="example/cfocats" \ | ||
| --set app.image.tag="cats-validate" \ | ||
| --set worker.serviceAccountName="cfocats-$env" \ | ||
| --set worker.image.repository="example/cfocats" \ | ||
| --set worker.image.tag="worker-validate" \ | ||
| > /dev/null | ||
| echo "::endgroup::" | ||
|
|
||
| echo "::group::helm template migrate ($env)" | ||
| helm template cats-migrate ./helm_deploy/cats \ | ||
| --namespace "cfocats-$env" \ | ||
| --values ./helm_deploy/cats/values-$env.yaml \ | ||
| --set migrator.enabled=true \ | ||
| --set serviceAccountName="cfocats-$env" \ | ||
| --set migrator.image.repository="example/cfocats" \ | ||
| --set migrator.image.tag="migrator-validate" \ | ||
| > /dev/null | ||
| echo "::endgroup::" | ||
|
|
||
| echo "::group::helm template seed ($env)" | ||
| helm template cats-seed ./helm_deploy/cats \ | ||
| --namespace "cfocats-$env" \ | ||
| --values ./helm_deploy/cats/values-$env.yaml \ | ||
| --set seeder.enabled=true \ | ||
| --set serviceAccountName="cfocats-$env" \ | ||
| --set seeder.image.repository="example/cfocats" \ | ||
| --set seeder.image.tag="seeder-validate" \ | ||
| > /dev/null | ||
| echo "::endgroup::" | ||
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| .git/ | ||
| .gitignore | ||
| *.tmproj | ||
| *.bak | ||
| *.orig | ||
| .vscode/ | ||
| .idea/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| apiVersion: v2 | ||
| name: cats | ||
| description: | | ||
| HMPPS - Case Assessment and Tracking System (CATS) | ||
| type: application | ||
|
|
||
| # Version of this chart. Bump on every change to the chart/values. | ||
| version: "0.1.0" | ||
|
|
||
| # Mirrors the application version; the running image is selected via image tags at deploy time. | ||
| appVersion: "0.1.0" | ||
|
|
||
| dependencies: | ||
| # Web tier (Blazor Server UI) — ingress, SignalR sticky sessions, multiple replicas. | ||
| - name: generic-service | ||
| alias: app | ||
| version: "3.17.2" | ||
| repository: https://ministryofjustice.github.io/hmpps-helm-charts | ||
| condition: app.enabled | ||
|
|
||
| # Background worker (Quartz jobs) — single instance, no ingress. | ||
| - name: generic-service | ||
| alias: worker | ||
| version: "3.17.2" | ||
| repository: https://ministryofjustice.github.io/hmpps-helm-charts | ||
| condition: worker.enabled | ||
|
|
||
| # todo: enable prometheus alerts | ||
| # https://user-guide.cloud-platform.service.justice.gov.uk/documentation/monitoring-an-app/how-to-create-alarms.html#creating-your-own-custom-alerts | ||
| # uncomment and re-run `helm dependency update ./helm_deploy/cats` to fetch it. | ||
| # - name: generic-prometheus-alerts | ||
| # version: "1.17.1" | ||
| # repository: https://ministryofjustice.github.io/hmpps-helm-charts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| {{/* | ||
| Environment variables that expose the MSSQL connection details from the | ||
| rds-mssql-instance-output namespace secret, plus the composed connection string. | ||
| Used by the migrator and seeder Pods. | ||
| */}} | ||
| {{- define "cats.databaseEnv" -}} | ||
| - name: DATABASE_ADDRESS | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: rds-mssql-instance-output | ||
| key: rds_instance_address | ||
| - name: DATABASE_USERNAME | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: rds-mssql-instance-output | ||
| key: database_username | ||
| - name: DATABASE_PASSWORD | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: rds-mssql-instance-output | ||
| key: database_password | ||
| - name: ConnectionStrings__CatsDb | ||
| value: {{ .Values.connectionStrings.catsDb | quote }} | ||
| {{- end -}} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.