apiVersion: apps/v1
kind: Deployment
metadata:
  name: network-operator
  namespace: openshift-network-operator
  labels:
    name: network-operator
spec:
  selector:
    matchLabels:
      name: network-operator
  template:
    metadata:
      labels:
        name: network-operator
    spec:
      containers:
      - name: network-operator
        image: docker.io/openshift/origin-cluster-network-operator:v4.0.0
        command:
        - "/usr/bin/cluster-network-operator"
        - "--url-only-kubeconfig=/etc/kubernetes/kubeconfig"
        resources:
          requests:
            cpu: 10m
            memory: 50Mi
        env:
        - name: NODE_IMAGE
          value: "docker.io/openshift/origin-node:v4.0.0"
        - name: HYPERSHIFT_IMAGE
          value: "docker.io/openshift/origin-hypershift:v4.0.0"
        - name: MULTUS_IMAGE
          value: "quay.io/openshift/origin-multus-cni:v4.0.0"
        - name: CNI_PLUGINS_SUPPORTED_IMAGE
          value: "quay.io/openshift/origin-container-networking-plugins-supported:v4.0.0"
        - name: CNI_PLUGINS_UNSUPPORTED_IMAGE
          value: "quay.io/openshift/origin-container-networking-plugins-unsupported:v4.0.0"
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        terminationMessagePolicy: FallbackToLogsOnError
        volumeMounts:
        - mountPath: /etc/kubernetes/kubeconfig
          name: host-kubeconfig
          readOnly: true
      hostNetwork: true
      nodeSelector:
        node-role.kubernetes.io/master: ""
      volumes:
        - name: host-kubeconfig
          hostPath:
            path: /etc/kubernetes/kubeconfig
      restartPolicy: Always
      securityContext:
        runAsNonRoot: true
        runAsUser: 65534
      tolerations:
      - key: "node-role.kubernetes.io/master"
        operator: Exists
        effect: NoSchedule
      - key: "node.kubernetes.io/not-ready"
        operator: Exists
        effect: NoSchedule
