From 8f6d6de5ca1fa1cc0aac6bc3eb2bc0cd2a7d977c Mon Sep 17 00:00:00 2001 From: Miguel Elias dos Santos Date: Thu, 26 Apr 2018 10:09:01 +1000 Subject: [PATCH] Adding support for custom labels on grafana svc (#4172) --- stable/grafana/Chart.yaml | 2 +- stable/grafana/README.md | 1 + stable/grafana/templates/service.yaml | 3 +++ stable/grafana/values.yaml | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index a30b92cef9..935495befb 100755 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,5 +1,5 @@ name: grafana -version: 1.2.0 +version: 1.2.1 appVersion: 5.0.4 description: The leading tool for querying and visualizing time series and metrics. home: https://grafana.net diff --git a/stable/grafana/README.md b/stable/grafana/README.md index caa1f28c17..53f592e5b7 100644 --- a/stable/grafana/README.md +++ b/stable/grafana/README.md @@ -39,6 +39,7 @@ The command removes all the Kubernetes components associated with the chart and | `service.type` | Kubernetes service type | `ClusterIP` | | `service.port` | Kubernetes port where service is exposed| `9000` | | `service.annotations` | Service annotations | `80` | +| `service.labels` | Custom labels | `{}` | `ingress.enabled` | Enables Ingress | `false` | | `ingress.annotations` | Ingress annotations | `{}` | | `ingress.hosts` | Ingress accepted hostnames | `[]` | diff --git a/stable/grafana/templates/service.yaml b/stable/grafana/templates/service.yaml index 512f205ee2..6dcd63a4d2 100644 --- a/stable/grafana/templates/service.yaml +++ b/stable/grafana/templates/service.yaml @@ -7,6 +7,9 @@ metadata: chart: {{ template "grafana.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} +{{- if .Values.service.labels }} +{{ toYaml .Values.service.labels | indent 4 }} +{{- end }} {{- with .Values.service.annotations }} annotations: {{ toYaml . | indent 4 }} diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index cf694fe6f1..7b5ba81fe5 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -31,6 +31,7 @@ service: type: ClusterIP port: 80 annotations: {} + labels: {} ingress: enabled: false