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 @@ -61,6 +61,10 @@ test-style: setup
61
61
@echo " ==> Running static validations and linters <=="
62
62
# Setting timeout to 5m as deafult is 1m
63
63
golangci-lint run --timeout=5m
64
+ # Run helm lint tests
65
+ helm lint --strict charts/secrets-store-csi-driver
66
+ helm lint --strict manifest_staging/charts/secrets-store-csi-driver
67
+
64
68
sanity-test :
65
69
go test -v ./test/sanity
66
70
build : setup
76
80
setup : clean
77
81
@echo " Setup..."
78
82
$Q go env
83
+ $(MAKE ) install-helm
79
84
80
85
ifndef HAS_GOLANGCI
81
86
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.30.0
@@ -132,7 +137,7 @@ endif
132
137
133
138
.PHONY : install-helm
134
139
install-helm :
135
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
140
+ helm version --short | grep -q v3 || ( curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash)
136
141
137
142
.PHONY : e2e-teardown
138
143
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