apiVersion: apps/v1
kind: Deployment
metadata:
  name: nirmata-hostpath-provisioner
  labels:
    k8s-app: nirmata-hostpath-provisioner
  namespace: kube-system
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: nirmata-hostpath-provisioner
  template:
    metadata:
      labels:
        k8s-app: nirmata-hostpath-provisioner
    spec:
      containers:
      - name: nirmata-hostpath-provisioner
        image: registry-v2.nirmata.io/nirmata/hostpath-provisioner:test
        imagePullPolicy: "IfNotPresent"
        env:
        - name: LEADER_ELECTION
          value: flase
        - name: ZK_PV_DIR
          value: /var/nirmata/zk
        - name: MONGODB_PV_DIR
          value: /var/nirmata/mongodb
        - name: ES_PV_DIR
          value: /var/nirmata/elasticsearch
        - name: KAFKA_PV_DIR
          value: /var/nirmata/kafka
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        volumeMounts:
          - name: pv-volume
            mountPath: /tmp/hostpath-provisioner
      serviceAccountName: nirmata-hostpath-provisioner
      volumes:
        - name: pv-volume
          hostPath:
            path: /tmp/hostpath-provisioner
