kind: ConfigMap
apiVersion: v1
metadata:
  name: cdi-operator
  namespace: openshift-operator-lifecycle-manager
data:
  customResourceDefinitions: |-
    - apiVersion: apiextensions.k8s.io/v1beta1
      kind: CustomResourceDefinition
      metadata:
        name: cdis.cdi.kubevirt.io
      spec:
        group: cdi.kubevirt.io
        names:
          kind: CDI
          listKind: CDIList
          plural: cdis
          singular: cdi
        scope: Namespaced
        version: v1alpha1

  clusterServiceVersions: |-
    - apiVersion: operators.coreos.com/v1alpha1
      kind: ClusterServiceVersion
      metadata:
        name: cdi.v1.3.0
        annotations:
          tectonic-visibility: ocs
      spec:
        description: |-
           A declarative Kubernetes utility to import Virtual Machine images for use with Kubevirt

        keywords: ['kubevirt', 'virtualization', 'virt', 'cdi']
        maintainers:
        - name: RedHat
          email: rhallise@redhat.com
        provider:
          name: RedHat
        labels:
          operated-by: cdi
        selector:
          matchLabels:
            operated-by: cdi
        links:
        - name: Learn more about the KubeVirt project
          url: http://kubevirt.io/
        - name: Documentation
          url: https://github.com/kubevirt/containerized-data-importer/blob/master/README.md
        - name: CDI Source Code
          url: https://github.com/kubevirt/containerized-data-importer
        - name: CDI Operator Source Code
          url: https://github.com/kubevirt/cdi-operator

        displayName: CDI
        maturity: alpha
        version: 1.3.0-alpha.0
        install:
          strategy: deployment
          spec:
            permissions:
            - serviceAccountName: cdi-operator
              rules:
              - apiGroups:
                - cdi.kubevirt.io
                resources:
                - "*"
                verbs:
                - "*"
              - apiGroups:
                - ""
                resources:
                - pods
                - services
                - endpoints
                - persistentvolumeclaims
                - events
                - configmaps
                - secrets
                verbs:
                - "*"
              - apiGroups:
                - apps
                resources:
                - deployments
                - daemonsets
                - replicasets
                - statefulsets
                verbs:
                - "*"
            deployments:
            - name: cdi-operator
              spec:
                replicas: 1
                selector:
                  matchLabels:
                    app: cdi-operator
                template:
                  metadata:
                    labels:
                      app: cdi-operator
                  spec:
                    serviceAccountName: cdi-operator
                    containers:
                    - name: cdi-operator
                      command:
                      - ansible-operator
                      image: docker.io/kubevirt/cdi-operator:v1.3.0
                      ports:
                      - containerPort: 60000
                        name: metrics
                      imagePullPolicy: IfNotPresent
                      env:
                      - name: WATCH_NAMESPACE
                        valueFrom:
                          fieldRef:
                            fieldPath: metadata.namespace
                      - name: OPERATOR_NAME
                        value: "cdi-operator"

        customresourcedefinitions:
          owned:
          - name: cdis.cdi.kubevirt.io
            version: v1alpha1
            kind: CDI
            displayName: CDI Application
            description: Represents an instance of a CDI application

  packages: |-
    - packageName: cdi
      channels:
      - name: alpha
        currentCSV: cdi.v1.3.0


