apiVersion: v1
kind: Namespace
metadata:
  labels:
    control-plane: controller-manager
  name: openshift-sriov-network-operator
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sriov-network-operator
  namespace: openshift-sriov-network-operator
  labels:
    control-plane: controller-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      name: sriov-network-operator
  template:
    metadata:
      annotations:
        target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
      labels:
        name: sriov-network-operator
    spec:
      serviceAccountName: sriov-network-operator
      nodeSelector:
        node-role.kubernetes.io/master: ""
      tolerations:
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
        operator: Exists
      containers:
      - name: sriov-network-operator
        image: quay.io/openshift/origin-sriov-network-operator:4.9
        command:
        - sriov-network-operator
        args:
        - --leader-elect
        imagePullPolicy: IfNotPresent
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8081
          initialDelaySeconds: 15
          periodSeconds: 20
        readinessProbe:
          httpGet:
            path: /readyz
            port: 8081
          initialDelaySeconds: 5
          periodSeconds: 10
        env:
          - name: WATCH_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: SRIOV_CNI_IMAGE
            value: quay.io/openshift/origin-sriov-cni:4.9
          - name: SRIOV_DEVICE_PLUGIN_IMAGE
            value: quay.io/openshift/origin-sriov-network-device-plugin:4.9
          - name: NETWORK_RESOURCES_INJECTOR_IMAGE
            value: quay.io/openshift/origin-sriov-dp-admission-controller:4.9
          - name: OPERATOR_NAME
            value: sriov-network-operator
          - name: SRIOV_NETWORK_CONFIG_DAEMON_IMAGE
            value: quay.io/openshift/origin-sriov-network-config-daemon:4.9
          - name: SRIOV_NETWORK_WEBHOOK_IMAGE
            value: quay.io/openshift/origin-sriov-network-webhook:4.9
          - name: SRIOV_INFINIBAND_CNI_IMAGE
            value: quay.io/openshift/origin-sriov-infiniband-cni:4.9
          - name: SRIOV_OPERATOR_MUST_GATHER_IMAGE
            value: quay.io/openshift/origin-sriov-operator-must-gather:4.9
          - name: RESOURCE_PREFIX
            value: openshift.io
          - name: ENABLE_ADMISSION_CONTROLLER
            value: "true"
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: RELEASE_VERSION
            value: 4.9.0
