File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
manifest_staging/charts/secrets-store-csi-driver/templates Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ test-style: setup
55
55
@echo " ==> Running static validations and linters <=="
56
56
# Setting timeout to 5m as deafult is 1m
57
57
golangci-lint run --timeout=5m
58
+ # Run helm lint tests
59
+ helm lint --strict charts/secrets-store-csi-driver
60
+ helm lint --strict manifest_staging/charts/secrets-store-csi-driver
61
+
58
62
sanity-test :
59
63
go test -v ./test/sanity
60
64
build : setup
70
74
setup : clean
71
75
@echo " Setup..."
72
76
$Q go env
77
+ $(MAKE ) install-helm
73
78
74
79
ifndef HAS_GOLANGCI
75
80
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.30.0
@@ -126,7 +131,7 @@ endif
126
131
127
132
.PHONY : install-helm
128
133
install-helm :
129
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
134
+ helm version --short | grep -q v3 || ( curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash)
130
135
131
136
.PHONY : e2e-teardown
132
137
e2e-teardown :
Original file line number Diff line number Diff line change @@ -32,3 +32,14 @@ labels:
32
32
app: { { template " sscd.name" . } }
33
33
helm.sh/chart: "{ { .Chart.Name } }-{ { .Chart.Version | replace " +" " _" } }"
34
34
{ {- end -} }
35
+
36
+ { {/*
37
+ Return the appropriate apiVersion for CSIDriver.
38
+ */} }
39
+ { {- define " csidriver.apiVersion" -} }
40
+ { {- if semverCompare " >=1.18-0" .Capabilities.KubeVersion.Version } }
41
+ { {- print " storage.k8s.io/v1" -} }
42
+ { {- else -} }
43
+ { {- print " storage.k8s.io/v1beta1" -} }
44
+ { {- end -} }
45
+ { {- end -} }
Original file line number Diff line number Diff line change 1
- apiVersion : storage.k8s.io/v1beta1
1
+ apiVersion : {{ template "csidriver.apiVersion" . }}
2
2
kind : CSIDriver
3
3
metadata :
4
4
name : secrets-store.csi.k8s.io
You can’t perform that action at this time.
0 commit comments