Skip to content

Commit

Permalink
Use composite bundle by default (#103)
Browse files Browse the repository at this point in the history
* Updating acm-operator to patch in channel info, updating start to use COMPOSITE_BUNDLE by default

* Reverting snapshot.ver and snapshots to old stable
  • Loading branch information
gurnben authored Jun 25, 2020
1 parent 1157a27 commit 615a847
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion acm-operator/subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion snapshot.ver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0-SNAPSHOT-2020-05-12-23-58-57
1.0.0-SNAPSHOT-2020-05-12-23-58-57
7 changes: 7 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 615a847

Please sign in to comment.