From 615a847edf8f0a58d26b58b973528c607daf4476 Mon Sep 17 00:00:00 2001 From: Gurney Buchanan Date: Thu, 25 Jun 2020 13:59:07 -0400 Subject: [PATCH] Use composite bundle by default (#103) * Updating acm-operator to patch in channel info, updating start to use COMPOSITE_BUNDLE by default * Reverting snapshot.ver and snapshots to old stable --- acm-operator/subscription.yaml | 2 +- snapshot.ver | 2 +- start.sh | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/acm-operator/subscription.yaml b/acm-operator/subscription.yaml index 932d68b59..f1c6c6814 100644 --- a/acm-operator/subscription.yaml +++ b/acm-operator/subscription.yaml @@ -3,7 +3,7 @@ kind: Subscription metadata: name: acm-operator-subscription spec: - channel: release-1.0 + channel: release-2.0 installPlanApproval: Automatic name: advanced-cluster-management source: acm-custom-registry diff --git a/snapshot.ver b/snapshot.ver index 037745cd6..c7cb5166d 100644 --- a/snapshot.ver +++ b/snapshot.ver @@ -1 +1 @@ -1.0.0-SNAPSHOT-2020-05-12-23-58-57 +1.0.0-SNAPSHOT-2020-05-12-23-58-57 \ No newline at end of file diff --git a/start.sh b/start.sh index 2ca046f3f..efc3d03d1 100755 --- a/start.sh +++ b/start.sh @@ -158,17 +158,24 @@ fi # Set the custom registry repo, defaulted to quay.io/open-cluster-management, but accomodate custom config focused on quay.io/acm-d for donwstream tests CUSTOM_REGISTRY_REPO=${CUSTOM_REGISTRY_REPO:-"quay.io/open-cluster-management"} +# Default COMPOSITE_BUNDLE to true +COMPOSITE_BUNDLE=${COMPOSITE_BUNDLE:-"true"} # If the user sets the COMPOSITE_BUNDLE flag to "true", then set to the `acm` variants of variables, otherwise the multicluster-hub version. if [[ "$COMPOSITE_BUNDLE" == "true" ]]; then OPERATOR_DIRECTORY="acm-operator"; else OPERATOR_DIRECTORY="multicluster-hub-operator"; fi; if [[ "$COMPOSITE_BUNDLE" == "true" ]]; then CUSTOM_REGISTRY_IMAGE="acm-custom-registry"; else CUSTOM_REGISTRY_IMAGE="multicluster-hub-custom-registry"; fi; +# Set the subscription channel, defaulted to snapshot-2.0 +if [[ "$COMPOSITE_BUNDLE" == "true" ]]; then SUBSCRIPTION_CHANNEL="release-2.0"; else CUSTOM_REGISTRY_IMAGE="snapshot-2.0"; fi; + printf "* Using: ${DEFAULT_SNAPSHOT}\n\n" echo "* Applying SNAPSHOT to multiclusterhub-operator subscription" ${SED} -i "s/newTag: .*$/newTag: ${DEFAULT_SNAPSHOT}/g" ./$OPERATOR_DIRECTORY/kustomization.yaml echo "* Applying CUSTOM_REGISTRY_REPO to multiclusterhub-operator subscription" ${SED} -i "s|newName: .*$|newName: ${CUSTOM_REGISTRY_REPO}/${CUSTOM_REGISTRY_IMAGE}|g" ./$OPERATOR_DIRECTORY/kustomization.yaml +echo "* Applying SUBSCRIPTION_CHANNEL to multiclusterhub-operator subscription" +${SED} -i "s|channel: .*$|channel: ${SUBSCRIPTION_CHANNEL}|g" ./$OPERATOR_DIRECTORY/subscription.yaml echo "* Applying multicluster-hub-cr values" ${SED} -i "s/example-multiclusterhub/multiclusterhub/" ./multiclusterhub/example-multiclusterhub-cr.yaml