Skip to content

Commit

Permalink
Add linting and validation for Helm Charts
Browse files Browse the repository at this point in the history
Add linting for Helm Charts via helm, and export the Deployment and
StatefulSet type deployments and pass through kubeconform to validate
the Kubernetes resources are valid for the latest version of kubernetes.
  • Loading branch information
jonathanio committed Aug 9, 2024
1 parent dde92ae commit 45b76d7
Showing 1 changed file with 44 additions and 3 deletions.
47 changes: 44 additions & 3 deletions .github/workflows/integrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ jobs:
name: go-cover
flags: unit-tests

linting:
name: Linting
go-linting:
name: Go Linting
runs-on: ubuntu-latest
needs:
- testing
Expand All @@ -106,11 +106,52 @@ jobs:
with:
version: latest

helm-linting:
name: Helm Linting
runs-on: ubuntu-latest
needs:
- testing
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Set up Helm
uses: azure/[email protected]

- name: Set up Kubeconform
uses: bmuschko/setup-kubeconform@v1
with:
kubeconform-version: '0.6.7'

- name: Lint the Helm Chart
run: |-
# helm lint
helm lint charts/dashboard
- name: Validate the Deployment
run: |-
# helm lint
helm template -n default dashboard charts/dashboard \
--set serviceAccount.create=true \
--set networkPolicy.create=true \
--set serviceMonitor.create=true \
| kubeconform -verbose -output pretty -summary
- name: Validate the StatefulSet
run: |-
# helm lint
helm template -n default dashboard charts/dashboard \
--set serviceAccount.create=true \
--set networkPolicy.create=true \
--set serviceMonitor.create=true \
--set persistentVolumeClaim.create=true \
| kubeconform -verbose -output pretty -summary
build:
name: Build
runs-on: ubuntu-latest
needs:
- linting
- go-linting
- testing
steps:
- name: Checkout the repository
Expand Down

0 comments on commit 45b76d7

Please sign in to comment.