Skip to content

Commit 78a86c2

Browse files
Merge pull request #280 from SgtCoDFish/kubeconform
Add kubeconform verification of helm charts
2 parents 17f1b47 + 272564c commit 78a86c2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

modules/helm/helm.mk

+8
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,11 @@ verify-helm-lint: $(helm_chart_archive) | $(NEEDS_HELM)
178178
$(HELM) lint $(helm_chart_archive)
179179

180180
shared_verify_targets_dirty += verify-helm-lint
181+
182+
.PHONY: verify-helm-kubeconform
183+
## Verify that the Helm chart passes a strict check using kubeconform
184+
## @category [shared] Generate/ Verify
185+
verify-helm-kubeconform: $(helm_chart_archive) | $(NEEDS_KUBECONFORM)
186+
$(HELM) template kubeconform-template-do-not-use $< | $(KUBECONFORM) -strict
187+
188+
shared_verify_targets_dirty += verify-helm-kubeconform

modules/tools/00_mod.mk

+3
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ tools += preflight=1.12.1
138138
tools += gci=v0.13.6
139139
# https://github.com/google/yamlfmt/releases
140140
tools += yamlfmt=v0.16.0
141+
# https://github.com/yannh/kubeconform/releases
142+
tools += kubeconform=v0.6.7
141143

142144
# https://pkg.go.dev/k8s.io/code-generator/cmd?tab=versions
143145
K8S_CODEGEN_VERSION := v0.32.3
@@ -345,6 +347,7 @@ go_dependencies += operator-sdk=github.com/operator-framework/operator-sdk/cmd/o
345347
go_dependencies += gh=github.com/cli/cli/v2/cmd/gh
346348
go_dependencies += gci=github.com/daixiang0/gci
347349
go_dependencies += yamlfmt=github.com/google/yamlfmt/cmd/yamlfmt
350+
go_dependencies += kubeconform=github.com/yannh/kubeconform/cmd/kubeconform
348351

349352
#################
350353
# go build tags #

0 commit comments

Comments
 (0)