---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: objectstorage-provisioner
  labels:
    app.kubernetes.io/part-of: container-object-storage-interface
    app.kubernetes.io/component: provisioner
    app.kubernetes.io/version: main
    app.kubernetes.io/name: container-object-storage-interface-provisioner
spec:
  replicas: 1
  minReadySeconds: 30
  progressDeadlineSeconds: 600
  revisionHistoryLimit: 3
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  selector:
    matchLabels:
      app.kubernetes.io/part-of: container-object-storage-interface
      app.kubernetes.io/component: provisioner
      app.kubernetes.io/name: container-object-storage-interface-provisioner
  template:
    metadata:
      labels:
        app.kubernetes.io/part-of: container-object-storage-interface
        app.kubernetes.io/component: provisioner
        app.kubernetes.io/name: container-object-storage-interface-provisioner
        app.kubernetes.io/version: main
    spec:
      serviceAccountName: objectstorage-provisioner-sa
      containers:
      - name: objectstorage-sample-driver
        image: quay.io/containerobjectstorage/objectstorage-sample-driver:latest
        resources:
          limits:
            cpu: 1
            memory: 1Gi
          requests:
            cpu: 100m
            memory: 100Mi
        envFrom:
        - secretRef:
            name: objectstorage-provisioner
      - name: objectstorage-provisioner-sidecar
        image: quay.io/containerobjectstorage/objectstorage-sidecar:latest
        resources:
          limits:
            cpu: 1
            memory: 1Gi
          requests:
            cpu: 100m
            memory: 100Mi
        env:
        - name: CONNECT_ADDRESS
          valueFrom:
            secretKeyRef:
              name: objectstorage-provisioner
              key: LISTEN_ADDRESS
