File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,30 @@ rm ./temp/rendered-local-community-operator-group.yaml
5050
5151# Create the Subscription
5252mkdir -p ./temp
53- cat ./test-target/community-operator-subscription.yaml | OPERATOR_NAME=$COMMUNITY_OPERATOR_BASE CATALOG_SOURCE=$CATALOG_SOURCE CATALOG_NAMESPACE=$CATALOG_NAMESPACE TNF_EXAMPLE_CNF_NAMESPACE=$TNF_EXAMPLE_CNF_NAMESPACE " $SCRIPT_DIR " /mo > ./temp/rendered-local-community-operator-subscription.yaml
53+ cat ./test-target/community-operator-subscription.yaml |
54+ OPERATOR_BASE=$COMMUNITY_OPERATOR_BASE \
55+ OPERATOR_NAME=$COMMUNITY_OPERATOR_NAME \
56+ CATALOG_SOURCE=$CATALOG_SOURCE \
57+ CATALOG_NAMESPACE=$CATALOG_NAMESPACE \
58+ TNF_EXAMPLE_CNF_NAMESPACE=$TNF_EXAMPLE_CNF_NAMESPACE \
59+ " $SCRIPT_DIR " /mo > ./temp/rendered-local-community-operator-subscription.yaml
5460oc apply --filename ./temp/rendered-local-community-operator-subscription.yaml
5561cat ./temp/rendered-local-community-operator-subscription.yaml
5662rm ./temp/rendered-local-community-operator-subscription.yaml
5763
58-
64+ # Gives time to the resource to come up and approves installation plan for the
65+ # version.
66+ sleep 30
67+ oc patch installplan \
68+ --namespace " $TNF_EXAMPLE_CNF_NAMESPACE " \
69+ --type merge \
70+ --patch ' {"spec":{"approved":true}}' \
71+ " $( \
72+ oc get installplan \
73+ --namespace " $TNF_EXAMPLE_CNF_NAMESPACE " |
74+ grep " $COMMUNITY_OPERATOR_NAME " |
75+ cut -f 1 -d \ \
76+ ) " || { printf >&2 ' Unable to approve the installation plan.\n' ; exit 1; }
5977CSV_CHECK_RETRIES=24 # 240 seconds
6078while [[ $( oc get csv -n " $TNF_EXAMPLE_CNF_NAMESPACE " " $COMMUNITY_OPERATOR_NAME " -o go-template=" {{.status.phase}}" ) != " Succeeded" && " $CSV_CHECK_RETRIES " -gt 0 ]]; do
6179 echo " waiting for $COMMUNITY_OPERATOR_NAME installation to succeed"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ OPERATOR_IMAGE_FULL_NAME=$REGISTRY$DIRECTORY$OPERATOR_IMAGE
1515OPERATOR_REGISTRY_POD_NAME_FULL=$( echo $OPERATOR_BUNDLE_IMAGE_FULL_NAME | sed ' s/[\/|\.|:]/-/g' )
1616
1717# Community operator name
18- COMMUNITY_OPERATOR_NAME=hazelcast-platform-operator.v5.6 .0
18+ COMMUNITY_OPERATOR_NAME=hazelcast-platform-operator.v5.5 .0
1919COMMUNITY_OPERATOR_BASE=hazelcast-platform-operator
2020
2121# Truncate registry pod name if more than 63 characters
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ metadata:
55 namespace : {{ TNF_EXAMPLE_CNF_NAMESPACE }}
66spec :
77 channel : alpha
8- name : {{ OPERATOR_NAME }}
8+ name : {{ OPERATOR_BASE }}
99 source : {{ CATALOG_SOURCE }}
1010 sourceNamespace : {{ CATALOG_NAMESPACE }}
11+ installPlanApproval : Manual
12+ startingCSV : {{ OPERATOR_NAME }}
You can’t perform that action at this time.
0 commit comments