From 3fa159a635a6d6cd3b04149566d14c355f15edee Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Sat, 30 Jun 2018 14:04:45 -0400 Subject: [PATCH] fix(charts): int cast in version comparison --- charts/router/templates/_helpers.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/router/templates/_helpers.tmpl b/charts/router/templates/_helpers.tmpl index c7f92fe..f2541e3 100644 --- a/charts/router/templates/_helpers.tmpl +++ b/charts/router/templates/_helpers.tmpl @@ -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