Skip to content

Commit daef981

Browse files
authored
Proper downgrade hazelcast to 5.5.0 (#202)
1 parent c05c77f commit daef981

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

scripts/deploy-community-operator.sh

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,30 @@ rm ./temp/rendered-local-community-operator-group.yaml
5050

5151
# Create the Subscription
5252
mkdir -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
5460
oc apply --filename ./temp/rendered-local-community-operator-subscription.yaml
5561
cat ./temp/rendered-local-community-operator-subscription.yaml
5662
rm ./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;}
5977
CSV_CHECK_RETRIES=24 # 240 seconds
6078
while [[ $(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"

scripts/init-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ OPERATOR_IMAGE_FULL_NAME=$REGISTRY$DIRECTORY$OPERATOR_IMAGE
1515
OPERATOR_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
1919
COMMUNITY_OPERATOR_BASE=hazelcast-platform-operator
2020

2121
# Truncate registry pod name if more than 63 characters

test-target/community-operator-subscription.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ metadata:
55
namespace: {{ TNF_EXAMPLE_CNF_NAMESPACE }}
66
spec:
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 }}

0 commit comments

Comments
 (0)