kind: StatefulSet
apiVersion: apps/v1
metadata:
  name: px-csi-ext
  namespace: kube-test
spec:
  serviceName: "px-csi-service"
  replicas: 1
  selector:
    matchLabels:
      app: px-csi-driver
  template:
    metadata:
      labels:
        app: px-csi-driver
    spec:
      serviceAccountName: px-csi
      containers:
        - name: csi-external-provisioner
          imagePullPolicy: Always
          image: quay.io/k8scsi/csi-provisioner:v1.1.0
          args:
            - "--v=5"
            - "--provisioner=com.openstorage.pxd"
            - "--csi-address=$(ADDRESS)"
          env:
            - name: ADDRESS
              value: /csi/csi.sock
          securityContext:
            privileged: true
          volumeMounts:
            - name: socket-dir
              mountPath: /csi
        - name: csi-attacher
          imagePullPolicy: Always
          image: quay.io/k8scsi/csi-attacher:v1.1.1
          args:
            - "--v=5"
            - "--csi-address=$(ADDRESS)"
          env:
            - name: ADDRESS
              value: /csi/csi.sock
          securityContext:
            privileged: true
          volumeMounts:
            - name: socket-dir
              mountPath: /csi
        - name: csi-cluster-registrar
          imagePullPolicy: Always
          image: quay.io/k8scsi/csi-cluster-driver-registrar:v1.0.1
          args:
            - "--v=5"
            - "--csi-address=$(ADDRESS)"
            - "--pod-info-mount-version=v1"
          env:
            - name: ADDRESS
              value: /csi/csi.sock
          securityContext:
            privileged: true
          volumeMounts:
            - name: socket-dir
              mountPath: /csi
      volumes:
        - name: socket-dir
          hostPath:
            path: /var/lib/kubelet/plugins/com.openstorage.pxd
            type: DirectoryOrCreate
