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
      volumes:
      - name: cloud-private-key
        secret:
          secretName: cloud-private-key
      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: Always
          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"
          volumeMounts:
          - name: cloud-private-key
            mountPath: "/etc/private-key/"
            readOnly: true
