--- ### ### Grafana ### --- kind: ServiceAccount apiVersion: v1 metadata: name: linkerd-grafana namespace: {{.Values.Namespace}} --- kind: Service apiVersion: v1 metadata: name: linkerd-grafana namespace: {{.Values.Namespace}} labels: {{.Values.ControllerComponentLabel}}: grafana annotations: {{.Values.CreatedByAnnotation}}: {{.Values.CliVersion}} spec: type: ClusterIP selector: {{.Values.ControllerComponentLabel}}: grafana ports: - name: http port: 3000 targetPort: 3000 --- kind: Deployment apiVersion: extensions/v1beta1 metadata: name: linkerd-grafana namespace: {{.Values.Namespace}} labels: {{.Values.ControllerComponentLabel}}: grafana annotations: {{.Values.CreatedByAnnotation}}: {{.Values.CliVersion}} spec: replicas: 1 template: metadata: labels: {{.Values.ControllerComponentLabel}}: grafana annotations: {{.Values.CreatedByAnnotation}}: {{.Values.CliVersion}} spec: volumes: - name: {{.Values.GrafanaVolumeName}} emptyDir: {} - name: grafana-config configMap: name: linkerd-grafana-config items: - key: grafana.ini path: grafana.ini - key: datasources.yaml path: provisioning/datasources/datasources.yaml - key: dashboards.yaml path: provisioning/dashboards/dashboards.yaml containers: - name: grafana ports: - name: http containerPort: 3000 env: - name: GF_PATHS_DATA value: /{{.Values.GrafanaVolumeName}} volumeMounts: - name: {{.Values.GrafanaVolumeName}} mountPath: /{{.Values.GrafanaVolumeName}} - name: grafana-config mountPath: /etc/grafana readOnly: true image: {{.Values.GrafanaImage}} imagePullPolicy: {{.Values.ImagePullPolicy}} livenessProbe: httpGet: path: /api/health port: 3000 initialDelaySeconds: 30 readinessProbe: httpGet: path: /api/health port: 3000 {{- if .Values.EnableHA }} resources: requests: cpu: 20m memory: 50Mi {{- end }} securityContext: runAsUser: 472 serviceAccountName: linkerd-grafana --- kind: ConfigMap apiVersion: v1 metadata: name: linkerd-grafana-config namespace: {{.Values.Namespace}} labels: {{.Values.ControllerComponentLabel}}: grafana annotations: {{.Values.CreatedByAnnotation}}: {{.Values.CliVersion}} data: grafana.ini: |- instance_name = linkerd-grafana [server] root_url = %(protocol)s://%(domain)s:/grafana/ [auth] disable_login_form = true [auth.anonymous] enabled = true org_role = Editor [auth.basic] enabled = false [analytics] check_for_updates = false datasources.yaml: |- apiVersion: 1 datasources: - name: prometheus type: prometheus access: proxy orgId: 1 url: http://linkerd-prometheus.{{.Values.Namespace}}.svc.cluster.local:9090 isDefault: true jsonData: timeInterval: "5s" version: 1 editable: true dashboards.yaml: |- apiVersion: 1 providers: - name: 'default' orgId: 1 folder: '' type: file disableDeletion: true editable: true options: path: /var/lib/grafana/dashboards homeDashboardId: linkerd-top-line