From 688e60a08405c47bfb35e399c4e6a78adfddbe32 Mon Sep 17 00:00:00 2001 From: nomis2k Date: Tue, 18 Jul 2017 03:26:43 +0100 Subject: [PATCH] allow the grafana service annotations to be customised (#1488) * allow the service annotations to be customised In a similar way to the prometheus chart, allow the service annotations to be specified. This lets us use an internal aws load balancer, for example, by specifying: service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 * allow the service annotations to be customised In a similar way to the prometheus chart, allow the service annotations to be specified. This lets us use an internal aws load balancer, for example, by specifying: service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 * Bump chart version --- stable/grafana/Chart.yaml | 2 +- stable/grafana/README.md | 1 + stable/grafana/templates/svc.yaml | 4 ++++ stable/grafana/values.yaml | 5 +++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index c7cbbf68c3..a4277d19a9 100755 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,5 +1,5 @@ name: grafana -version: 0.3.7 +version: 0.4.0 description: The leading tool for querying and visualizing time series and metrics. home: https://grafana.net icon: https://raw.githubusercontent.com/grafana/grafana/master/public/img/logo_transparent_400x.png diff --git a/stable/grafana/README.md b/stable/grafana/README.md index cfd99b56ef..a5112c07c9 100644 --- a/stable/grafana/README.md +++ b/stable/grafana/README.md @@ -43,3 +43,4 @@ The command removes all the Kubernetes components associated with the chart and | `server.resources` | Server resource requests and limits | requests: {cpu: 100m, memory: 100Mi} | | `server.serviceType` | ClusterIP, NodePort, or LoadBalancer| ClusterIP | | `server.setDatasource.enabled` | Creates grafana datasource with job | false | +| `server.service.annotations` | Service annotations | null | diff --git a/stable/grafana/templates/svc.yaml b/stable/grafana/templates/svc.yaml index 1334efec77..2204eb3910 100644 --- a/stable/grafana/templates/svc.yaml +++ b/stable/grafana/templates/svc.yaml @@ -1,6 +1,10 @@ apiVersion: v1 kind: Service metadata: +{{- if .Values.server.service.annotations }} + annotations: +{{ toYaml .Values.server.service.annotations | indent 4 }} +{{- end }} labels: app: {{ template "grafana.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" diff --git a/stable/grafana/values.yaml b/stable/grafana/values.yaml index f573efe32c..880ceabc85 100644 --- a/stable/grafana/values.yaml +++ b/stable/grafana/values.yaml @@ -111,6 +111,11 @@ server: ## serviceType: ClusterIP + ## Grafana service annotations + ## + service: + annotations: {} + ## Load balancer IP address ## Is not required, but allows for static address with ## serviceType LoadBalancer.