apiVersion: apps/v1
kind: StatefulSet
metadata:
  namespace: data
  name: chronograf
  labels:
    name: chronograf
    namespace: data
spec:
  serviceName: chrono
  replicas: 1
  revisionHistoryLimit: 1
  updateStrategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: chrono
  template:
    metadata:
      labels:
        app: chrono
        name: chronograf
        namespace: data
    spec:
      containers:
        - name: chronograf
          image: 'quay.io/influxdb/chronograf:1.3.5.0'
          env:
            - name: INFLUXDB_URL
              value: 'http://influxdb:8086'
            - name: KAPACITOR_URL
              value: 'http://kapacitor:9092'
          ports:
            - name: http
              containerPort: 8888
              protocol: TCP
          resources:
            requests:
              memory: 50Mi
              cpu: 100m
            limits:
              memory: 200Mi
              cpu: 200m
          volumeMounts:
            - name: chronograf-data
              mountPath: /var/lib/chronograf
      imagePullSecrets:
        - name: repo-creds
  volumeClaimTemplates:
    - metadata:
        name: chronograf-data
        namespace: data
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 2Gi
