Skip to content

Commit

Permalink
Merge pull request #9288 from leseb/add-missing-crds
Browse files Browse the repository at this point in the history
build: add missing topic and notification crd to csv
  • Loading branch information
leseb committed Dec 1, 2021
2 parents a700ecb + b4a8b01 commit 70fab7c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deploy/olm/assemble/metadata-common.yaml
Expand Up @@ -153,6 +153,16 @@ spec:
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.
displayName: Rook-Ceph
description: |
Expand Down
12 changes: 12 additions & 0 deletions deploy/olm/generate-rook-csv.sh
Expand Up @@ -10,6 +10,7 @@ ASSEMBLE_FILE_K8S="$OLM_CATALOG_DIR/assemble/metadata-k8s.yaml"
ASSEMBLE_FILE_OCP="$OLM_CATALOG_DIR/assemble/metadata-ocp.yaml"
ASSEMBLE_FILE_OKD="$OLM_CATALOG_DIR/assemble/metadata-okd.yaml"
PACKAGE_FILE="$OLM_CATALOG_DIR/assemble/rook-ceph.package.yaml"
CRDS_FILE="deploy/examples/crds.yaml"
SUPPORTED_PLATFORMS='k8s|ocp|okd'

operator_sdk="${OPERATOR_SDK:-operator-sdk}"
Expand Down Expand Up @@ -262,6 +263,17 @@ function apply_rook_op_img(){
"${YQ_CMD_WRITE[@]}" "$CSV_FILE_NAME" spec.install.spec.deployments[0].spec.template.spec.containers[0].image "$ROOK_OP_VERSION"
}

function validate_crds() {
crds=$(awk '/Kind:/ {print $2}' $CRDS_FILE | grep -vE "ObjectBucketList|ObjectBucketClaimList" | sed 's/List//' | sort)
csv_crds=$(awk '/kind:/ {print $3}' "$CSV_FILE_NAME" | sort)
if [ "$crds" != "$csv_crds" ]; then
echo "CRDs in $CSV_FILE_NAME do not match CRDs in $CRDS_FILE, see the diff below"
echo ""
diff <(echo "$crds") <(echo "$csv_crds")
exit 1
fi
}

########
# MAIN #
########
Expand Down

0 comments on commit 70fab7c

Please sign in to comment.