Skip to content

Commit cbc7e40

Browse files
author
Kingdon Barrett
committed
fix(charts): int cast in version comparison
1 parent 040e085 commit cbc7e40

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

charts/monitor/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)