Skip to content

Commit b924b33

Browse files
authored
Merge pull request #72 from kingdonb/patch-integer-cast
fix(charts): int cast in version comparison
2 parents 2bf9a23 + 7fadd87 commit b924b33

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

charts/controller/templates/_helpers.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Set apiVersion based on Kubernetes version
33
*/}}
44
{{- define "rbacAPIVersion" -}}
5-
{{- if lt .Capabilities.KubeVersion.Minor "6" -}}
5+
{{- if (lt (int (.Capabilities.KubeVersion.Minor)) 6) -}}
66
rbac.authorization.k8s.io/v1alpha1
7-
{{- else if (and (ge .Capabilities.KubeVersion.Minor "6") (le .Capabilities.KubeVersion.Minor "7")) -}}
7+
{{- else if (and (ge (int (.Capabilities.KubeVersion.Minor)) 6) (le (int (.Capabilities.KubeVersion.Minor)) 7)) -}}
88
rbac.authorization.k8s.io/v1beta1
99
{{- else -}}
1010
rbac.authorization.k8s.io/v1

0 commit comments

Comments
 (0)