mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
modify grafana chart as prometheus like format (#292)
* modify grafana chart as prometheus like format * fix per @viglesiasce requested * mv to stable repo per @viglesiasce request
This commit is contained in:
committed by
Lachlan Evenson
parent
7c7a066d5f
commit
64ca8f2e7c
@@ -1,3 +0,0 @@
|
||||
description: A Helm chart for Kubernetes
|
||||
name: grafana
|
||||
version: 0.1.3
|
||||
@@ -1,26 +0,0 @@
|
||||
# Grafana Helm Chart
|
||||
|
||||
* Installs the web dashboarding system [Grafana](http://grafana.org/)
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```bash
|
||||
$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
|
||||
$ helm install --name my-release incubator/grafana
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|----------------------------|---------------------------------------------------|--------------------------|
|
||||
| `imageName` | Container image to run | grafana/grafana |
|
||||
| `adminUser` | Admin user username | admin |
|
||||
| `adminPassword` | Admin user password | admin |
|
||||
| `persistence.enabled` | Create a volume to store data | true |
|
||||
| `persistence.size` | Size of persistent volume claim | 1Gi RW |
|
||||
| `persistence.storageClass` | Type of persistent volume claim | generic |
|
||||
| `persistence.accessMode` | ReadWriteOnce or ReadOnly | ReadWriteOnce |
|
||||
| `cpu` | Container requested cpu | 100m |
|
||||
| `memory` | Container requested memory | 100M |
|
||||
@@ -1,4 +0,0 @@
|
||||
{{define "fullname"}}
|
||||
{{- $name := default "grafana" .Values.nameOverride -}}
|
||||
{{printf "%s-%s" .Release.Name $name | trunc 24 -}}
|
||||
{{end}}
|
||||
@@ -1,38 +0,0 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{template "fullname" .}}
|
||||
labels:
|
||||
heritage: {{.Release.Service | quote}}
|
||||
release: {{.Release.Name | quote}}
|
||||
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{template "fullname" .}}
|
||||
release: {{.Release.Name | quote}}
|
||||
spec:
|
||||
containers:
|
||||
- name: grafana
|
||||
image: "{{.Values.imageName}}:{{default "latest" .Values.imageTag}}"
|
||||
imagePullPolicy: {{default "Always" .Values.pullPolicy}}
|
||||
env:
|
||||
- name: GF_SECURITY_ADMIN_USER
|
||||
value: "{{.Values.adminUser}}"
|
||||
- name: GF_SECURITY_ADMIN_PASSWORD
|
||||
value: "{{.Values.adminPassword}}"
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{default "100m" .Values.Cpu}}
|
||||
memory: {{default "100M" .Values.Memory}}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/grafana
|
||||
name: storage-volume
|
||||
volumes:
|
||||
- name: storage-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: {{template "fullname" .}}
|
||||
@@ -1,19 +0,0 @@
|
||||
{{- if .Values.persistence.enabled }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{template "fullname" .}}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
annotations:
|
||||
volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- end }}
|
||||
@@ -1,16 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 3000
|
||||
selector:
|
||||
app: {{ template "fullname" . }}
|
||||
@@ -1,11 +0,0 @@
|
||||
imageName: "grafana/grafana"
|
||||
adminUser: "admin"
|
||||
adminPassword: "admin"
|
||||
|
||||
# Persist data to a persitent volume
|
||||
persistence:
|
||||
enabled: true
|
||||
storageClass: generic
|
||||
accessMode: ReadWriteOnce
|
||||
size: "1Gi"
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
name: grafana
|
||||
version: 0.2.0
|
||||
description: A Helm chart for Kubernetes
|
||||
home: https://grafana.net
|
||||
sources:
|
||||
- https://github.com/grafana/grafana
|
||||
maintainers:
|
||||
- name: Ming Hsieh
|
||||
email: zanhsieh@gmail.com
|
||||
engine: gotpl
|
||||
@@ -0,0 +1,42 @@
|
||||
# Grafana Helm Chart
|
||||
|
||||
* Installs the web dashboarding system [Grafana](http://grafana.org/)
|
||||
|
||||
## TL;DR;
|
||||
|
||||
```console
|
||||
$ helm install incubator/grafana
|
||||
```
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```console
|
||||
$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
|
||||
$ helm install --name my-release incubator/grafana
|
||||
```
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the my-release deployment:
|
||||
|
||||
```console
|
||||
$ helm delete my-release
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|---------------------------------------|-------------------------------------|---------------------------------------------------|
|
||||
| `server.image` | Container image to run | grafana/grafana |
|
||||
| `server.adminUser` | Admin user username | admin |
|
||||
| `server.adminPassword` | Admin user password | admin |
|
||||
| `server.persistentVolume.enabled` | Create a volume to store data | true |
|
||||
| `server.persistentVolume.size` | Size of persistent volume claim | 1Gi RW |
|
||||
| `server.persistentVolume.storageClass`| Type of persistent volume claim | volume.alpha.kubernetes.io/storage-class: default |
|
||||
| `server.persistentVolume.accessMode` | ReadWriteOnce or ReadOnly | [ReadWriteOnce] |
|
||||
| `server.resources` | Server resource requests and limits | requests: {cpu: 100m, memory: 100Mi} |
|
||||
@@ -0,0 +1,39 @@
|
||||
1. Get your '{{ .Values.server.adminUser }}' user password by running:
|
||||
|
||||
printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "server.fullname" . }} -o jsonpath="{.data.grafana-admin-password[*]}"`);echo
|
||||
|
||||
2. The Grafana server can be accessed via port {{ .Values.server.httpPort }} on the following DNS name from within your cluster:
|
||||
|
||||
{{ template "server.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
|
||||
{{ if .Values.server.ingress.enabled }}
|
||||
From outside the cluster, the server URL(s) are:
|
||||
{{- range .Values.server.ingress.hosts }}
|
||||
http://{{ . }}
|
||||
{{- end }}
|
||||
{{ else }}
|
||||
Get the Grafana URL to visit by running these commands in the same shell:
|
||||
{{ if contains "NodePort" .Values.server.serviceType -}}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "server.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{ else if contains "LoadBalancer" .Values.server.serviceType -}}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "server.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "server.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo http://$SERVICE_IP:{{ .Values.server.httpPort -}}
|
||||
{{ else if contains "ClusterIP" .Values.server.serviceType }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }},component={{ .Values.server.name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 3000
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
3. Login with the password from step 1 and the username: {{ .Values.server.adminUser }}
|
||||
|
||||
{{- if .Values.server.persistentVolume.enabled }}
|
||||
{{- else }}
|
||||
#################################################################################
|
||||
###### WARNING: Persistence is disabled!!! You will lose your data when #####
|
||||
###### the Grafana pod is terminated. #####
|
||||
#################################################################################
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "fullname" -}}
|
||||
{{- $name := default "grafana" .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a fully qualified server name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "server.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "grafana" | trunc 63 -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,25 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Values.server.name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
name: {{ template "server.fullname" . }}-config
|
||||
data:
|
||||
{{ toYaml .Values.serverConfigFile | indent 2 }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Values.server.name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
name: {{ template "server.fullname" . }}-dashs
|
||||
data:
|
||||
{{ toYaml .Values.serverDashboardFiles | indent 2 }}
|
||||
@@ -0,0 +1,70 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{.Chart.Name}}-{{.Chart.Version}}"
|
||||
component: "{{ .Values.server.name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
name: {{ template "server.fullname" . }}
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.server.annotations }}
|
||||
{{ $key }}: {{ $value }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
component: "{{ .Values.server.name }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ template "name" . }}
|
||||
image: "{{ .Values.server.image }}"
|
||||
imagePullPolicy: {{ default "Always" .Values.server.imagePullPolicy }}
|
||||
env:
|
||||
- name: GF_SECURITY_ADMIN_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "server.fullname" . }}
|
||||
key: grafana-admin-user
|
||||
- name: GF_SECURITY_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "server.fullname" . }}
|
||||
key: grafana-admin-password
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /login
|
||||
port: 3000
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 30
|
||||
resources:
|
||||
{{ toYaml .Values.server.resources | indent 12 }}
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: {{ default "/etc/grafana" .Values.server.configLocalPath | quote }}
|
||||
- name: dashboard-volume
|
||||
mountPath: {{ default "/var/lib/grafana/dashboards" .Values.server.dashboardLocalPath | quote }}
|
||||
- name: storage-volume
|
||||
mountPath: {{ default "/var/lib/grafana/data" .Values.server.storageLocalPath | quote }}
|
||||
terminationGracePeriodSeconds: {{ default 300 .Values.server.terminationGracePeriodSeconds }}
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: {{ template "server.fullname" . }}-config
|
||||
- name: dashboard-volume
|
||||
configMap:
|
||||
name: {{ template "server.fullname" . }}-dashs
|
||||
- name: storage-volume
|
||||
{{- if .Values.server.persistentVolume.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ template "server.fullname" . }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,33 @@
|
||||
{{- if .Values.server.ingress.enabled -}}
|
||||
{{- $releaseName := .Release.Name -}}
|
||||
{{- $servicePort := .Values.server.httpPort -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.server.ingress.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Values.server.name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
name: {{ template "server.fullname" . }}
|
||||
spec:
|
||||
rules:
|
||||
{{- range .Values.server.ingress.hosts }}
|
||||
- host: {{ . }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: {{ printf "%s-%s" $releaseName "grafana" | trunc 63 }}
|
||||
servicePort: {{ $servicePort }}
|
||||
{{- end -}}
|
||||
{{- if .Values.server.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.server.ingress.tls | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,35 @@
|
||||
{{- if .Values.server.setDatasource.enabled -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Values.server.name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
name: {{ template "server.fullname" . }}-set-datasource
|
||||
spec:
|
||||
activeDeadlineSeconds: {{ default 300 .Values.server.setDatasource.activeDeadlineSeconds }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
component: "{{ .Values.server.name }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ template "server.fullname" . }}-set-datasource
|
||||
image: "{{ .Values.server.setDatasource.image }}"
|
||||
args:
|
||||
- "http://{{ .Values.server.adminUser }}:{{ .Values.server.adminPassword }}@{{ template "fullname" . }}:{{ .Values.server.httpPort }}/api/datasources"
|
||||
- "-X"
|
||||
- POST
|
||||
- "-H"
|
||||
- "Content-Type: application/json;charset=UTF-8"
|
||||
- "--data-binary"
|
||||
{{- with .Values.server.setDatasource.datasource }}
|
||||
- "{\"name\":\"{{ .name }}\",\"type\":\"{{ .type }}\",\"url\":\"{{ .url }}\",\"access\":\"{{ .access }}\",\"isDefault\":{{ .isDefault }}}"
|
||||
{{- end }}
|
||||
restartPolicy: {{ .Values.server.setDatasource.restartPolicy }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{- if .Values.server.persistentVolume.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
annotations:
|
||||
{{- if .Values.server.persistentVolume.storageClass -}}
|
||||
volume.beta.kubernetes.io/storage-class: {{ .Values.server.persistentVolume.storageClass }}
|
||||
{{ else }}
|
||||
volume.alpha.kubernetes.io/storage-class: default
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.server.persistentVolume.annotations }}
|
||||
{{ $key }}: {{ $value }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Values.server.name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
name: {{ template "server.fullname" . }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.server.persistentVolume.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.server.persistentVolume.size | quote }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
name: {{ template "server.fullname" . }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{ if .Values.server.adminPassword }}
|
||||
grafana-admin-password: {{ .Values.server.adminPassword | b64enc | quote }}
|
||||
{{ else }}
|
||||
grafana-admin-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{ end }}
|
||||
grafana-admin-user: {{ .Values.server.adminUser | b64enc | quote }}
|
||||
@@ -0,0 +1,21 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
component: "{{ .Values.server.name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
name: {{ template "server.fullname" . }}
|
||||
spec:
|
||||
ports:
|
||||
- name: {{ default "http" .Values.server.httpPortName | quote }}
|
||||
port: {{ .Values.server.httpPort }}
|
||||
protocol: TCP
|
||||
targetPort: 3000
|
||||
selector:
|
||||
app: {{ template "fullname" . }}
|
||||
component: "{{ .Values.server.name }}"
|
||||
type: "{{ .Values.server.serviceType }}"
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
server:
|
||||
## Grafana Pod annotations:
|
||||
##
|
||||
# annotations:
|
||||
# iam.amazonaws.com/role: grafana
|
||||
|
||||
## Grafana service port
|
||||
##
|
||||
httpPort: 80
|
||||
|
||||
## Grafana Docker image
|
||||
##
|
||||
image: "grafana/grafana:latest"
|
||||
|
||||
ingress:
|
||||
## If true, Grafana Ingress will be created
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## Grafana Ingress annotations
|
||||
##
|
||||
# annotations:
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: 'true'
|
||||
|
||||
## Grafana Ingress hostnames
|
||||
## Must be provided if Ingress is enabled
|
||||
##
|
||||
# hosts:
|
||||
# - grafana.domain.com
|
||||
|
||||
## Grafana Ingress TLS configuration
|
||||
## Secrets must be manually created in the namespace
|
||||
##
|
||||
# tls:
|
||||
# - secretName: grafana-server-tls
|
||||
# hosts:
|
||||
# - grafana.domain.com
|
||||
|
||||
## Grafana container name
|
||||
##
|
||||
name: grafana
|
||||
|
||||
adminUser: "admin"
|
||||
# adminPassword: "admin"
|
||||
|
||||
## Global imagePullPolicy
|
||||
## Default: 'Always' if image tag is 'latest', else 'IfNotPresent'
|
||||
## Ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
# imagePullPolicy:
|
||||
|
||||
# Persist data to a persitent volume
|
||||
persistentVolume:
|
||||
## If true, Grafana will create a Persistent Volume Claim
|
||||
## If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
|
||||
## Grafana data Persistent Volume access modes
|
||||
## Must match those of existing PV or dynamic provisioner
|
||||
## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
||||
## Server data Persistent Volume annotations
|
||||
##
|
||||
# annotations:
|
||||
|
||||
## Grafana data Persistent Volume size
|
||||
## Default: 1Gi
|
||||
##
|
||||
size: 1Gi
|
||||
|
||||
## Data Persistent Volume Storage Class
|
||||
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
|
||||
## Default: volume.alpha.kubernetes.io/storage-class: default
|
||||
##
|
||||
# storageClass:
|
||||
|
||||
## Grafana resource requests and limits
|
||||
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# limits:
|
||||
# cpu: 500m
|
||||
# memory: 512Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
|
||||
## Grafana service type
|
||||
##
|
||||
serviceType: ClusterIP
|
||||
|
||||
## Grafana local config path
|
||||
## Default '/etc/grafana'
|
||||
##
|
||||
# configLocalPath: /etc/grafana
|
||||
|
||||
## Grafana local dashboards path
|
||||
## Default: '/var/lib/grafana/dashboards'
|
||||
##
|
||||
# dashboardLocalPath: /var/lib/grafana/dashboards
|
||||
|
||||
## Grafana local data storage path
|
||||
## Default: '/var/lib/grafana/data'
|
||||
##
|
||||
# storageLocalPath: /var/lib/grafana/data
|
||||
|
||||
## Grafana Pod termination grace period
|
||||
## Default: 300s (5m)
|
||||
##
|
||||
# terminationGracePeriodSeconds: 300
|
||||
|
||||
# Set datasource in beginning
|
||||
setDatasource:
|
||||
## If true, an initial Grafana Datasource will be set
|
||||
## Default: false
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## How long should it take to commit failure
|
||||
## Default: 300
|
||||
##
|
||||
# activeDeadlineSeconds: 300
|
||||
|
||||
## Curl Docker image
|
||||
## Default: appropriate/curl:latest
|
||||
##
|
||||
# image: appropriate/curl:latest
|
||||
|
||||
## This assembles how curl post into Grafana
|
||||
## Ref1: http://docs.grafana.org/reference/http_api/#create-data-source
|
||||
## Ref2: https://github.com/grafana/grafana/issues/1789
|
||||
##
|
||||
# datasource:
|
||||
## The datasource name.
|
||||
## Default: default
|
||||
# name: default
|
||||
|
||||
## Type of datasource
|
||||
## Default: prometheus
|
||||
##
|
||||
# type: prometheus
|
||||
|
||||
## The url of the datasource. To set correctly you need to know
|
||||
## the right datasource name and its port ahead. Check kubernetes
|
||||
## dashboard or describe the service should fulfill the requirements.
|
||||
## Synatx like `http://<release name>-<server name>:<port number>
|
||||
## Default: "http://limping-tiger-server"
|
||||
##
|
||||
# url: "http://limping-tiger-server"
|
||||
|
||||
## Specify if Grafana has to go thru proxy to reach datasource
|
||||
## Default: proxy
|
||||
##
|
||||
# access: proxy
|
||||
|
||||
## Specify should Grafana use this datasource as default
|
||||
## Default: true
|
||||
##
|
||||
# isDefault: true
|
||||
|
||||
## Specify the job policy
|
||||
## Default: OnFailure
|
||||
##
|
||||
# restartPolicy: OnFailure
|
||||
|
||||
## Grafana config file ConfigMap entry
|
||||
##
|
||||
serverConfigFile:
|
||||
grafana.ini: |
|
||||
; instance_name = ${HOSTNAME}
|
||||
[paths]
|
||||
data = /var/lib/grafana/data
|
||||
logs = /var/log/grafana
|
||||
plugins = /var/lib/grafana/plugins
|
||||
|
||||
[server]
|
||||
;protocol = http
|
||||
;http_addr =
|
||||
;http_port = 3000
|
||||
;domain = localhost
|
||||
;enforce_domain = false
|
||||
;root_url = %(protocol)s://%(domain)s:%(http_port)s/
|
||||
;router_logging = false
|
||||
;static_root_path = public
|
||||
;enable_gzip = false
|
||||
;cert_file =
|
||||
;cert_key =
|
||||
|
||||
[database]
|
||||
;type = sqlite3
|
||||
;host = 127.0.0.1:3306
|
||||
;name = grafana
|
||||
;user = root
|
||||
;password =
|
||||
;ssl_mode = disable
|
||||
;path = grafana.db
|
||||
|
||||
[session]
|
||||
;provider = file
|
||||
;provider_config = sessions
|
||||
;cookie_name = grafana_sess
|
||||
;cookie_secure = false
|
||||
;session_life_time = 86400
|
||||
|
||||
[analytics]
|
||||
;reporting_enabled = true
|
||||
check_for_updates = true
|
||||
;google_analytics_ua_id =
|
||||
|
||||
[security]
|
||||
;admin_user = admin
|
||||
;admin_password = admin
|
||||
;secret_key = SW2YcwTIb9zpOOhoPsMm
|
||||
;login_remember_days = 7
|
||||
;cookie_username = grafana_user
|
||||
;cookie_remember_name = grafana_remember
|
||||
;disable_gravatar = false
|
||||
;data_source_proxy_whitelist =
|
||||
|
||||
[snapshots]
|
||||
;external_enabled = true
|
||||
;external_snapshot_url = https://snapshots-origin.raintank.io
|
||||
;external_snapshot_name = Publish to snapshot.raintank.io
|
||||
|
||||
[users]
|
||||
;allow_sign_up = true
|
||||
;allow_org_create = true
|
||||
;auto_assign_org = true
|
||||
;auto_assign_org_role = Viewer
|
||||
;login_hint = email or username
|
||||
;default_theme = dark
|
||||
|
||||
[auth.anonymous]
|
||||
;enabled = false
|
||||
;org_name = Main Org.
|
||||
;org_role = Viewer
|
||||
|
||||
[auth.github]
|
||||
;enabled = false
|
||||
;allow_sign_up = false
|
||||
;client_id = some_id
|
||||
;client_secret = some_secret
|
||||
;scopes = user:email,read:org
|
||||
;auth_url = https://github.com/login/oauth/authorize
|
||||
;token_url = https://github.com/login/oauth/access_token
|
||||
;api_url = https://api.github.com/user
|
||||
;team_ids =
|
||||
;allowed_organizations =
|
||||
|
||||
[auth.google]
|
||||
;enabled = false
|
||||
;allow_sign_up = false
|
||||
;client_id = some_client_id
|
||||
;client_secret = some_client_secret
|
||||
;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
|
||||
;auth_url = https://accounts.google.com/o/oauth2/auth
|
||||
;token_url = https://accounts.google.com/o/oauth2/token
|
||||
;api_url = https://www.googleapis.com/oauth2/v1/userinfo
|
||||
;allowed_domains =
|
||||
|
||||
[auth.proxy]
|
||||
;enabled = false
|
||||
;header_name = X-WEBAUTH-USER
|
||||
;header_property = username
|
||||
;auto_sign_up = true
|
||||
|
||||
[auth.basic]
|
||||
;enabled = true
|
||||
|
||||
[auth.ldap]
|
||||
;enabled = false
|
||||
;config_file = /etc/grafana/ldap.toml
|
||||
|
||||
[smtp]
|
||||
;enabled = false
|
||||
;host = localhost:25
|
||||
;user =
|
||||
;password =
|
||||
;cert_file =
|
||||
;key_file =
|
||||
;skip_verify = false
|
||||
;from_address = admin@grafana.localhost
|
||||
|
||||
[emails]
|
||||
;welcome_email_on_sign_up = false
|
||||
|
||||
[log]
|
||||
mode = console
|
||||
level = info
|
||||
|
||||
[log.console]
|
||||
;level =
|
||||
;format = console
|
||||
|
||||
[event_publisher]
|
||||
;enabled = false
|
||||
;rabbitmq_url = amqp://localhost/
|
||||
;exchange = grafana_events
|
||||
|
||||
[dashboards.json]
|
||||
enabled = true
|
||||
path = /var/lib/grafana/dashboards
|
||||
|
||||
[metrics]
|
||||
;enabled = true
|
||||
;interval_seconds = 10
|
||||
|
||||
; [metrics.graphite]
|
||||
; address = localhost:2003
|
||||
; prefix = prod.grafana.%(instance_name)s.
|
||||
|
||||
[grafana_net]
|
||||
url = https://grafana.net
|
||||
|
||||
|
||||
## Grafana dashboard files ConfigMap entries
|
||||
## If you'd like to preinstall prometheus dashboard on the same namespace as example, get it from:
|
||||
##
|
||||
## https://grafana.net/dashboards/2
|
||||
##
|
||||
## and add it below.
|
||||
##
|
||||
serverDashboardFiles:
|
||||
Reference in New Issue
Block a user