Skip to content

Commit

Permalink
temporary workaround: restart OLM pods before upgrade to trigger the …
Browse files Browse the repository at this point in the history
…upgrade

Signed-off-by: orenc1 <ocohen@redhat.com>
  • Loading branch information
orenc1 committed Oct 4, 2021
1 parent 457e1ef commit 1fdf254
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hack/upgrade-test-index-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ HCO_SUBSCRIPTION=$(${CMD} get subscription -n ${HCO_NAMESPACE} -o name)
OLD_INSTALL_PLAN=$(oc -n "${HCO_NAMESPACE}" get "${HCO_SUBSCRIPTION}" -o jsonpath='{.status.installplan.name}')
${CMD} patch ${HCO_SUBSCRIPTION} -n ${HCO_NAMESPACE} -p "{\"spec\": {\"channel\": \"${TARGET_CHANNEL}\"}}" --type merge

# TEMP HACK TO UNLOCK UPGRADE
sleep 15
for OLM_APP_LABEL in olm-operator catalog-operator
do
${CMD} delete -n openshift-operator-lifecycle-manager "$(${CMD} get pod -n openshift-operator-lifecycle-manager -l app=${OLM_APP_LABEL} -o name)"
done
Msg "Wait up to 5 minutes for the new installPlan to appear, and approve it to begin upgrade"
INSTALL_PLAN_APPROVED=false
for _ in $(seq 1 60); do
Expand Down

0 comments on commit 1fdf254

Please sign in to comment.