apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: covid-grafana
  name: covid-grafana
  namespace: kube-prometheus
  resourceVersion: "47891502"
  selfLink: /apis/apps/v1/namespaces/kube-prometheus/deployments/grafana
  uid: 0704e9de-c441-4330-892b-2ba77941d3b9
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: covid-grafana
  template:
    metadata:
      labels:
        app: covid-grafana
    spec:
      containers:
        - env:
            - name: GF_INSTALL_PLUGINS
              value: grafana-clock-panel,natel-discrete-panel,grafana-piechart-panel,grafana-kubernetes-app
          image: grafana/grafana:master
          imagePullPolicy: Always
          name: covid-grafana
          ports:
            - containerPort: 3000
              name: http
              protocol: TCP
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /api/health
              port: http
              scheme: HTTP
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 1
          resources:
            limits:
              cpu: 200m
              memory: 200Mi
            requests:
              cpu: 100m
              memory: 100Mi
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
            - mountPath: /var/lib/grafana
              name: grafana-storage
            - mountPath: /etc/grafana/provisioning/datasources
              name: grafana-datasources
            - mountPath: /etc/grafana/provisioning/dashboards
              name: grafana-dashboards
            - mountPath: /grafana-dashboard-definitions/0/apiserver
              name: grafana-dashboard-apiserver
            - mountPath: /grafana-dashboard-definitions/0/controller-manager
              name: grafana-dashboard-controller-manager
            - mountPath: /grafana-dashboard-definitions/0/homelab-dashboard
              name: grafana-dashboard-homelab-dashboard
            - mountPath: /grafana-dashboard-definitions/0/k8s-cluster-rsrc-use
              name: grafana-dashboard-k8s-cluster-rsrc-use
            - mountPath: /grafana-dashboard-definitions/0/k8s-node-rsrc-use
              name: grafana-dashboard-k8s-node-rsrc-use
            - mountPath: /grafana-dashboard-definitions/0/k8s-resources-cluster
              name: grafana-dashboard-k8s-resources-cluster
            - mountPath: /grafana-dashboard-definitions/0/k8s-resources-namespace
              name: grafana-dashboard-k8s-resources-namespace
            - mountPath: /grafana-dashboard-definitions/0/k8s-resources-pod
              name: grafana-dashboard-k8s-resources-pod
            - mountPath: /grafana-dashboard-definitions/0/k8s-resources-workload
              name: grafana-dashboard-k8s-resources-workload
            - mountPath: /grafana-dashboard-definitions/0/k8s-resources-workloads-namespace
              name: grafana-dashboard-k8s-resources-workloads-namespace
            - mountPath: /grafana-dashboard-definitions/0/kubelet
              name: grafana-dashboard-kubelet
            - mountPath: /grafana-dashboard-definitions/0/nodes
              name: grafana-dashboard-nodes
            - mountPath: /grafana-dashboard-definitions/0/persistentvolumesusage
              name: grafana-dashboard-persistentvolumesusage
            - mountPath: /grafana-dashboard-definitions/0/pods
              name: grafana-dashboard-pods
            - mountPath: /grafana-dashboard-definitions/0/prometheus-remote-write
              name: grafana-dashboard-prometheus-remote-write
            - mountPath: /grafana-dashboard-definitions/0/prometheus
              name: grafana-dashboard-prometheus
            - mountPath: /grafana-dashboard-definitions/0/proxy
              name: grafana-dashboard-proxy
            - mountPath: /grafana-dashboard-definitions/0/scheduler
              name: grafana-dashboard-scheduler
            - mountPath: /grafana-dashboard-definitions/0/statefulset
              name: grafana-dashboard-statefulset
      dnsPolicy: ClusterFirst
      nodeSelector:
        beta.kubernetes.io/os: linux
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      serviceAccount: grafana
      serviceAccountName: grafana
      terminationGracePeriodSeconds: 30
      volumes:
        - emptyDir: {}
          name: grafana-storage
        - name: grafana-datasources
          secret:
            defaultMode: 420
            secretName: grafana-datasources
        - configMap:
            defaultMode: 420
            name: grafana-dashboards
          name: grafana-dashboards
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-apiserver
          name: grafana-dashboard-apiserver
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-controller-manager
          name: grafana-dashboard-controller-manager
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-homelab-dashboard
          name: grafana-dashboard-homelab-dashboard
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-k8s-cluster-rsrc-use
          name: grafana-dashboard-k8s-cluster-rsrc-use
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-k8s-node-rsrc-use
          name: grafana-dashboard-k8s-node-rsrc-use
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-k8s-resources-cluster
          name: grafana-dashboard-k8s-resources-cluster
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-k8s-resources-namespace
          name: grafana-dashboard-k8s-resources-namespace
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-k8s-resources-pod
          name: grafana-dashboard-k8s-resources-pod
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-k8s-resources-workload
          name: grafana-dashboard-k8s-resources-workload
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-k8s-resources-workloads-namespace
          name: grafana-dashboard-k8s-resources-workloads-namespace
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-kubelet
          name: grafana-dashboard-kubelet
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-nodes
          name: grafana-dashboard-nodes
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-persistentvolumesusage
          name: grafana-dashboard-persistentvolumesusage
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-pods
          name: grafana-dashboard-pods
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-prometheus-remote-write
          name: grafana-dashboard-prometheus-remote-write
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-prometheus
          name: grafana-dashboard-prometheus
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-proxy
          name: grafana-dashboard-proxy
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-scheduler
          name: grafana-dashboard-scheduler
        - configMap:
            defaultMode: 420
            name: grafana-dashboard-statefulset
          name: grafana-dashboard-statefulset
