From dd8c3c9974f9a9e8abde119c1b66132e49eb94ac Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Mon, 11 Mar 2024 11:34:30 +0530 Subject: [PATCH] build: remove csv related files remove csv related files/content which are not used/required for upstream uses. Signed-off-by: subhamkrai --- .github/workflows/build.yml | 8 +- Makefile | 19 +- build/crds/validate-csv-crd-list.sh | 12 - build/csv/csv-gen.sh | 61 --- .../library/templates/_cluster-role.tpl | 16 - .../templates/_cluster-rolebinding.tpl | 15 - deploy/examples/common.yaml | 31 -- deploy/olm/assemble/metadata-common.yaml | 440 ------------------ deploy/olm/assemble/metadata-k8s.yaml | 14 - deploy/olm/assemble/metadata-ocp.yaml | 19 - deploy/olm/assemble/metadata-okd.yaml | 27 -- deploy/olm/assemble/rook-ceph.package.yaml | 4 - images/ceph/Dockerfile | 1 - images/ceph/Makefile | 40 -- 14 files changed, 3 insertions(+), 704 deletions(-) delete mode 100755 build/crds/validate-csv-crd-list.sh delete mode 100755 build/csv/csv-gen.sh delete mode 100644 deploy/olm/assemble/metadata-common.yaml delete mode 100644 deploy/olm/assemble/metadata-k8s.yaml delete mode 100644 deploy/olm/assemble/metadata-ocp.yaml delete mode 100644 deploy/olm/assemble/metadata-okd.yaml delete mode 100644 deploy/olm/assemble/rook-ceph.package.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f10d02689..683338535 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,12 +36,6 @@ jobs: - name: build rook run: | - # Install kubectl binary as required for generating csv - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl" - chmod +x ./kubectl - sudo mv ./kubectl /usr/local/bin/kubectl - sudo chown root: /usr/local/bin/kubectl - GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' BUILD_CONTAINER_IMAGE=false build - name: validate build @@ -60,7 +54,7 @@ jobs: run: tests/scripts/validate_modified_files.sh modcheck - name: run crds-gen - run: make csv-clean && GOPATH=$(go env GOPATH) make crds + run: GOPATH=$(go env GOPATH) make crds - name: validate crds-gen run: tests/scripts/validate_modified_files.sh crd diff --git a/Makefile b/Makefile index 140093b5f..2426b3ae4 100644 --- a/Makefile +++ b/Makefile @@ -118,11 +118,6 @@ build.version: @mkdir -p $(OUTPUT_DIR) @echo "$(VERSION)" > $(OUTPUT_DIR)/version -# Change how CRDs are generated for CSVs -ifneq ($(REAL_HOST_PLATFORM),darwin_arm64) -build.common: export NO_OB_OBC_VOL_GEN=true -build.common: export MAX_DESC_LEN=0 -endif build.common: export SKIP_GEN_CRD_DOCS=true build.common: build.version helm.build mod.check crds gen-rbac @$(MAKE) go.init @@ -134,7 +129,7 @@ do.build.platform.%: do.build.parallel: $(foreach p,$(PLATFORMS_TO_BUILD_FOR), do.build.platform.$(p)) -build: csv-clean build.common ## Only build for linux platform +build: build.common ## Only build for linux platform @$(MAKE) go.build PLATFORM=linux_$(GOHOSTARCH) @$(MAKE) -C images PLATFORM=linux_$(GOHOSTARCH) @@ -172,7 +167,7 @@ codegen: ${CODE_GENERATOR} ## Run code generators. mod.check: go.mod.check ## Check if any go modules changed. mod.update: go.mod.update ## Update all go modules. -clean: csv-clean ## Remove all files that are created by building. +clean: ## Remove all files that are created by building. @$(MAKE) go.mod.clean @$(MAKE) -C images clean @rm -fr $(OUTPUT_DIR) $(WORK_DIR) @@ -183,15 +178,6 @@ distclean: clean ## Remove all files that are created by building or configuring prune: ## Prune cached artifacts. @$(MAKE) -C images prune -# Change how CRDs are generated for CSVs -csv: export MAX_DESC_LEN=0 # sets the description length to 0 since CSV cannot be bigger than 1MB -csv: export NO_OB_OBC_VOL_GEN=true -csv: csv-clean crds ## Generate a CSV file for OLM. - $(MAKE) -C images/ceph csv - -csv-clean: ## Remove existing OLM files. - @$(MAKE) -C images/ceph csv-clean - docs: helm-docs @build/deploy/generate-deploy-examples.sh @@ -199,7 +185,6 @@ crds: $(CONTROLLER_GEN) $(YQ) @echo Updating CRD manifests @build/crds/build-crds.sh $(CONTROLLER_GEN) $(YQ) @GOBIN=$(GOBIN) build/crds/generate-crd-docs.sh - @build/crds/validate-csv-crd-list.sh gen-rbac: $(HELM) $(YQ) ## Generate RBAC from Helm charts @# output only stdout to the file; stderr for debugging should keep going to stderr diff --git a/build/crds/validate-csv-crd-list.sh b/build/crds/validate-csv-crd-list.sh deleted file mode 100755 index 145c3c089..000000000 --- a/build/crds/validate-csv-crd-list.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -script_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P) - -list_of_crd_in_crd_yaml=$(grep -oE '[^ ]*\.ceph\.rook\.io' "${script_root}/deploy/examples/crds.yaml" | sort) -list_of_csv_in_csv_yaml=$(grep -oE '[^ ]*\.ceph\.rook\.io' "${script_root}/deploy/olm/assemble/metadata-common.yaml" | sort) - -if [ "$list_of_crd_in_crd_yaml" != "$list_of_csv_in_csv_yaml" ]; then - echo "CRD list in crds.yaml file and metadata-common.yaml is different. Make sure to add crd in metadata-common.yaml." - echo -e "crd file list in crd.yaml:\n$list_of_crd_in_crd_yaml" - echo -e "crd file list in csv.yaml:\n$list_of_csv_in_csv_yaml" -fi diff --git a/build/csv/csv-gen.sh b/build/csv/csv-gen.sh deleted file mode 100755 index cab017e01..000000000 --- a/build/csv/csv-gen.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash -set -e - -############# -# VARIABLES # -############# - -operator_sdk="${OPERATOR_SDK:-operator-sdk}" -yq="${YQv3:-yq}" -PLATFORM=$(go env GOARCH) - -YQ_CMD_DELETE=("$yq" delete -i) -YQ_CMD_MERGE_OVERWRITE=("$yq" merge --inplace --overwrite --prettyPrint) -YQ_CMD_MERGE=("$yq" merge --arrays=append --inplace) -YQ_CMD_WRITE=("$yq" write --inplace -P) -CSV_FILE_NAME="../../build/csv/ceph/$PLATFORM/manifests/rook-ceph.clusterserviceversion.yaml" -CEPH_EXTERNAL_SCRIPT_FILE="../../deploy/examples/create-external-cluster-resources.py" -ASSEMBLE_FILE_COMMON="../../deploy/olm/assemble/metadata-common.yaml" -ASSEMBLE_FILE_OCP="../../deploy/olm/assemble/metadata-ocp.yaml" - -############# -# FUNCTIONS # -############# - -function generate_csv() { - kubectl kustomize ../../deploy/examples/ | "$operator_sdk" generate bundle --package="rook-ceph" --output-dir="../../build/csv/ceph/$PLATFORM" --extra-service-accounts=rook-ceph-default,rook-csi-rbd-provisioner-sa,rook-csi-rbd-plugin-sa,rook-csi-cephfs-provisioner-sa,rook-csi-nfs-provisioner-sa,rook-csi-nfs-plugin-sa,rook-csi-cephfs-plugin-sa,rook-ceph-system,rook-ceph-rgw,rook-ceph-purge-osd,rook-ceph-osd,rook-ceph-mgr,rook-ceph-cmd-reporter - - # cleanup to get the expected state before merging the real data from assembles - "${YQ_CMD_DELETE[@]}" "$CSV_FILE_NAME" 'spec.icon[*]' - "${YQ_CMD_DELETE[@]}" "$CSV_FILE_NAME" 'spec.installModes[*]' - "${YQ_CMD_DELETE[@]}" "$CSV_FILE_NAME" 'spec.keywords[0]' - "${YQ_CMD_DELETE[@]}" "$CSV_FILE_NAME" 'spec.maintainers[0]' - - "${YQ_CMD_MERGE_OVERWRITE[@]}" "$CSV_FILE_NAME" "$ASSEMBLE_FILE_COMMON" - "${YQ_CMD_WRITE[@]}" "$CSV_FILE_NAME" metadata.annotations.externalClusterScript "$(base64 <$CEPH_EXTERNAL_SCRIPT_FILE)" - "${YQ_CMD_WRITE[@]}" "$CSV_FILE_NAME" metadata.name "rook-ceph.v${VERSION}" - - "${YQ_CMD_MERGE[@]}" "$CSV_FILE_NAME" "$ASSEMBLE_FILE_OCP" - - # We don't need to include these files in csv as ocs-operator creates its own. - rm -rf "../../build/csv/ceph/$PLATFORM/manifests/rook-ceph-operator-config_v1_configmap.yaml" - - # This change are just to make the CSV file as it was earlier and as ocs-operator reads. - # Skipping this change for darwin since `sed -i` doesn't work with darwin properly. - # and the csv is not ever needed in the mac builds. - if [[ "$OSTYPE" == "darwin"* ]]; then - return - fi - - sed -i 's/image: rook\/ceph:.*/image: {{.RookOperatorImage}}/g' "$CSV_FILE_NAME" - sed -i 's/name: rook-ceph.v.*/name: rook-ceph.v{{.RookOperatorCsvVersion}}/g' "$CSV_FILE_NAME" - sed -i 's/version: 0.0.0/version: {{.RookOperatorCsvVersion}}/g' "$CSV_FILE_NAME" - - mv "$CSV_FILE_NAME" "../../build/csv/" - mv "../../build/csv/ceph/$PLATFORM/manifests/"* "../../build/csv/ceph/" - rm -rf "../../build/csv/ceph/$PLATFORM" -} - -if [ "$PLATFORM" == "amd64" ]; then - generate_csv -fi diff --git a/deploy/charts/library/templates/_cluster-role.tpl b/deploy/charts/library/templates/_cluster-role.tpl index fd79b7ce9..1d0f4ed8f 100644 --- a/deploy/charts/library/templates/_cluster-role.tpl +++ b/deploy/charts/library/templates/_cluster-role.tpl @@ -20,22 +20,6 @@ rules: resources: ["cephclusters", "cephclusters/finalizers"] verbs: ["get", "list", "create", "update", "delete"] --- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-rgw - namespace: {{ .Release.Namespace }} # namespace:cluster -rules: - # Placeholder role so the rgw service account will - # be generated in the csv. Remove this role and role binding - # when fixing https://github.com/rook/rook/issues/10141. - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get ---- # Aspects of ceph-mgr that operate within the cluster's namespace kind: Role apiVersion: rbac.authorization.k8s.io/v1 diff --git a/deploy/charts/library/templates/_cluster-rolebinding.tpl b/deploy/charts/library/templates/_cluster-rolebinding.tpl index dc5e05f29..b9748d401 100644 --- a/deploy/charts/library/templates/_cluster-rolebinding.tpl +++ b/deploy/charts/library/templates/_cluster-rolebinding.tpl @@ -32,21 +32,6 @@ subjects: name: rook-ceph-osd namespace: {{ .Release.Namespace }} # namespace:cluster --- -# Allow the rgw pods in this namespace to work with configmaps -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-rgw - namespace: {{ .Release.Namespace }} # namespace:cluster -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: rook-ceph-rgw -subjects: - - kind: ServiceAccount - name: rook-ceph-rgw - namespace: {{ .Release.Namespace }} # namespace:cluster ---- # Allow the ceph mgr to access resources scoped to the CephCluster namespace necessary for mgr modules kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 diff --git a/deploy/examples/common.yaml b/deploy/examples/common.yaml index ed523e8cb..4ea76243c 100644 --- a/deploy/examples/common.yaml +++ b/deploy/examples/common.yaml @@ -902,22 +902,6 @@ rules: resources: ["persistentvolumeclaims"] verbs: ["get", "update", "delete", "list"] --- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-rgw - namespace: rook-ceph # namespace:cluster -rules: - # Placeholder role so the rgw service account will - # be generated in the csv. Remove this role and role binding - # when fixing https://github.com/rook/rook/issues/10141. - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get ---- # Allow the operator to manage resources in its own namespace apiVersion: rbac.authorization.k8s.io/v1 kind: Role @@ -1112,21 +1096,6 @@ subjects: name: rook-ceph-purge-osd namespace: rook-ceph # namespace:cluster --- -# Allow the rgw pods in this namespace to work with configmaps -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: rook-ceph-rgw - namespace: rook-ceph # namespace:cluster -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: rook-ceph-rgw -subjects: - - kind: ServiceAccount - name: rook-ceph-rgw - namespace: rook-ceph # namespace:cluster ---- # Grant the operator, agent, and discovery agents access to resources in the rook-ceph-system namespace kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 diff --git a/deploy/olm/assemble/metadata-common.yaml b/deploy/olm/assemble/metadata-common.yaml deleted file mode 100644 index d590491a3..000000000 --- a/deploy/olm/assemble/metadata-common.yaml +++ /dev/null @@ -1,440 +0,0 @@ -spec: - replaces: rook-ceph.v1.1.1 - customresourcedefinitions: - owned: - - kind: CephCluster - name: cephclusters.ceph.rook.io - version: v1 - displayName: Ceph Cluster - description: Represents a Ceph cluster. - - kind: CephBlockPool - name: cephblockpools.ceph.rook.io - version: v1 - displayName: Ceph Block Pool - description: Represents a Ceph Block Pool. - - kind: CephObjectStore - name: cephobjectstores.ceph.rook.io - version: v1 - displayName: Ceph Object Store - description: Represents a Ceph Object Store. - specDescriptors: - - description: Coding Chunks - displayName: Coding Chunks - path: dataPool.erasureCoded.codingChunks - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:dataPool" - - "urn:alm:descriptor:com.tectonic.ui:number" - - description: Data Chunks - displayName: Data Chunks - path: dataPool.erasureCoded.dataChunks - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:dataPool" - - "urn:alm:descriptor:com.tectonic.ui:number" - - description: failureDomain - displayName: failureDomain - path: dataPool.failureDomain - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:dataPool" - - "urn:alm:descriptor:com.tectonic.ui:text" - - description: Size - displayName: Size - path: dataPool.replicated.size - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:dataPool" - - "urn:alm:descriptor:com.tectonic.ui:number" - - description: Annotations - displayName: Annotations - path: gateway.annotations - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:gateway" - - "urn:alm:descriptor:io.kubernetes:annotations" - - description: Instances - displayName: Instances - path: gateway.instances - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:gateway" - - "urn:alm:descriptor:com.tectonic.ui:number" - - description: Resources - displayName: Resources - path: gateway.resources - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:gateway" - - "urn:alm:descriptor:com.tectonic.ui:resourceRequirements" - - description: placement - displayName: placement - path: gateway.placement - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:gateway" - - "urn:alm:descriptor:io.kubernetes:placement" - - description: securePort - displayName: securePort - path: gateway.securePort - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:gateway" - - "urn:alm:descriptor:io.kubernetes:securePort" - - description: sslCertificateRef - displayName: sslCertificateRef - path: gateway.sslCertificateRef - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:gateway" - - "urn:alm:descriptor:io.kubernetes:sslCertificateRef" - - description: Type - displayName: Type - path: gateway.type - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:gateway" - - "urn:alm:descriptor:com.tectonic.ui:text" - - description: Coding Chunks - displayName: Coding Chunks - path: metadataPool.erasureCoded.codingChunks - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:metadataPool" - - "urn:alm:descriptor:com.tectonic.ui:number" - - description: Data Chunks - displayName: Data Chunks - path: metadataPool.erasureCoded.dataChunks - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:metadataPool" - - "urn:alm:descriptor:com.tectonic.ui:number" - - description: failureDomain - displayName: failureDomain - path: metadataPool.failureDomain - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:metadataPool" - - "urn:alm:descriptor:com.tectonic.ui:text" - - description: Size - displayName: Size - path: metadataPool.replicated.size - x-descriptors: - - "urn:alm:descriptor:com.tectonic.ui:fieldGroup:metadataPool" - - "urn:alm:descriptor:com.tectonic.ui:number" - - kind: CephObjectStoreUser - name: cephobjectstoreusers.ceph.rook.io - version: v1 - displayName: Ceph Object Store User - description: Represents a Ceph Object Store User. - - kind: CephNFS - name: cephnfses.ceph.rook.io - version: v1 - displayName: Ceph NFS - description: Represents a cluster of Ceph NFS ganesha gateways. - - kind: CephClient - name: cephclients.ceph.rook.io - version: v1 - displayName: Ceph Client - description: Represents a Ceph User. - - kind: CephFilesystem - name: cephfilesystems.ceph.rook.io - version: v1 - displayName: Ceph Filesystem - description: Represents a Ceph Filesystem. - - kind: CephFilesystemMirror - name: cephfilesystemmirrors.ceph.rook.io - version: v1 - displayName: Ceph Filesystem Mirror - description: Represents a Ceph Filesystem Mirror. - - kind: CephRBDMirror - name: cephrbdmirrors.ceph.rook.io - version: v1 - displayName: Ceph RBD Mirror - description: Represents a Ceph RBD Mirror. - - kind: CephObjectRealm - name: cephobjectrealms.ceph.rook.io - version: v1 - displayName: Ceph Object Store Realm - description: Represents a Ceph Object Store Realm. - - kind: CephObjectZoneGroup - name: cephobjectzonegroups.ceph.rook.io - version: v1 - displayName: Ceph Object Store Zone Group - description: Represents a Ceph Object Store Zone Group. - - kind: CephObjectZone - name: cephobjectzones.ceph.rook.io - version: v1 - displayName: Ceph Object Store Zone - description: Represents a Ceph Object Store Zone. - - kind: CephBucketNotification - name: cephbucketnotifications.ceph.rook.io - version: v1 - displayName: Ceph Bucket Notification - description: Represents a Ceph Bucket Notification. - - kind: CephBucketTopic - name: cephbuckettopics.ceph.rook.io - version: v1 - displayName: Ceph Bucket Topic - description: Represents a Ceph Bucket Topic. - - kind: CephFilesystemSubVolumeGroup - name: cephfilesystemsubvolumegroups.ceph.rook.io - version: v1 - displayName: Ceph Filesystem SubVolumeGroup - description: Represents a Ceph Filesystem SubVolumeGroup. - - kind: CephBlockPoolRadosNamespace - name: cephblockpoolradosnamespaces.ceph.rook.io - version: v1 - displayName: Ceph BlockPool Rados Namespace - description: Represents a Ceph BlockPool Rados Namespace. - - kind: CephCOSIDriver - name: cephcosidrivers.ceph.rook.io - version: v1 - displayName: Ceph COSI Driver - description: Represents a Ceph COSI Driver. - displayName: Rook-Ceph - description: | - - The Rook-Ceph storage operator packages, deploys, manages, upgrades and scales Ceph storage for providing persistent storage to infrastructure services (Logging, Metrics, Registry) as well as stateful applications in Kubernetes clusters. - - ## Rook-Ceph Storage Operator - - Rook runs as a cloud-native service in Kubernetes clusters for optimal integration with applications in need of storage, and handles the heavy-lifting behind the scenes such as provisioning and management. - Rook orchestrates battle-tested open-source storage technology Ceph, which has years of production deployments and runs some of the worlds largest clusters. - - Ceph is a massively scalable, software-defined, cloud native storage platform that offers block, file and object storage services. - Ceph can be used to back a wide variety of applications including relational databases, NoSQL databases, CI/CD tool-sets, messaging, AI/ML and analytics applications. - Ceph is a proven storage platform that backs some of the world's largest storage deployments and has a large vibrant open source community backing the project. - - ## Supported features - * **High Availability and resiliency** - Ceph has no single point of failures (SPOF) and all its components work natively in a highly available fashion - * **Data Protection** - Ceph periodically scrub for inconsistent objects and repair them if necessary, making sure your replicas are always coherent - * **Consistent storage platform across hybrid cloud** - Ceph can be deployed anywhere (on-premise or bare metal) and thus offers a similar experience regardless - * **Block, File & Object storage service** - Ceph can expose your data through several storage interfaces, solving all the application use cases - * **Scale up/down** - addition and removal of storage is fully covered by the operator. - * **Dashboard** - The Operator deploys a dashboard for monitoring and introspecting your cluster. - - ## Before you start - https://rook.io/docs/rook/v1.0/k8s-pre-reqs.html - - keywords: - [ - "rook", - "ceph", - "storage", - "object storage", - "open source", - "block storage", - "shared filesystem", - ] - minKubeVersion: 1.10.0 - labels: - alm-owner-etcd: rookoperator - operated-by: rookoperator - selector: - matchLabels: - alm-owner-etcd: rookoperator - operated-by: rookoperator - links: - - name: Blog - url: https://blog.rook.io - - name: Documentation - url: https://rook.github.io/docs/rook/v1.0/ - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIzLjAuMiwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA3MCA3MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNzAgNzA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojMkIyQjJCO30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggY2xhc3M9InN0MCIgZD0iTTUwLjUsNjcuNkgxOS45Yy04LDAtMTQuNS02LjUtMTQuNS0xNC41VjI5LjJjMC0xLjEsMC45LTIuMSwyLjEtMi4xaDU1LjRjMS4xLDAsMi4xLDAuOSwyLjEsMi4xdjIzLjkKCQkJCUM2NSw2MS4xLDU4LjUsNjcuNiw1MC41LDY3LjZ6IE05LjYsMzEuMnYyMS45YzAsNS43LDQuNiwxMC4zLDEwLjMsMTAuM2gzMC42YzUuNywwLDEwLjMtNC42LDEwLjMtMTAuM1YzMS4ySDkuNnoiLz4KCQk8L2c+CgkJPGc+CgkJCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00Mi40LDU2LjdIMjhjLTEuMSwwLTIuMS0wLjktMi4xLTIuMXYtNy4yYzAtNS4xLDQuMi05LjMsOS4zLTkuM3M5LjMsNC4yLDkuMyw5LjN2Ny4yCgkJCQlDNDQuNSw1NS43LDQzLjYsNTYuNyw0Mi40LDU2Ljd6IE0zMCw1Mi41aDEwLjN2LTUuMmMwLTIuOS0yLjMtNS4yLTUuMi01LjJjLTIuOSwwLTUuMiwyLjMtNS4yLDUuMlY1Mi41eiIvPgoJCTwvZz4KCQk8Zz4KCQkJPHBhdGggY2xhc3M9InN0MCIgZD0iTTYyLjksMjMuMkM2Mi45LDIzLjIsNjIuOSwyMy4yLDYyLjksMjMuMmwtMTEuMSwwYy0xLjEsMC0yLjEtMC45LTIuMS0yLjFjMC0xLjEsMC45LTIuMSwyLjEtMi4xCgkJCQljMCwwLDAsMCwwLDBsOS4xLDBWNi43aC02Ljl2My41YzAsMC41LTAuMiwxLjEtMC42LDEuNWMtMC40LDAuNC0wLjksMC42LTEuNSwwLjZsMCwwbC0xMS4xLDBjLTEuMSwwLTIuMS0wLjktMi4xLTIuMVY2LjdoLTYuOQoJCQkJdjMuNWMwLDEuMS0wLjksMi4xLTIuMSwyLjFsLTExLjEsMGMtMC41LDAtMS4xLTAuMi0xLjUtMC42Yy0wLjQtMC40LTAuNi0wLjktMC42LTEuNVY2LjdIOS42djEyLjRoOWMxLjEsMCwyLjEsMC45LDIuMSwyLjEKCQkJCXMtMC45LDIuMS0yLjEsMi4xaC0xMWMtMS4xLDAtMi4xLTAuOS0yLjEtMi4xVjQuNmMwLTEuMSwwLjktMi4xLDIuMS0yLjFoMTEuMWMxLjEsMCwyLjEsMC45LDIuMSwyLjF2My41bDcsMFY0LjYKCQkJCWMwLTEuMSwwLjktMi4xLDIuMS0yLjFoMTEuMWMxLjEsMCwyLjEsMC45LDIuMSwyLjF2My41bDYuOSwwVjQuNmMwLTEuMSwwLjktMi4xLDIuMS0yLjFoMTEuMUM2NCwyLjYsNjUsMy41LDY1LDQuNnYxNi41CgkJCQljMCwwLjUtMC4yLDEuMS0wLjYsMS41QzY0LDIzLDYzLjQsMjMuMiw2Mi45LDIzLjJ6Ii8+CgkJPC9nPgoJPC9nPgo8L2c+Cjwvc3ZnPg== - mediatype: image/svg+xml - installModes: - - type: OwnNamespace - supported: true - - type: SingleNamespace - supported: true - - type: MultiNamespace - supported: false - - type: AllNamespaces - supported: false - -metadata: - annotations: - tectonic-visibility: ocs - repository: https://github.com/rook/rook - containerImage: "{{.RookOperatorImage}}" - alm-examples: |- - [ - { - "apiVersion": "ceph.rook.io/v1", - "kind": "CephCluster", - "metadata": { - "name": "my-rook-ceph", - "namespace": "my-rook-ceph" - }, - "spec": { - "cephVersion": { - "image": "quay.io/ceph/ceph:v17.2.6" - }, - "dataDirHostPath": "/var/lib/rook", - "mon": { - "count": 3 - }, - "dashboard": { - "enabled": true - }, - "network": { - "hostNetwork": false - }, - "rbdMirroring": { - "workers": 0 - }, - "storage": { - "useAllNodes": true, - "useAllDevices": true - } - } - }, - { - "apiVersion": "ceph.rook.io/v1", - "kind": "CephBlockPool", - "metadata": { - "name": "replicapool", - "namespace": "my-rook-ceph" - }, - "spec": { - "failureDomain": "host", - "replicated": { - "size": 3 - }, - "annotations": null - } - }, - { - "apiVersion": "ceph.rook.io/v1", - "kind": "CephObjectStore", - "metadata": { - "name": "my-store", - "namespace": "my-rook-ceph" - }, - "spec": { - "metadataPool": { - "failureDomain": "host", - "replicated": { - "size": 3 - } - }, - "dataPool": { - "failureDomain": "host", - "replicated": { - "size": 3 - } - }, - "gateway": { - "type": "s3", - "sslCertificateRef": null, - "port": 8080, - "securePort": null, - "instances": 1, - "placement": null, - "annotations": null, - "resources": null - } - } - }, - { - "apiVersion": "ceph.rook.io/v1", - "kind": "CephObjectStoreUser", - "metadata": { - "name": "my-user", - "namespace": "my-rook-ceph" - }, - "spec": { - "store": "my-store", - "displayName": "my display name" - } - }, - { - "apiVersion": "ceph.rook.io/v1", - "kind": "CephNFS", - "metadata": { - "name": "my-nfs", - "namespace": "rook-ceph" - }, - "spec": { - "rados": { - "pool": "myfs-data0", - "namespace": "nfs-ns" - }, - "server": { - "active": 3, - "placement": null, - "annotations": null, - "resources": null - } - } - }, - { - "apiVersion": "ceph.rook.io/v1", - "kind": "CephClient", - "metadata": { - "name": "cinder", - "namespace": "rook-ceph" - }, - "spec": { - "caps": { - "mon": "profile rbd", - "osd": "profile rbd pool=volumes, profile rbd pool=vms, profile rbd-read-only pool=images" - } - } - }, - { - "apiVersion": "ceph.rook.io/v1", - "kind": "CephFilesystem", - "metadata": { - "name": "myfs", - "namespace": "rook-ceph" - }, - "spec": { - "dataPools": [ - { - "compressionMode": "", - "crushRoot": "", - "deviceClass": "", - "erasureCoded": { - "algorithm": "", - "codingChunks": 0, - "dataChunks": 0 - }, - "failureDomain": "host", - "replicated": { - "requireSafeReplicaSize": false, - "size": 1, - "targetSizeRatio": 0.5 - } - } - ], - "metadataPool": { - "compressionMode": "", - "crushRoot": "", - "deviceClass": "", - "erasureCoded": { - "algorithm": "", - "codingChunks": 0, - "dataChunks": 0 - }, - "failureDomain": "", - "replicated": { - "requireSafeReplicaSize": false, - "size": 1, - "targetSizeRatio": 0 - } - }, - "metadataServer": { - "activeCount": 1, - "activeStandby": true, - "placement": {}, - "resources": {} - }, - "preservePoolsOnDelete": false, - "preserveFilesystemOnDelete": false - } - }, - { - "apiVersion": "ceph.rook.io/v1", - "kind": "CephRBDMirror", - "metadata": { - "name": "my-rbd-mirror", - "namespace": "rook-ceph" - }, - "spec": { - "annotations": null, - "count": 1, - "placement": { - "topologyKey": "kubernetes.io/hostname" - }, - "resources": null - } - } - ] diff --git a/deploy/olm/assemble/metadata-k8s.yaml b/deploy/olm/assemble/metadata-k8s.yaml deleted file mode 100644 index ca0da382b..000000000 --- a/deploy/olm/assemble/metadata-k8s.yaml +++ /dev/null @@ -1,14 +0,0 @@ -metadata: - annotations: - categories: Storage - description: Install and maintain Ceph Storage cluster - createdAt: 2019-05-13T18-08-04Z - support: https://slack.rook.io/ - certified: "false" - capabilities: Full Lifecycle -spec: - maintainers: - - name: The Rook Authors - email: cncf-rook-info@lists.cncf.io - provider: - name: The Rook Authors diff --git a/deploy/olm/assemble/metadata-ocp.yaml b/deploy/olm/assemble/metadata-ocp.yaml deleted file mode 100644 index 97472c923..000000000 --- a/deploy/olm/assemble/metadata-ocp.yaml +++ /dev/null @@ -1,19 +0,0 @@ -spec: - install: - spec: - clusterPermissions: - - rules: - - verbs: - - use - apiGroups: - - security.openshift.io - resources: - - securitycontextconstraints - resourceNames: - - privileged - serviceAccountName: rook-ceph-system - maintainers: - - name: Red Hat, Inc. - email: customerservice@redhat.com - provider: - name: Red Hat, Inc. diff --git a/deploy/olm/assemble/metadata-okd.yaml b/deploy/olm/assemble/metadata-okd.yaml deleted file mode 100644 index 2516a1ebf..000000000 --- a/deploy/olm/assemble/metadata-okd.yaml +++ /dev/null @@ -1,27 +0,0 @@ -metadata: - annotations: - categories: Storage - description: Install and maintain Ceph Storage cluster - createdAt: 2019-05-13T18-08-04Z - support: https://slack.rook.io/ - certified: "false" - capabilities: Full Lifecycle -spec: - install: - spec: - clusterPermissions: - - rules: - - verbs: - - use - apiGroups: - - security.openshift.io - resources: - - securitycontextconstraints - resourceNames: - - privileged - serviceAccountName: rook-ceph-system - maintainers: - - name: The Rook Authors - email: cncf-rook-info@lists.cncf.io - provider: - name: The Rook Authors diff --git a/deploy/olm/assemble/rook-ceph.package.yaml b/deploy/olm/assemble/rook-ceph.package.yaml deleted file mode 100644 index d31d9d695..000000000 --- a/deploy/olm/assemble/rook-ceph.package.yaml +++ /dev/null @@ -1,4 +0,0 @@ -packageName: rook-ceph -channels: -- name: beta - currentCSV: rook-ceph.v1.2.2 diff --git a/images/ceph/Dockerfile b/images/ceph/Dockerfile index 268926856..e1fdf1230 100644 --- a/images/ceph/Dockerfile +++ b/images/ceph/Dockerfile @@ -32,7 +32,6 @@ RUN curl --fail -sSL -o /s5cmd.tar.gz https://github.com/peak/s5cmd/releases/dow COPY rook toolbox.sh set-ceph-debug-level /usr/local/bin/ COPY ceph-monitoring /etc/ceph-monitoring COPY rook-external /etc/rook-external/ -COPY ceph-csv-templates /etc/ceph-csv-templates RUN useradd rook -u 2016 # 2016 is the UID of the rook user and also the year of the first commit in the project USER 2016 ENTRYPOINT ["/usr/local/bin/rook"] diff --git a/images/ceph/Makefile b/images/ceph/Makefile index e93dab7d9..041ef253b 100755 --- a/images/ceph/Makefile +++ b/images/ceph/Makefile @@ -39,24 +39,6 @@ endif # ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH} # (see: https://sdk.operatorframework.io/docs/installation/) S5CMD_ARCH = Linux-64bit -ifeq ($(REAL_HOST_PLATFORM),linux_amd64) -OPERATOR_SDK_PLATFORM = x86_64-linux-gnu -INCLUDE_CSV_TEMPLATES = true -endif -ifeq ($(REAL_HOST_PLATFORM),linux_arm64) -OPERATOR_SDK_PLATFORM = aarch64-linux-gnu -INCLUDE_CSV_TEMPLATES = true -S5CMD_ARCH = Linux-arm64 -endif -ifeq ($(REAL_HOST_PLATFORM),darwin_amd64) -OPERATOR_SDK_PLATFORM = x86_64-apple-darwin -INCLUDE_CSV_TEMPLATES = true -endif -ifneq ($(INCLUDE_CSV_TEMPLATES),true) -$(info ) -$(info NOT INCLUDING OLM/CSV TEMPLATES!) -$(info ) -endif # s5cmd's version S5CMD_VERSION = 2.2.1 @@ -79,16 +61,6 @@ do.build: @mkdir -p $(BUILD_CONTEXT_DIR)/rook-external/test-data @cp $(MANIFESTS_DIR)/create-external-cluster-resources.* $(BUILD_CONTEXT_DIR)/rook-external/ @cp ../../tests/ceph-status-out $(BUILD_CONTEXT_DIR)/rook-external/test-data/ - -ifeq ($(INCLUDE_CSV_TEMPLATES),true) - @$(MAKE) csv - @cp -r ../../build/csv $(BUILD_CONTEXT_DIR)/ceph-csv-templates - @rm $(BUILD_CONTEXT_DIR)/ceph-csv-templates/csv-gen.sh - @$(MAKE) csv-clean - -else - mkdir $(BUILD_CONTEXT_DIR)/ceph-csv-templates -endif @cd $(BUILD_CONTEXT_DIR) && $(SED_IN_PLACE) 's|BASEIMAGE|$(BASEIMAGE)|g' Dockerfile @if [ -z "$(BUILD_CONTAINER_IMAGE)" ]; then\ $(DOCKERCMD) build $(BUILD_ARGS) \ @@ -119,18 +91,6 @@ $(OPERATOR_SDK): @chmod +x $(OPERATOR_SDK) @$(OPERATOR_SDK) version -csv: $(OPERATOR_SDK) $(YQv3) - @echo generate csv with latest operator-sdk - @mkdir -p ../../build/csv/ceph - @../../build/csv/csv-gen.sh - @# #adding 2>/dev/null since CI doesn't seems to be creating bundle.Dockerfile file - @rm bundle.Dockerfile 2> /dev/null || true - -csv-clean: ## Remove existing OLM files. - @rm -fr ../../build/csv/ceph/${go env GOARCH} - @rm -f ../../build/csv/rook-ceph.clusterserviceversion.yaml - @git restore $(MANIFESTS_DIR)/crds.yaml ../../deploy/charts/rook-ceph/templates/resources.yaml - # reading from a file and outputting to the same file can have undefined results, so use this intermediate IMAGE_TMP="/tmp/rook-ceph-image-list" list-image: ## Create a list of images for offline installation