kind: Deployment
apiVersion: apps/v1
metadata:
  name: nfs-client-provisioner
  labels:
      app: nfs-client-provisioner
  namespace: nfs-storage
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nfs-client-provisioner
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: nfs-client-provisioner
    spec:
      securityContext:
          runAsUser: 1000
          fsGroup: 2000
      serviceAccount: nfs-client-provisioner
      containers:
        - name: nfs-client-provisioner
          image: quay.io/external_storage/nfs-client-provisioner:latest
          volumeMounts:
            - name: nfs-client-root
              mountPath: /persistentvolumes
          env:
            - name: PROVISIONER_NAME
              value: nfs-provisioner/nfs-ssd1
            - name: NFS_SERVER
              value: 192.168.2.112
            - name: NFS_PATH
              value: /media/dbuddenbaum/Sabrent-2tb-nfs/nfs-server
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 100
              podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - nfs-client-provisioner
                topologyKey: kubernetes.io/hostname

      volumes:
        - name: nfs-client-root
          nfs:
            server: 192.168.2.112
            path: /media/dbuddenbaum/Sabrent-2tb-nfs/nfs-server