apiVersion: apps/v1
kind: Deployment
metadata:
  name: node-maintenance-operator
  namespace: node-maintenance-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: node-maintenance-operator
  template:
    metadata:
      labels:
        name: node-maintenance-operator
    spec:
      serviceAccountName: node-maintenance-operator
      tolerations:
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      containers:
        - name: node-maintenance-operator
          # Replace this with the built image name
          image: REPLACE_IMAGE
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "node-maintenance-operator"
