test(helm): lint helm charts with ct (#1403)

This commit is contained in:
Thibault Martin
2026-05-26 06:22:10 +00:00
committed by GitHub
parent f56aa99869
commit ee9c24333d
9 changed files with 87 additions and 0 deletions
+21
View File
@@ -26,6 +26,27 @@ jobs:
path: ${{ github.event_path }}
retention-days: 7
chart-validation:
name: Helm Chart Validation
if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install Helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0
- name: Install chart-testing
uses: helm/chart-testing-action@6ec842c01de15ebb84c8627d2744a0c2f2755c9f # v2.8.0
- name: Run ct lint
run: ct lint --config deploy/helm/ct.yaml
migration-check:
name: Flyway Migration Check
if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
+5
View File
@@ -0,0 +1,5 @@
target-branch: develop
chart-dirs:
- deploy/helm
all: true
validate-maintainers: false
+2
View File
@@ -0,0 +1,2 @@
# Exclude CI tests
ci/
@@ -0,0 +1 @@
# Default chart path
@@ -0,0 +1,8 @@
# Pre-existing PVC claims
# Database: bundled MariaDB
# Persistence: both volumes use existingClaim, PVC templates suppressed
persistence:
dataVolume:
existingClaim: my-existing-data-claim
booksVolume:
existingClaim: my-existing-books-claim
@@ -0,0 +1,17 @@
# External database with credentials from an existing Kubernetes secret.
# Database: external, all connection values come from secretKeyRef
# Persistence: both PVCs enabled, created by chart
mariadb:
enabled: false
externalDatabase:
enabled: true
host: ""
password: ""
existingSecret:
enabled: true
secretName: db-credentials
hostnameKey: db-host
portKey: db-port
usernameKey: db-user
passwordKey: db-pass
databaseKey: db-name
@@ -0,0 +1,12 @@
# External database with plain-text credentials.
# Database: external credentials in env vars
# Persistence: both PVCs enabled, created by chart
mariadb:
enabled: false
externalDatabase:
enabled: true
host: my-cluster
port: 3306
username: app_user
password: my-password
database: grimmory
@@ -0,0 +1,13 @@
# Ingress enabled on top of the default configuration.
# Database: bundled MariaDB
# Persistence: both PVCs enabled, created by chart
ingress:
enabled: true
className: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: grimmory.example.com
paths:
- path: /
pathType: Prefix
@@ -0,0 +1,8 @@
# No persistent volumes — all storage disabled.
# Database: bundled MariaDB
# Persistence: both PVCs disabled
persistence:
dataVolume:
enabled: false
booksVolume:
enabled: false