Check for supporting API instead of specific K8S version
Signed-off-by: Tim Jones <tim@spotahome.com>
This commit is contained in:
1 parent
eadb438ca1
commit
bdf42283eb
1 file changed
+1
-3
@@ -1,4 +1,3 @@
|
||||
{{- if and .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
@@ -23,7 +22,7 @@ spec:
|
||||
command:
|
||||
- ./kubectl
|
||||
- get
|
||||
{{- if printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor | semverCompare ">=1.7" }}
|
||||
{{- if .Capabilities.APIVersions.Has "apiextensions.k8s.io/v1beta1" }}
|
||||
- customresourcedefinitions
|
||||
- clusters.rook.io
|
||||
- pools.rook.io
|
||||
@@ -42,4 +41,3 @@ spec:
|
||||
{{- if .Values.rbacEnable }}
|
||||
serviceAccountName: rook-operator
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in new issue
Block a user