-
Notifications
You must be signed in to change notification settings - Fork 1
/
grafana.yml.erb
107 lines (103 loc) · 2.56 KB
/
grafana.yml.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
apiVersion: v1
kind: Service
metadata:
name: service
spec:
selector:
app: grafana
ports:
- port: 80
targetPort: 3000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment
labels:
app: grafana
spec:
replicas: 1
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
containers:
- name: grafana
image: "docker.ocf.berkeley.edu/grafana:<%= version %>"
resources:
limits:
memory: 512Mi
cpu: 175m
ports:
- containerPort: 3000
volumeMounts:
- mountPath: /etc/secrets
name: secrets
env:
- name: GF_SERVER_ROOT_URL
value: https://grafana.ocf.berkeley.edu/
- name: GF_DATABASE_TYPE
value: mysql
- name: GF_DATABASE_HOST
value: mysql
- name: GF_DATABASE_NAME
value: ocfgrafana
- name: GF_DATABASE_USER
value: ocfgrafana
- name: GF_SESSION_PROVIDER
value: mysql
- name: GF_SESSION_COOKIE_SECURE
value: "true"
- name: GF_DATABASE_PASSWORD__FILE
value: /etc/secrets/mysql-pass
- name: GF_SECURITY_ADMIN_PASSWORD__FILE
value: /etc/secrets/admin-pass
- name: GF_SESSION_PROVIDER_CONFIG__FILE
value: /etc/secrets/provider-config
- name: GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET__FILE
value: /etc/secrets/keycloak-secret
- name: PROMETHEUS_AUTH_USER
valueFrom:
secretKeyRef:
name: prometheus-auth
key: username
- name: PROMETHEUS_AUTH_PASSWORD
valueFrom:
secretKeyRef:
name: prometheus-auth
key: password
volumes:
- name: secrets
hostPath:
path: /opt/share/kubernetes/secrets/grafana
type: Directory
dnsPolicy: ClusterFirst
dnsConfig:
searches:
- ocf.berkeley.edu
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: virtual-host-ingress
spec:
rules:
- host: grafana.ocf.berkeley.edu
http:
paths:
- backend:
serviceName: service
servicePort: 80
---
apiVersion: v1
kind: Secret
metadata:
name: prometheus-auth
type: Opaque
stringData:
username: ocfgrafana
password: "<%= prometheus_pass %>"