Skip to content
Snippets Groups Projects
Commit 76d7cc34 authored by Damien Grisonnet's avatar Damien Grisonnet
Browse files

validate: run kubeconform on supported versions


Instead of running kubeconform on only one version of Kubernetes, it
would be better to run it against the 2 latests versions of Kubernetes
that kube-prometheus supports, so that the validation will be in line
with our support policy.

Signed-off-by: default avatarDamien Grisonnet <dgrisonn@redhat.com>
parent fc136a84
No related merge requests found
...@@ -13,8 +13,6 @@ TOOLING=$(EMBEDMD_BIN) $(JB_BIN) $(GOJSONTOYAML_BIN) $(JSONNET_BIN) $(JSONNETLIN ...@@ -13,8 +13,6 @@ TOOLING=$(EMBEDMD_BIN) $(JB_BIN) $(GOJSONTOYAML_BIN) $(JSONNET_BIN) $(JSONNETLIN
JSONNETFMT_ARGS=-n 2 --max-blank-lines 2 --string-style s --comment-style s JSONNETFMT_ARGS=-n 2 --max-blank-lines 2 --string-style s --comment-style s
KUBE_VERSION?="1.20.0"
all: generate fmt test all: generate fmt test
.PHONY: clean .PHONY: clean
...@@ -43,7 +41,16 @@ update: $(JB_BIN) ...@@ -43,7 +41,16 @@ update: $(JB_BIN)
$(JB_BIN) update $(JB_BIN) update
.PHONY: validate .PHONY: validate
validate: crdschemas manifests $(KUBECONFORM_BIN) validate: validate-1.21 validate-1.22
validate-1.21:
KUBE_VERSION=1.21.1 $(MAKE) kubeconform
validate-1.22:
KUBE_VERSION=1.22.0 $(MAKE) kubeconform
.PHONY: kubeconform
kubeconform: crdschemas manifests $(KUBECONFORM_BIN)
$(KUBECONFORM_BIN) -kubernetes-version $(KUBE_VERSION) -schema-location 'default' -schema-location 'crdschemas/{{ .ResourceKind }}.json' -skip CustomResourceDefinition manifests/ $(KUBECONFORM_BIN) -kubernetes-version $(KUBE_VERSION) -schema-location 'default' -schema-location 'crdschemas/{{ .ResourceKind }}.json' -skip CustomResourceDefinition manifests/
.PHONY: fmt .PHONY: fmt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment