---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    app: grafana
  name: grafana
spec:
  replicas: 1
  serviceName: grafana
  selector:
    matchLabels:
      app: grafana
  template:
    metadata:
      labels:
        app: grafana
    spec:
      containers:
        - name: main
          image: gcr.io/nice-mix-249319/grafana-gcp
          volumeMounts:
            - mountPath: /var/lib/grafana
              name: storage
            - mountPath: /etc/grafana/provisioning/datasources
              name: datasources
      volumes:
        - name: datasources
          configMap:
            name: grafana-datasources
  volumeClaimTemplates:
    - metadata:
        name: storage
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi