InitContainers
1
apiVersion: extensions/v1beta1
2
kind: Deployment
3
metadata:
4
name: grafana-core
5
namespace: $NS
6
labels:
7
app: grafana
8
component: corespec: replicas: 1
9
template:
10
metadata:
11
labels:
12
app: grafana
13
component: core
14
spec:
15
initContainers:
16
- name: config-data
17
image: busybox
18
command: ["chown", "-R", "grafana:grafana", "/var/lib/grafana"]
19
volumeMounts:
20
- name: $GCE_DISK
21
mountPath: /var/lib/grafana
22
containers:
23
- image: $IMAGE
24
name: grafana-core
25
imagePullPolicy: IfNotPresent
26
resources:
27
limits:
28
cpu: 100m
29
memory: 100Mi
30
requests:
31
cpu: 100m
32
memory: 100Mi
33
readinessProbe:
34
httpGet:
35
path: /login
36
port: 3000
37
initialDelaySeconds: 60
38
timeoutSeconds: 15
39
securityContext:
40
privileged: true
41
allowPrivilegeEscalation: true
42
capabilities:
43
add: ["SYS_ADMIN"]
44
volumeMounts:
45
- name: $GCE_DISK
46
mountPath: /var/lib/grafana
47
volumes:
48
- name: $GCE_DISK
49
persistentVolumeClaim:
50
claimName: $GCE_DISK
Copied!
Last modified 3yr ago
Copy link