Helm Grafana deployments
Using the official Grafana Helm Chart, it’s easy to extend the values to make the instance visible to the operator:
This takes multiple values into account: release name and namespace, labels, and secret configs
, but may not be what you want.
It is recommended to use this as a guide in case you have complex requirements.
extraObjects:
- |
apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
name: {{ include "grafana.fullname" . }}
namespace: {{ include "grafana.namespace" . }}
labels:
{{- include "grafana.labels" . | nindent 4 }}
spec:
external:
url: "http://{{ include "grafana.fullname" . }}.{{ include "grafana.namespace" . }}.svc.cluster.local:{{ .Values.service.port }}/"
adminUser:
name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }}
key: {{ .Values.admin.userKey | default "admin-user" }}
adminPassword:
name: {{ (tpl .Values.admin.existingSecret .) | default (include "grafana.fullname" .) }}
key: {{ .Values.admin.passwordKey | default "admin-password" }}
Note
If you’re using the official chart via kube-prometheus-stack
.
Indent the entire example once under the .grafana
key
grafana:
extraObjects:
- ...