apiVersion: apps/v1
kind: Deployment
metadata:
  name: fencing-controller
  namespace: fencing
spec:
  replicas: 1
  selector:
    matchLabels:
      app: fencing-controller
  template:
    metadata:
      labels:
        app: fencing-controller
    spec:
      nodeSelector:
        node-role.kubernetes.io/master: ""
      tolerations:
      - key: node-role.kubernetes.io/master
        operator: Exists
        effect: NoSchedule
      serviceAccountName: fencing
      hostNetwork: true
      containers:
      - name: fencing-controller
        image: kvaps/kube-fencing-controller
        env:
        - name: FENCING_NODE_SELECTOR
          value: "fencing=enabled"
        - name: FENCING_AGENT_SELECTOR
          value: "app=fencing-agents"
        - name: FENCING_SCRIPT
          value: "/scripts/fence.sh"
        - name: FLUSHING_MODE
          value: "recreate"
        - name: TIMEOUT
          value: "0"
        #- name: DEBUG
        #  value: "1"
