-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linting and validation for Helm Charts
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
1 parent
dde92ae
commit 45b76d7
Showing
1 changed file
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|