File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 3737 - uses : alexellis/arkade-get@master
3838 with :
3939 kubeval : latest
40+ kubeconform : latset
4041 # - uses: lra/setup-kubeval@v1
4142 # with:
4243 # version: v0.16.1
Original file line number Diff line number Diff line change @@ -15,7 +15,37 @@ for chart in $ROOT/chart/*; do
1515done
1616
1717if [ $status != 0 ]; then
18- echo -e " Failures:\n$msg "
18+ echo -e " Helm lint failures:\n$msg "
19+ exit $status
1920fi
2021
21- exit $status
22+
23+ # Run kubeconform on all charts as an extra measure
24+
25+ for chart in $ROOT /chart/* ; do
26+ name=$( basename $chart )
27+ echo -e " \n\nKubeconform $name "
28+ # Use ignore-missing-schemas to avoid errors with missing CRD schemas for the openfaas chart only
29+
30+ echo " Using kubeconform on $name - $chart "
31+
32+ if [ " $name " == " openfaas" ]; then
33+ helm template chart/$name -f ./chart/openfaas/values-pro.yaml | kubeconform --ignore-missing-schemas -summary --verbose --strict
34+ else
35+ helm template chart/$name | kubeconform -summary --verbose --strict
36+ fi
37+
38+ if [ $? != 0 ]; then
39+ status=1
40+ msg=" $msg \n$name "
41+ fi
42+ done
43+
44+ if [ $status != 0 ]; then
45+ echo -e " Kubeconform failures:\n$msg "
46+ exit $status
47+ fi
48+
49+ echo -e " \n\nAll charts passed linting and kubeconform validation"
50+ exit 0
51+
You can’t perform that action at this time.
0 commit comments