apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  name: sriov-network-operator.v4.4.0
  namespace: openshift-sriov-network-operator
  annotations:
    alm-examples: |
      [
        {
          "apiVersion": "sriovnetwork.openshift.io/v1",
          "kind": "SriovNetworkNodePolicy",
          "metadata": {
            "name": "policy-1",
            "namespace": "openshift-sriov-network-operator"
          },
          "spec": {
            "resourceName": "intelnics",
            "nodeSelector": {
              "feature.node.kubernetes.io/network-sriov.capable": "true"
            },
            "priority": 99,
            "mtu": 9000,
            "numVfs": 6,
            "nicSelector": {
              "vendor": "8086",
              "rootDevices": [
                "0000:01:00.1"
              ],
              "pfNames": [
                "eth1"
              ]
            },
            "deviceType": "vfio-pci"
          }
        },
        {
          "apiVersion": "sriovnetwork.openshift.io/v1",
          "kind": "SriovNetwork",
          "metadata": {
            "name": "example-sriovnetwork",
            "namespace": "openshift-sriov-network-operator"
          },
          "spec": {
            "ipam": "{\n  \"type\": \"host-local\",\n  \"subnet\": \"10.56.217.0/24\",\n  \"rangeStart\": \"10.56.217.171\",\n  \"rangeEnd\": \"10.56.217.181\",\n  \"routes\": [{\n    \"dst\": \"0.0.0.0/0\"\n  }],\n  \"gateway\": \"10.56.217.1\"\n}\n",
            "vlan": 0,
            "spoofChk": "on",
            "trust": "off",
            "resourceName": "intelnics",
            "networkNamespace": "default"
          }
        },
        {
          "apiVersion": "sriovnetwork.openshift.io/v1",
          "kind": "SriovNetworkNodeState",
          "metadata": {
            "name": "minikube",
            "namespace": "openshift-sriov-network-operator"
          },
          "spec": {
            "interfaces": []
          }
        }
      ]
    certified: "false"
    containerImage: quay.io/openshift/origin-sriov-network-operator:4.4
    createdAt: 2019/04/30
    olm.skipRange: ">=4.3.0-0 <4.4.0"
    description: An operator for configuring SR-IOV components and initializing SRIOV network devices in Openshift cluster.
    repository: https://github.com/openshift/sriov-network-operator
    support: Red Hat, Inc.
    capabilities: Basic Install
    categories: Networking
