From f965844fda6551cc7e26e3f2ec091197d576f5db Mon Sep 17 00:00:00 2001 From: Bastian Hofmann Date: Wed, 5 Feb 2020 22:21:54 +0100 Subject: [PATCH] [stable/grafana] Make watch METHOD environment variable of dashboard sidecar container configurable (#20558) Starting with kiwigrid/k8s-sidecar:0.1.75 METHOD also supports a SLEEP mode that lists all ConfigMaps and sleeps for 60s. This fixes issues where long running watch requests may break because of assumptions in software defined network solutions. See also https://github.com/kiwigrid/k8s-sidecar/pull/52 Signed-off-by: Bastian Hofmann --- stable/grafana/Chart.yaml | 2 +- stable/grafana/README.md | 1 + stable/grafana/templates/_pod.tpl | 2 ++ stable/grafana/values.yaml | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index 98bab39ef4..247c13cfc8 100644 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 4.6.2 +version: 4.6.3 appVersion: 6.6.0 kubeVersion: "^1.8.0-0" description: The leading tool for querying and visualizing time series and metrics. diff --git a/stable/grafana/README.md b/stable/grafana/README.md index c2ba923b6a..12d8c4811c 100644 --- a/stable/grafana/README.md +++ b/stable/grafana/README.md @@ -125,6 +125,7 @@ This version requires Helm >= 2.12.0. | `sidecar.dashboards.provider.disableDelete` | Activate to avoid the deletion of imported dashboards | `false` | | `sidecar.dashboards.provider.allowUiUpdates` | Allow updating provisioned dashboards from the UI | `false` | | `sidecar.dashboards.provider.type` | Provider type | `file` | +| `sidecar.dashboards.watchMethod` | Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. | `WATCH` | | `sidecar.skipTlsVerify` | Set to true to skip tls verification for kube api calls | `nil` | | `sidecar.dashboards.label` | Label that config maps with dashboards should have to be added | `grafana_dashboard` | | `sidecar.dashboards.folder` | Folder in the pod that should hold the collected dashboards (unless `sidecar.dashboards.defaultFolderName` is set). This path will be mounted. | `/tmp/dashboards` | diff --git a/stable/grafana/templates/_pod.tpl b/stable/grafana/templates/_pod.tpl index ae141cceae..23842821be 100644 --- a/stable/grafana/templates/_pod.tpl +++ b/stable/grafana/templates/_pod.tpl @@ -100,6 +100,8 @@ containers: image: "{{ .Values.sidecar.image }}" imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} env: + - name: METHOD + value: {{ .Values.sidecar.dashboards.watchMethod }} - name: LABEL value: "{{ .Values.sidecar.dashboards.label }}" - name: FOLDER diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index 4e6c35429a..809047f531 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -442,6 +442,8 @@ sidecar: # skipTlsVerify: true dashboards: enabled: false + ## Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. + watchMethod: WATCH SCProvider: true # label that the configmaps with dashboards are marked with label: grafana_dashboard