diff --git a/stable/grafana/Chart.yaml b/stable/grafana/Chart.yaml index be9e444e34..86d0bb2ce5 100644 --- a/stable/grafana/Chart.yaml +++ b/stable/grafana/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: grafana -version: 3.8.18 +version: 3.8.19 appVersion: 6.3.5 kubeVersion: "^1.8.0-0" description: The leading tool for querying and visualizing time series and metrics. diff --git a/stable/grafana/templates/headless-service.yaml b/stable/grafana/templates/headless-service.yaml new file mode 100644 index 0000000000..c0c182a745 --- /dev/null +++ b/stable/grafana/templates/headless-service.yaml @@ -0,0 +1,22 @@ +{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (eq .Values.persistence.type "statefulset")}} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "grafana.fullname" . }}-headless + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "grafana.name" . }} + chart: {{ template "grafana.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + clusterIP: None + selector: + app: {{ template "grafana.name" . }} + release: {{ .Release.Name }} + type: ClusterIP +{{- end }} diff --git a/stable/grafana/templates/statefulset.yaml b/stable/grafana/templates/statefulset.yaml index 9bba5e258d..ebe3c2c900 100644 --- a/stable/grafana/templates/statefulset.yaml +++ b/stable/grafana/templates/statefulset.yaml @@ -19,6 +19,7 @@ spec: matchLabels: app: {{ template "grafana.name" . }} release: {{ .Release.Name }} + serviceName: {{ template "grafana.fullname" . }}-headless template: metadata: labels: @@ -45,4 +46,4 @@ spec: resources: requests: storage: {{ .Values.persistence.size }} -{{- end }} \ No newline at end of file +{{- end }}