apiVersion: apps/v1
kind: Deployment
metadata:
  name: antrea-operator
  namespace: antrea-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: antrea-operator
  template:
    metadata:
      labels:
        name: antrea-operator
    spec:
      hostNetwork: true
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/master
        - effect: NoSchedule
          key: node.kubernetes.io/not-ready
      serviceAccountName: antrea-operator
      containers:
        - name: antrea-operator
          image: projects.registry.vmware.com/antrea/antrea-operator:latest
          command:
          - antrea-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "antrea-operator"
