-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path3.grafana.yaml
175 lines (170 loc) · 3.68 KB
/
3.grafana.yaml
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-config
namespace: f5tt
data:
grafana.ini: |-
[paths]
[server]
domain = grafana.f5tt.ff.lan
root_url = https://grafana.f5tt.ff.lan
[database]
[session]
[dataproxy]
[analytics]
[security]
[snapshots]
[users]
[auth]
[auth.anonymous]
enabled = true
[auth.github]
[auth.google]
[auth.generic_oauth]
#enabled = true
#name = Oauth
#allow_sign_up = true
#client_id = Grafana
#client_secret = b496e866-cf3d-430b-8fc5-737c11be7bb7
#scopes = openid profile email
#auth_url = https://idp-fqdn/auth/realms/master/protocol/openid-connect/auth
#token_url = https://idp-fqdn/auth/realms/master/protocol/openid-connect/token
#api_url = https://idp-fqdn/auth/realms/master/protocol/openid-connect/userinfo
[auth.grafana_com]
[auth.proxy]
[auth.basic]
enabled = false
[auth.ldap]
[smtp]
#enabled = true
#host = smtp-server-fqdn:25
#user = user@domain
#password = thepassword
#from_address = [email protected]
#from_name = Grafana
[emails]
[log]
mode = console file
[log.console]
[log.file]
[log.syslog]
[event_publisher]
[dashboards.json]
[alerting]
[metrics]
[metrics.graphite]
[grafana_com]
[external_image_storage]
[external_image_storage.s3]
[external_image_storage.webdav]
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-grafana-data
namespace: f5tt
annotations:
nfs.io/storage-path: grafana/data
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-grafana-log
namespace: f5tt
annotations:
nfs.io/storage-path: grafana/log
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: f5tt
labels:
app: grafana
spec:
selector:
matchLabels:
app: grafana
replicas: 1
template:
metadata:
labels:
app: grafana
spec:
containers:
- name: grafana
image: grafana/grafana
ports:
- containerPort: 3000
volumeMounts:
- name: grafana-config
mountPath: /etc/grafana/grafana.ini
subPath: grafana.ini
- name: grafana-data
mountPath: /var/lib/grafana
- name: grafana-log
mountPath: /var/log/grafana
volumes:
- name: grafana-config
configMap:
name: grafana-config
- name: grafana-data
persistentVolumeClaim:
claimName: pvc-grafana-data
- name: grafana-log
persistentVolumeClaim:
claimName: pvc-grafana-log
---
apiVersion: v1
kind: Service
metadata:
name: grafana
namespace: f5tt
labels:
app: grafana
spec:
ports:
- port: 3000
selector:
app: grafana
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: grafana
namespace: f5tt
annotations:
nginx.org/proxy-connect-timeout: "30s"
nginx.org/proxy-read-timeout: "20s"
nginx.org/client-max-body-size: "4m"
nginx.com/health-checks: "true"
labels:
app: grafana
tier: frontend
spec:
ingressClassName: nginx
rules:
- host: grafana.f5tt.ff.lan
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: grafana
port:
number: 3000