apiVersion: apps/v1
kind: Deployment
metadata:
  name: influxdb2
  labels:
    app: influxdb2
spec:
  selector:
    matchLabels:
      app: influxdb2
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1
  template:
    metadata:
      labels:
        app: influxdb2
    spec:
      containers:
      - name: influxdb2
        image: influxdb:2.2.0-alpine
        ports:
        - containerPort: 8086
        volumeMounts:
        - mountPath: /var/lib/influxdb
          name: influxdb-data
        - mountPath: /var/lib/influxdb2
          name: influxdb2-data
        livenessProbe:
          httpGet:
            port: 8086
            path: /ping
          initialDelaySeconds: 30
          periodSeconds: 5
        readinessProbe:
          httpGet:
            port: 8086
            path: /ping
          initialDelaySeconds: 10
          periodSeconds: 5
      volumes:
      - name: influxdb-data
        persistentVolumeClaim:
          claimName: influxdb-data
      - name: influxdb2-data
        persistentVolumeClaim:
          claimName: influxdb2-data
