From 3d5d36310080492ae6a36c65054ef64fd102e6a2 Mon Sep 17 00:00:00 2001 From: Philip Schmid Date: Wed, 21 Aug 2024 00:21:30 +0200 Subject: [PATCH] Refactored Helm lint values override Signed-off-by: Philip Schmid --- install/kubernetes/Makefile | 12 ++++++------ install/kubernetes/helm_values_override.yaml | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 install/kubernetes/helm_values_override.yaml diff --git a/install/kubernetes/Makefile b/install/kubernetes/Makefile index 05e215d51fb..32c0d129327 100644 --- a/install/kubernetes/Makefile +++ b/install/kubernetes/Makefile @@ -12,19 +12,20 @@ KUBECONFORM_VERSION := v0.6.7 PYTHON := python3 PIPENV := pipenv K8S_VERSION := master +HELM_VALUES_OVERRIDE := "helm_values_override.yaml" REPO_ROOT := $(shell git rev-parse --show-toplevel) TETRAGON_CHART := tetragon CRDS := $(REPO_ROOT)/pkg/k8s/apis/cilium.io/client/crds/v1alpha1 JSON_SCHEMAS := $(REPO_ROOT)/install/kubernetes/schemas -HELM ?= docker run --rm -v $(CURDIR)/$(TETRAGON_CHART):/apps $(HELM_IMAGE) +HELM ?= docker run --rm -v $(CURDIR)/$(TETRAGON_CHART):/apps -v $(CURDIR)/$(HELM_VALUES_OVERRIDE):/$(HELM_VALUES_OVERRIDE) $(HELM_IMAGE) .PHONY: all all: deps $(TETRAGON_CHART)/crds-yaml lint docs openapi2jsonschema.py generate-jsonschemas kubeconform .PHONY: deps -deps: +deps: $(HELM) dependency update . .PHONY: lint @@ -66,9 +67,8 @@ kubeconform: @echo "## Testing Helm chart: \"$(TETRAGON_CHART)\"" $(HELM) template $(TETRAGON_CHART) . \ -f values.yaml \ - --set crds.installMethod=helm \ - --set tracingPolicies.default.enabled=true |\ - docker run --rm -i -v $(JSON_SCHEMAS):/schemas $(KUBECONFORM_IMAGE) \ + -f /$(HELM_VALUES_OVERRIDE) \ + | docker run --rm -i -v $(JSON_SCHEMAS):/schemas $(KUBECONFORM_IMAGE) \ -summary \ -verbose \ -schema-location default \ @@ -76,4 +76,4 @@ kubeconform: -skip CustomResourceDefinition \ -strict \ -kubernetes-version $(K8S_VERSION) - @echo "" \ No newline at end of file + @echo "" diff --git a/install/kubernetes/helm_values_override.yaml b/install/kubernetes/helm_values_override.yaml new file mode 100644 index 00000000000..2465d760e85 --- /dev/null +++ b/install/kubernetes/helm_values_override.yaml @@ -0,0 +1,2 @@ +crds: + installMethod: helm \ No newline at end of file