From cf54816d531d33c8f81bd27eb9fffda46943c239 Mon Sep 17 00:00:00 2001 From: Santiago del Castillo Date: Mon, 18 Dec 2017 15:39:04 -0300 Subject: [PATCH] add support for rbac v1 API endpoint kubernetes >=1.8 moved rbac API endpoint to v1 --- charts/builder/templates/_helpers.tmpl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/charts/builder/templates/_helpers.tmpl b/charts/builder/templates/_helpers.tmpl index 0b9deb0..c7f92fe 100644 --- a/charts/builder/templates/_helpers.tmpl +++ b/charts/builder/templates/_helpers.tmpl @@ -2,9 +2,11 @@ Set apiVersion based on Kubernetes version */}} {{- define "rbacAPIVersion" -}} -{{- if ge .Capabilities.KubeVersion.Minor "6" -}} +{{- if lt .Capabilities.KubeVersion.Minor "6" -}} +rbac.authorization.k8s.io/v1alpha1 +{{- else if (and (ge .Capabilities.KubeVersion.Minor "6") (le .Capabilities.KubeVersion.Minor "7")) -}} rbac.authorization.k8s.io/v1beta1 {{- else -}} -rbac.authorization.k8s.io/v1alpha1 +rbac.authorization.k8s.io/v1 {{- end -}} {{- end -}}