diff --git a/Dockerfile.bundle b/Dockerfile.bundle index 17dcc49952..9c73d005f5 100644 --- a/Dockerfile.bundle +++ b/Dockerfile.bundle @@ -11,5 +11,5 @@ LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 # Copy files to locations specified by labels. -COPY deploy/ocs-operator/manifests /manifests/ -COPY deploy/ocs-operator/metadata /metadata/ +COPY bundle/manifests /manifests/ +COPY bundle/metadata /metadata/ diff --git a/deploy/ocs-operator/manifests/ceph-conf.yaml b/bundle/manifests/ceph-conf.yaml similarity index 100% rename from deploy/ocs-operator/manifests/ceph-conf.yaml rename to bundle/manifests/ceph-conf.yaml diff --git a/deploy/ocs-operator/manifests/cephblockpool.crd.yaml b/bundle/manifests/cephblockpool.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephblockpool.crd.yaml rename to bundle/manifests/cephblockpool.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephblockpoolradosnamespace.crd.yaml b/bundle/manifests/cephblockpoolradosnamespace.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephblockpoolradosnamespace.crd.yaml rename to bundle/manifests/cephblockpoolradosnamespace.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephbucketnotification.crd.yaml b/bundle/manifests/cephbucketnotification.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephbucketnotification.crd.yaml rename to bundle/manifests/cephbucketnotification.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephbuckettopic.crd.yaml b/bundle/manifests/cephbuckettopic.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephbuckettopic.crd.yaml rename to bundle/manifests/cephbuckettopic.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephclient.crd.yaml b/bundle/manifests/cephclient.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephclient.crd.yaml rename to bundle/manifests/cephclient.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephcluster.crd.yaml b/bundle/manifests/cephcluster.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephcluster.crd.yaml rename to bundle/manifests/cephcluster.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephcosidriver.crd.yaml b/bundle/manifests/cephcosidriver.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephcosidriver.crd.yaml rename to bundle/manifests/cephcosidriver.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephfilesystem.crd.yaml b/bundle/manifests/cephfilesystem.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephfilesystem.crd.yaml rename to bundle/manifests/cephfilesystem.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephfilesystemmirror.crd.yaml b/bundle/manifests/cephfilesystemmirror.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephfilesystemmirror.crd.yaml rename to bundle/manifests/cephfilesystemmirror.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephfilesystemsubvolumegroup.crd.yaml b/bundle/manifests/cephfilesystemsubvolumegroup.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephfilesystemsubvolumegroup.crd.yaml rename to bundle/manifests/cephfilesystemsubvolumegroup.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephnfs.crd.yaml b/bundle/manifests/cephnfs.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephnfs.crd.yaml rename to bundle/manifests/cephnfs.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephobjectrealm.crd.yaml b/bundle/manifests/cephobjectrealm.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephobjectrealm.crd.yaml rename to bundle/manifests/cephobjectrealm.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephobjectstore.crd.yaml b/bundle/manifests/cephobjectstore.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephobjectstore.crd.yaml rename to bundle/manifests/cephobjectstore.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephobjectstoreuser.crd.yaml b/bundle/manifests/cephobjectstoreuser.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephobjectstoreuser.crd.yaml rename to bundle/manifests/cephobjectstoreuser.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephobjectzone.crd.yaml b/bundle/manifests/cephobjectzone.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephobjectzone.crd.yaml rename to bundle/manifests/cephobjectzone.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephobjectzonegroup.crd.yaml b/bundle/manifests/cephobjectzonegroup.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephobjectzonegroup.crd.yaml rename to bundle/manifests/cephobjectzonegroup.crd.yaml diff --git a/deploy/ocs-operator/manifests/cephrbdmirror.crd.yaml b/bundle/manifests/cephrbdmirror.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/cephrbdmirror.crd.yaml rename to bundle/manifests/cephrbdmirror.crd.yaml diff --git a/deploy/ocs-operator/manifests/consumer-role.yaml b/bundle/manifests/consumer-role.yaml similarity index 100% rename from deploy/ocs-operator/manifests/consumer-role.yaml rename to bundle/manifests/consumer-role.yaml diff --git a/deploy/ocs-operator/manifests/consumer-role_binding.yaml b/bundle/manifests/consumer-role_binding.yaml similarity index 100% rename from deploy/ocs-operator/manifests/consumer-role_binding.yaml rename to bundle/manifests/consumer-role_binding.yaml diff --git a/deploy/ocs-operator/manifests/consumer-sa.yaml b/bundle/manifests/consumer-sa.yaml similarity index 100% rename from deploy/ocs-operator/manifests/consumer-sa.yaml rename to bundle/manifests/consumer-sa.yaml diff --git a/deploy/ocs-operator/manifests/exporter-service-role.yaml b/bundle/manifests/exporter-service-role.yaml similarity index 100% rename from deploy/ocs-operator/manifests/exporter-service-role.yaml rename to bundle/manifests/exporter-service-role.yaml diff --git a/deploy/ocs-operator/manifests/exporter-service-role_binding.yaml b/bundle/manifests/exporter-service-role_binding.yaml similarity index 100% rename from deploy/ocs-operator/manifests/exporter-service-role_binding.yaml rename to bundle/manifests/exporter-service-role_binding.yaml diff --git a/deploy/ocs-operator/manifests/ocs-operator.clusterserviceversion.yaml b/bundle/manifests/ocs-operator.clusterserviceversion.yaml similarity index 100% rename from deploy/ocs-operator/manifests/ocs-operator.clusterserviceversion.yaml rename to bundle/manifests/ocs-operator.clusterserviceversion.yaml diff --git a/deploy/ocs-operator/manifests/ocsinitialization.crd.yaml b/bundle/manifests/ocsinitialization.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/ocsinitialization.crd.yaml rename to bundle/manifests/ocsinitialization.crd.yaml diff --git a/deploy/ocs-operator/manifests/provider-role.yaml b/bundle/manifests/provider-role.yaml similarity index 100% rename from deploy/ocs-operator/manifests/provider-role.yaml rename to bundle/manifests/provider-role.yaml diff --git a/deploy/ocs-operator/manifests/provider-role_binding.yaml b/bundle/manifests/provider-role_binding.yaml similarity index 100% rename from deploy/ocs-operator/manifests/provider-role_binding.yaml rename to bundle/manifests/provider-role_binding.yaml diff --git a/deploy/ocs-operator/manifests/provider-sa.yaml b/bundle/manifests/provider-sa.yaml similarity index 100% rename from deploy/ocs-operator/manifests/provider-sa.yaml rename to bundle/manifests/provider-sa.yaml diff --git a/deploy/ocs-operator/manifests/rook-metrics-role.yaml b/bundle/manifests/rook-metrics-role.yaml similarity index 100% rename from deploy/ocs-operator/manifests/rook-metrics-role.yaml rename to bundle/manifests/rook-metrics-role.yaml diff --git a/deploy/ocs-operator/manifests/rook-metrics-role_binding.yaml b/bundle/manifests/rook-metrics-role_binding.yaml similarity index 100% rename from deploy/ocs-operator/manifests/rook-metrics-role_binding.yaml rename to bundle/manifests/rook-metrics-role_binding.yaml diff --git a/deploy/ocs-operator/manifests/rook-monitor-mgr-role.yaml b/bundle/manifests/rook-monitor-mgr-role.yaml similarity index 100% rename from deploy/ocs-operator/manifests/rook-monitor-mgr-role.yaml rename to bundle/manifests/rook-monitor-mgr-role.yaml diff --git a/deploy/ocs-operator/manifests/rook-monitor-mgr-role_binding.yaml b/bundle/manifests/rook-monitor-mgr-role_binding.yaml similarity index 100% rename from deploy/ocs-operator/manifests/rook-monitor-mgr-role_binding.yaml rename to bundle/manifests/rook-monitor-mgr-role_binding.yaml diff --git a/deploy/ocs-operator/manifests/rook-monitor-role.yaml b/bundle/manifests/rook-monitor-role.yaml similarity index 100% rename from deploy/ocs-operator/manifests/rook-monitor-role.yaml rename to bundle/manifests/rook-monitor-role.yaml diff --git a/deploy/ocs-operator/manifests/rook-monitor-role_binding.yaml b/bundle/manifests/rook-monitor-role_binding.yaml similarity index 100% rename from deploy/ocs-operator/manifests/rook-monitor-role_binding.yaml rename to bundle/manifests/rook-monitor-role_binding.yaml diff --git a/deploy/ocs-operator/manifests/storageclassrequest.crd.yaml b/bundle/manifests/storageclassrequest.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/storageclassrequest.crd.yaml rename to bundle/manifests/storageclassrequest.crd.yaml diff --git a/deploy/ocs-operator/manifests/storagecluster.crd.yaml b/bundle/manifests/storagecluster.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/storagecluster.crd.yaml rename to bundle/manifests/storagecluster.crd.yaml diff --git a/deploy/ocs-operator/manifests/storageconsumer.crd.yaml b/bundle/manifests/storageconsumer.crd.yaml similarity index 100% rename from deploy/ocs-operator/manifests/storageconsumer.crd.yaml rename to bundle/manifests/storageconsumer.crd.yaml diff --git a/deploy/ocs-operator/metadata/annotations.yaml b/bundle/metadata/annotations.yaml similarity index 100% rename from deploy/ocs-operator/metadata/annotations.yaml rename to bundle/metadata/annotations.yaml diff --git a/hack/common.sh b/hack/common.sh index 1b7f7bcd05..c11d78ba0e 100644 --- a/hack/common.sh +++ b/hack/common.sh @@ -41,7 +41,7 @@ GINKGO_TEST_SUITE="${GINKGO_TEST_SUITE:-ocs}" # This env var allows developers to point to a custom oc tool that isn't in $PATH # defaults to just using the 'oc' binary provided in $PATH OCS_OC_PATH="${OCS_OC_PATH:-oc}" -OCS_FINAL_DIR="deploy/ocs-operator/manifests" +BUNDLE_MANIFESTS_DIR="bundle/manifests" EXTRA_MANIFESTS_DIR="deploy/extra-manifests" ROOK_CSV="$OUTDIR_TEMPLATES/rook-csv.yaml.in" diff --git a/hack/generate-unified-csv.sh b/hack/generate-unified-csv.sh index b780f884a8..63b2cd7d07 100755 --- a/hack/generate-unified-csv.sh +++ b/hack/generate-unified-csv.sh @@ -64,6 +64,6 @@ $CSV_MERGER \ --ocs-must-gather-image="$OCS_MUST_GATHER_IMAGE" \ --crds-directory="$OUTDIR_CRDS" \ --manifests-directory=$EXTRA_MANIFESTS_DIR \ - --olm-bundle-directory="$OCS_FINAL_DIR" \ + --olm-bundle-directory="$BUNDLE_MANIFESTS_DIR" \ --timestamp="$TIMESTAMP" \ --rook-csiaddons-image="$ROOK_CSIADDONS_IMAGE" diff --git a/hack/source-manifests.sh b/hack/source-manifests.sh index 839f80fb45..54136eeb20 100755 --- a/hack/source-manifests.sh +++ b/hack/source-manifests.sh @@ -56,7 +56,7 @@ function dump_rook_csv() { # This is the base CSV everything else gets merged into later on. function gen_ocs_csv() { echo "Generating OpenShift Container Storage CSV" - rm -rf "$(dirname $OCS_FINAL_DIR)" + rm -rf "$(dirname $BUNDLE_MANIFESTS_DIR)" ocs_crds_outdir="$OUTDIR_CRDS/ocs" rm -rf $OUTDIR_TEMPLATES/manifests/ocs-operator.clusterserviceversion.yaml rm -rf $OCS_CSV @@ -66,8 +66,8 @@ function gen_ocs_csv() { pushd config/manager $KUSTOMIZE edit set image ocs-dev/ocs-operator="$OCS_IMAGE" popd - $KUSTOMIZE build config/manifests | $OPERATOR_SDK generate bundle -q --overwrite=false --output-dir deploy/ocs-operator--package ocs-operator --version "$CSV_VERSION" --extra-service-accounts=ocs-metrics-exporter - mv deploy/ocs-operator/manifests/*clusterserviceversion.yaml $OCS_CSV + $KUSTOMIZE build config/manifests | $OPERATOR_SDK generate bundle -q --package ocs-operator --version "$CSV_VERSION" --extra-service-accounts=ocs-metrics-exporter + mv $BUNDLE_MANIFESTS_DIR/*clusterserviceversion.yaml $OCS_CSV cp config/crd/bases/* $ocs_crds_outdir }