apiVersion: apps/v1
kind: Deployment
metadata:
  name: local-path-provisioner
  namespace: local-path-provisioner
  labels:
    app.kubernetes.io/name: local-path-provisioner
    helm.sh/chart: local-path-provisioner-0.0.35
    app.kubernetes.io/instance: local-path-provisioner
    app.kubernetes.io/version: "v0.0.34"
    app.kubernetes.io/managed-by: Helm
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: local-path-provisioner
      app.kubernetes.io/instance: local-path-provisioner
  template:
    metadata:
      labels:
        app.kubernetes.io/name: local-path-provisioner
        helm.sh/chart: local-path-provisioner-0.0.35
        app.kubernetes.io/instance: local-path-provisioner
        app.kubernetes.io/version: "v0.0.34"
        app.kubernetes.io/managed-by: Helm
    spec:
      serviceAccountName: local-path-provisioner
      hostUsers: true
      securityContext: {}
      containers:
        - name: local-path-provisioner
          securityContext: {}
          image: "rancher/local-path-provisioner:v0.0.34"
          imagePullPolicy: IfNotPresent
          command:
            - local-path-provisioner
            - --debug
            - start
            - --config
            - /etc/config/config.json
            - --service-account-name
            - local-path-provisioner
            - --provisioner-name
            - cluster.local/local-path-provisioner
            - --helper-image
            - "busybox:1.37.0"
            - --configmap-name
            - local-path-config
          volumeMounts:
            - name: config-volume
              mountPath: /etc/config/
          env:
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: CONFIG_MOUNT_PATH
              value: /etc/config/
          resources: {}
      volumes:
        - name: config-volume
          configMap:
            name: local-path-config
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: node-role.kubernetes.io/local-storage-node
                    operator: Exists
