apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: grafana
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: grafana
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      containers:
      - name: grafana
        image: quay.io/coreos/monitoring-grafana:5.0.3
        volumeMounts:
        - name: grafana-storage
          mountPath: /data
        - name: grafana-datasources
          mountPath: /grafana/conf/provisioning/datasources
        - name: grafana-dashboards
          mountPath: /grafana/conf/provisioning/dashboards
        - name: grafana-dashboard-definitions-0
          mountPath: /grafana-dashboard-definitions/0
        ports:
        - name: web
          containerPort: 3000
        resources:
          requests:
            memory: 100Mi
            cpu: 100m
          limits:
            memory: 200Mi
            cpu: 200m
      volumes:
      - name: grafana-storage
        emptyDir: {}
      - name: grafana-datasources
        configMap:
          name: grafana-datasources
      - name: grafana-dashboards
        configMap:
          name: grafana-dashboards
      - name: grafana-dashboard-definitions-0
        configMap:
          name: grafana-dashboard-definitions-0
