apiVersion: apps/v1
kind: Deployment
metadata:
  name: windows-machine-config-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: windows-machine-config-operator
  template:
    metadata:
      labels:
        name: windows-machine-config-operator
    spec:
      hostNetwork: true
      serviceAccountName: windows-machine-config-operator
      containers:
        - name: windows-machine-config-operator
          # Replace this with the built image name
          image: REPLACE_IMAGE
          command:
          - windows-machine-config-operator
          args:
          - "--zap-level=debug"
          - "--zap-encoder=console"
          imagePullPolicy: IfNotPresent
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "windows-machine-config-operator"
      nodeSelector:
        node-role.kubernetes.io/master: ""
      tolerations:
        - key: "node-role.kubernetes.io/master"
          operator: "Exists"
          effect: "NoSchedule"
        - key: "node.kubernetes.io/unreachable"
          operator: "Exists"
          effect: "NoExecute"
          tolerationSeconds: 120
        - key: "node.kubernetes.io/not-ready"
          operator: "Exists"
          effect: "NoExecute"
          tolerationSeconds: 120
