From 63e80bdc2bb2734b3e5b8593533ddb5e5ed1f63a Mon Sep 17 00:00:00 2001 From: Philippe Date: Thu, 16 Dec 2021 09:09:34 +0100 Subject: [PATCH] Allowing older version of Kubernetes (<1.13) to use the latest version of the chart by making the pod parameter enableServiceLinks optional. Fix #669 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Bürgisser Signed-off-by: Philippe --- charts/grafana/Chart.yaml | 2 +- charts/grafana/templates/_pod.tpl | 2 ++ charts/grafana/values.yaml | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/grafana/Chart.yaml b/charts/grafana/Chart.yaml index e5bd923a6f..490f70497c 100644 --- a/charts/grafana/Chart.yaml +++ b/charts/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: grafana -version: 6.19.4 +version: 6.20.0 appVersion: 8.3.3 kubeVersion: "^1.8.0-0" description: The leading tool for querying and visualizing time series and metrics. diff --git a/charts/grafana/templates/_pod.tpl b/charts/grafana/templates/_pod.tpl index 7c7be774bc..458972a49c 100644 --- a/charts/grafana/templates/_pod.tpl +++ b/charts/grafana/templates/_pod.tpl @@ -125,7 +125,9 @@ imagePullSecrets: - name: {{ . }} {{- end}} {{- end }} +{{- if not .Values.enableKubeBackwardCompatibility }} enableServiceLinks: {{ .Values.enableServiceLinks }} +{{- end }} containers: {{- if .Values.sidecar.dashboards.enabled }} - name: {{ template "grafana.name" . }}-sc-dashboard diff --git a/charts/grafana/values.yaml b/charts/grafana/values.yaml index 63760c6af0..d431bb76b0 100644 --- a/charts/grafana/values.yaml +++ b/charts/grafana/values.yaml @@ -788,3 +788,6 @@ networkPolicy: ## - {key: role, operator: In, values: [frontend]} ## explicitNamespacesSelector: {} + +# Enable backward compatibility of kubernetes where version below 1.13 doesn't have the enableServiceLinks option +enableKubeBackwardCompatibility: false