apiVersion: apps/v1
kind: Deployment
metadata:
  name: influxdb
spec:
  selector:
    matchLabels:
      app: influxdb
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: influxdb
    spec:
      nodeSelector:
        cloud.google.com/gke-nodepool: default-pool
      containers:
      - image: sfcdota/influxdb
        name: influxdb
        imagePullPolicy: Always
        resources:
          requests:
            memory: "16Mi"
            cpu: "1m"
          limits:
            memory: "2048Mi"
            cpu: "300m"
        ports:
        - containerPort: 8086
          name: influxdb
        volumeMounts:
        - name: influxdb-persistent-storage
          mountPath: /root/
        - name: influxsys-persistent-storage
          mountPath: /sys/fs/cgroup
        - name: docker-socket
          mountPath: /var/run/docker.sock
      volumes:
      - name: influxdb-persistent-storage
        persistentVolumeClaim:
          claimName: influxdb-pv-claim
      - name: influxsys-persistent-storage
        persistentVolumeClaim:
          claimName: influxsys-pv-claim
      - name: docker-socket
        hostPath:
          path: /var/run/docker.sock
