From b898f4cb8d5fd3aa6a666dddba7086ec100eb889 Mon Sep 17 00:00:00 2001 From: holmesb <5072156+holmesb@users.noreply.github.com> Date: Mon, 18 Mar 2019 18:28:21 +0000 Subject: [PATCH] [stable/grafana] Notification channel provisioning (Resolves issue #12334) (#12351) * Resolves issue 12334. Adds notification channel provisioning capability. Signed-off-by: Brendan Holmes <5072156+holmesb@users.noreply.github.com> * Bumping version Signed-off-by: Brendan Holmes <5072156+holmesb@users.noreply.github.com> * Bumping to 2.3.0 Signed-off-by: Brendan Holmes <5072156+holmesb@users.noreply.github.com> --- stable/grafana/Chart.yaml | 2 +- stable/grafana/README.md | 1 + stable/grafana/templates/configmap.yaml | 7 +++++++ stable/grafana/templates/deployment.yaml | 5 +++++ stable/grafana/values.yaml | 18 ++++++++++++++++++ 5 files changed, 32 insertions(+), 1 deletion(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index 8f70525812..c05131552c 100755 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 2.2.5 +version: 2.3.0 appVersion: 6.0.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 d54ee34a36..1d8ad2a703 100644 --- a/stable/grafana/README.md +++ b/stable/grafana/README.md @@ -70,6 +70,7 @@ The command removes all the Kubernetes components associated with the chart and | `extraConfigmapMounts` | Additional grafana server configMap volume mounts | `[]` | | `plugins` | Plugins to be loaded along with Grafana | `[]` | | `datasources` | Configure grafana datasources (passed through tpl) | `{}` | +| `notifiers` | Configure grafana notifiers | `{}` | | `dashboardProviders` | Configure grafana dashboard providers | `{}` | | `dashboards` | Dashboards to import | `{}` | | `dashboardsConfigMaps` | ConfigMaps reference that contains dashboards | `{}` | diff --git a/stable/grafana/templates/configmap.yaml b/stable/grafana/templates/configmap.yaml index 022b4df139..a2d0507512 100644 --- a/stable/grafana/templates/configmap.yaml +++ b/stable/grafana/templates/configmap.yaml @@ -27,6 +27,13 @@ data: {{- end -}} {{- end -}} +{{- if .Values.notifiers }} + {{- range $key, $value := .Values.notifiers }} + {{ $key }}: | +{{ toYaml $value | indent 4 }} + {{- end -}} +{{- end -}} + {{- if .Values.dashboardProviders }} {{- range $key, $value := .Values.dashboardProviders }} {{ $key }}: | diff --git a/stable/grafana/templates/deployment.yaml b/stable/grafana/templates/deployment.yaml index ee858fc085..f415c43c9c 100644 --- a/stable/grafana/templates/deployment.yaml +++ b/stable/grafana/templates/deployment.yaml @@ -177,6 +177,11 @@ spec: mountPath: "/etc/grafana/provisioning/datasources/datasources.yaml" subPath: datasources.yaml {{- end }} +{{- if .Values.notifiers }} + - name: config + mountPath: "/etc/grafana/provisioning/notifiers/notifiers.yaml" + subPath: notifiers.yaml +{{- end }} {{- if .Values.dashboardProviders }} - name: config mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml" diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index 5634d6e254..e2f7e2ad92 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -211,6 +211,24 @@ datasources: {} # access: proxy # isDefault: true +## Configure notifiers +## ref: http://docs.grafana.org/administration/provisioning/#alert-notification-channels +## +notifiers: {} +# notifiers.yaml: +# notifiers: +# - name: email-notifier +# type: email +# uid: email1 +# # either: +# org_id: 1 +# # or +# org_name: Main Org. +# is_default: true +# settings: +# addresses: an_email_address@example.com +# delete_notifiers: + ## Configure grafana dashboard providers ## ref: http://docs.grafana.org/administration/provisioning/#dashboards ##