aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/namespaces/default/grafana/deployment-grafana.yaml
blob: e3215e821dc24eba1d18979bb0fb165741c76434 (plain) (blame)
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
apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: grafana
  template:
    metadata:
      labels:
        app: grafana
    spec:
      containers:
        - name: grafana
          image: grafana/grafana:10.4.1
          imagePullPolicy: Always
          ports:
            - containerPort: 3000
          resources:
            requests:
             cpu: 200m
             memory: 100Mi
            limits:
              cpu: 300m
              memory: 250Mi
          envFrom:
            - configMapRef:
                name: grafana-default
            - secretRef:
                name: grafana-secret-env
          volumeMounts:
            - mountPath: /var/lib/grafana
              name: grafana-volume
          securityContext:
            readOnlyRootFilesystem: true
      volumes:
        - name: grafana-volume
          persistentVolumeClaim:
            claimName: grafana-storage
      securityContext:
        fsGroup: 2000
        runAsUser: 1000
        runAsNonRoot: true