From db7b1db00204672e20755d42857d6c00efd35cdb Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Tue, 3 Apr 2018 12:46:06 -0400 Subject: [PATCH] Fix for version comparions from strings to semver (#4599) * Fix for version comparions from strings to semver See #3002 for more detail * Include pre-releases in the semver ranges This is important when testing against alpha and beta builds of Kubernetes along with environments that use pre-releases to denote things other than pre-releases (e.g., gke denotes the environment with a pre-releases) --- stable/fluent-bit/Chart.yaml | 2 +- stable/fluent-bit/templates/_helpers.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/fluent-bit/Chart.yaml b/stable/fluent-bit/Chart.yaml index ffa6418b68..06fb7470e5 100755 --- a/stable/fluent-bit/Chart.yaml +++ b/stable/fluent-bit/Chart.yaml @@ -1,5 +1,5 @@ name: fluent-bit -version: 0.2.13 +version: 0.2.14 appVersion: 0.12.15 description: Fast and Lightweight Log/Data Forwarder for Linux, BSD and OSX keywords: diff --git a/stable/fluent-bit/templates/_helpers.tpl b/stable/fluent-bit/templates/_helpers.tpl index 7518683c80..938b97150d 100644 --- a/stable/fluent-bit/templates/_helpers.tpl +++ b/stable/fluent-bit/templates/_helpers.tpl @@ -19,7 +19,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this Return the appropriate apiVersion for RBAC APIs. */}} {{- define "rbac.apiVersion" -}} -{{- if ge .Capabilities.KubeVersion.Minor "8" -}} +{{- if semverCompare "^1.8-0" .Capabilities.KubeVersion.GitVersion -}} "rbac.authorization.k8s.io/v1" {{- else -}} "rbac.authorization.k8s.io/v1beta1"