Skip to content

Commit

Permalink
fix(charts): int cast in version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingdon Barrett committed Jul 11, 2018
1 parent 040e085 commit cbc7e40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/monitor/templates/_helpers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Set apiVersion based on Kubernetes version
*/}}
{{- define "rbacAPIVersion" -}}
{{- if lt .Capabilities.KubeVersion.Minor "6" -}}
{{- if (lt (int (.Capabilities.KubeVersion.Minor)) 6) -}}
rbac.authorization.k8s.io/v1alpha1
{{- else if (and (ge .Capabilities.KubeVersion.Minor "6") (le .Capabilities.KubeVersion.Minor "7")) -}}
{{- else if (and (ge (int (.Capabilities.KubeVersion.Minor)) 6) (le (int (.Capabilities.KubeVersion.Minor)) 7)) -}}
rbac.authorization.k8s.io/v1beta1
{{- else -}}
rbac.authorization.k8s.io/v1
Expand Down

0 comments on commit cbc7e40

Please sign in to comment.