apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana
  labels:
    app: grafana
spec:
  replicas: 1
  selector:
    matchLabels:
      app: grafana
  template:
    metadata:
      labels:
        app: grafana
    spec:
      securityContext:
        runAsUser: 0
      containers:
        - name: grafana
          image: grafana/grafana:8.4.5
          envFrom:
            - secretRef:
                name: grafana
            - configMapRef:
                name: grafana
          resources: {}
          volumeMounts:
            - mountPath: /var/lib/grafana
              name: grafana
      restartPolicy: Always
      volumes:
        - name: grafana
          persistentVolumeClaim:
            claimName: grafana-pv-claim
