apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana
  labels:
    app: grafana
spec:
  selector:
    matchLabels:
      app: grafana
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        prometheus.io/scrape: 'true'
      labels:
        app: grafana
    spec:
      securityContext:
        runAsUser: 0
        fsGroup: 0
      containers:
      - name: grafana
        #command:
        #- sleep
        #args:
        #- 7d
        image: grafana/grafana
        ports:
          - name: grafana-http
            containerPort: 3000
        volumeMounts:
          - mountPath: "/var/lib/grafana"
            name: grafana-data
      volumes:
      - name: grafana-data
        persistentVolumeClaim:
          claimName: grafana-data
  