spec:
  apiservicedefinitions: {}
  customresourcedefinitions:
    owned:
    - description: Represents an policy of configuring SR-IOV components on nodes
      displayName: Sriov Network
      kind: SriovNetwork
      name: sriovnetworks.sriovnetwork.openshift.io
      version: v1
    - description: Represents an policy of configuring SR-IOV components on nodes
      displayName: Sriov Network Node Policy
      kind: SriovNetworkNodePolicy
      name: sriovnetworknodepolicies.sriovnetwork.openshift.io
      version: v1
    - description: Represents the state of SR-IOV network devices on a node
      displayName: Sriov Network Node State
      kind: SriovNetworkNodeState
      name: sriovnetworknodestates.sriovnetwork.openshift.io
      version: v1
  description: |
      # SR-IOV Network Operator for Openshift

      ## Introdution
      The sriov-network-operator is generally responsible for configuring the sriov components in a openshift cluster.

      ### Supported Features
      * Initialize the SR-IOV NICs on nodes.
      * provision SR-IOV device plugin on selected node.
      * provision SR-IOV CNI plugin on selected nodes.
      * manage configuration of SR-IOV device plugin.
      * generate net-att-def CRs for SR-IOV CNI plugin.

      This operator has to run in namespace 'openshift-sriov-network-operator'. An Operator Group is also required to install this operator:

      ```
      $ oc create -f - <<EOF
      apiVersion: v1
      kind: Namespace
      metadata:
        name: openshift-sriov-network-operator
        labels:
          openshift.io/run-level: "1"
      EOF

      $ oc create -f - <<EOF
      apiVersion: operators.coreos.com/v1
      kind: OperatorGroup
      metadata:
        name: sriov-network-operators
        namespace: openshift-sriov-network-operator
      spec:
        targetNamespaces:
        - openshift-sriov-network-operator
      EOF
      ```
  displayName: SR-IOV Network Operator
  install:
    spec:
      clusterPermissions:
      - rules:
        - apiGroups: [""]
          resources: ["nodes"]
          verbs: ["get", "list", "watch", "patch", "update"]
        - apiGroups: [""]
          resources: ["pods"]
          verbs: ["*"]
        - apiGroups: ["apps"]
          resources: ["daemonsets"]
          verbs: ["get"]
        - apiGroups: [""]
          resources: [namespaces, serviceaccounts]
          verbs: ["*"]
        - apiGroups: ["k8s.cni.cncf.io"]
          resources: ["network-attachment-definitions"]
          verbs: ["*"]
        - apiGroups: ["rbac.authorization.k8s.io"]
          resources: [clusterroles, clusterrolebindings]
          verbs: ["*"]
        - apiGroups: ["admissionregistration.k8s.io"]
          resources: ["mutatingwebhookconfigurations", "validatingwebhookconfigurations"]
          verbs: ["*"]
        - apiGroups: ["sriovnetwork.openshift.io"]
          resources: ["*"]
          verbs: ["*"]
        serviceAccountName: sriov-network-operator
      - rules:
        - apiGroups: [""]
          resources: ["nodes"]
          verbs: ["get", "list", "watch", "patch", "update"]
        - apiGroups: [""]
          resources: ["pods"]
          verbs: ["*"]
        - apiGroups: ["apps"]
          resources: ["daemonsets"]
          verbs: ["get"]
        - apiGroups: [""]
          resources: ["pods/eviction"]
          verbs: ["create"]
        serviceAccountName: sriov-network-config-daemon
      permissions:
      - rules:
        - apiGroups:
          - ""
          resources:
          - pods
          - services
          - endpoints
          - persistentvolumeclaims
          - events
          - configmaps
          - secrets
          verbs:
          - '*'
        - apiGroups:
          - apps
          resources:
          - deployments
          - daemonsets
          - replicasets
          - statefulsets
          verbs:
          - '*'
        - apiGroups:
          - monitoring.coreos.com
          resources:
          - servicemonitors
          verbs:
          - get
          - create
        - apiGroups:
          - apps
          resourceNames:
          - sriov-network-operator
          resources:
          - deployments/finalizers
          verbs:
          - update
        serviceAccountName: sriov-network-operator
      - rules:
        - apiGroups:
          - ""
          resources:
          - pods
          verbs:
          - '*'
        - apiGroups:
          - apps
          resources:
          - daemonsets
          verbs:
          - '*'
        - apiGroups:
          - sriovnetwork.openshift.io
          resources:
          - '*'
          - sriovnetworknodestates
          verbs:
          - '*'
        serviceAccountName: sriov-network-config-daemon
      deployments:
      - name: sriov-network-operator
        spec:
          replicas: 1
          selector:
            matchLabels:
              name: sriov-network-operator
          template:
            metadata:
              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.4
                  command:
                  - sriov-network-operator
                  imagePullPolicy: IfNotPresent
                  env:
                    - name: WATCH_NAMESPACE
                      valueFrom:
                        fieldRef:
                          fieldPath: metadata.namespace
                    - name: SRIOV_CNI_IMAGE
                      value: quay.io/openshift/origin-sriov-cni:4.4
                    - name: SRIOV_DEVICE_PLUGIN_IMAGE
                      value: quay.io/openshift/origin-sriov-network-device-plugin:4.4
                    - name: NETWORK_RESOURCES_INJECTOR_IMAGE
                      value: quay.io/openshift/origin-sriov-dp-admission-controller:4.4
                    - name: OPERATOR_NAME
                      value: sriov-network-operator
                    - name: SRIOV_NETWORK_CONFIG_DAEMON_IMAGE
                      value: quay.io/openshift/origin-sriov-network-config-daemon:4.4
                    - name: SRIOV_NETWORK_WEBHOOK_IMAGE
                      value: quay.io/openshift/origin-sriov-network-webhook:4.4
                    - name: RESOURCE_PREFIX
                      value: openshift.io
                    - name: NAMESPACE
                      valueFrom:
                        fieldRef:
                          fieldPath: metadata.namespace
                    - name: POD_NAME
                      valueFrom:
                        fieldRef:
                          fieldPath: metadata.name
                    - name: RELEASE_VERSION
                      value: 4.4.0
    strategy: deployment
  installModes:
  - supported: true
    type: OwnNamespace
  - supported: true
    type: SingleNamespace
  - supported: false
    type: MultiNamespace
  - supported: false
    type: AllNamespaces
  provider:
    name: Red Hat, Inc.
  version: 4.4.0
  links:
  - name: Source Code
    url: https://github.com/openshift/sriov-network-operator
  icon:
  - base64data: [encoded data, 67352 characters]
    mediatype: image/png
  keywords: ["network", "sr-iov", "sriov"]
  labels:
    olm-owner-enterprise-app: sriov-network-operator
    olm-status-descriptors: sriov-network-operator.v4.4.0
  maintainers:
  - email: support@redhat.com
    name: Red Hat
