github.com/interconnectedcloud/qdr-operator@v0.0.0-20210826174505-576d2b33dac7/hack/catalog-source.sh (about) 1 #!/usr/bin/env bash 2 3 if [[ -z ${1} ]]; then 4 CATALOG_NS="operator-lifecycle-manager" 5 else 6 CATALOG_NS=${1} 7 fi 8 9 CSV=`cat deploy/olm-catalog/qdr-operator/0.3.0/qdr-operator.v0.3.0.clusterserviceversion.yaml | sed -e 's/^/ /' | sed '0,/ /{s/ / - /}'` 10 CRD=`cat deploy/crds/interconnectedcloud_v1alpha1_interconnect_crd.yaml | sed -e 's/^/ /' | sed '0,/ /{s/ / - /}'` 11 PKG=`cat deploy/olm-catalog/qdr-operator/0.3.0/interconnectedcloud.package.yaml | sed -e 's/^/ /' | sed '0,/ /{s/ / - /}'` 12 13 cat << EOF > deploy/olm-catalog/qdr-operator/0.3.0/catalog-source.yaml 14 apiVersion: v1 15 kind: List 16 items: 17 - apiVersion: v1 18 kind: ConfigMap 19 metadata: 20 name: qdr-resources 21 namespace: ${CATALOG_NS} 22 data: 23 clusterServiceVersions: | 24 ${CSV} 25 customResourceDefinitions: | 26 ${CRD} 27 packages: > 28 ${PKG} 29 30 - apiVersion: operators.coreos.com/v1alpha1 31 kind: CatalogSource 32 metadata: 33 name: qdr-resources 34 namespace: ${CATALOG_NS} 35 spec: 36 configMap: qdr-resources 37 displayName: Qdr Operators 38 publisher: Red Hat 39 sourceType: internal 40 status: 41 configMapReference: 42 name: qdr-resources 43 namespace: ${CATALOG_NS} 44 EOF