Skip to content

Commit

Permalink
update job to remove status
Browse files Browse the repository at this point in the history
  • Loading branch information
whitfiea committed Dec 5, 2024
1 parent a49c07e commit 41a02aa
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ rules:
resources:
- manageworkspaces
- manageofflineupgraderequests
- manageofflineupgraderequests/status

---
kind: RoleBinding
Expand Down Expand Up @@ -155,7 +156,8 @@ spec:
MANAGE_DEPLOYMENTREADY_MSG=$(oc get ManageWorkspace -n ${MAS_APP_NAMESPACE} ${MAS_INSTANCE_ID}-${MAS_WORKSPACE_ID} -o=jsonpath="{.status.conditions[?(@.type=='DeploymentReady')].message}")
if [[ $MANAGE_DEPLOYMENTREADY_MSG == *"$ONLINE_UPDATE_DONE_MSG"* ]]; then
echo "Status found is: ${MANAGE_DEPLOYMENTREADY_MSG}"
echo "ManageWorkspace indicates it is ready for offline upgrade, patching manageofflineupgraderequest-${MAS_WORKSPACE_ID} to requested"
echo "ManageWorkspace indicates it is ready for offline upgrade, patching manageofflineupgraderequest-${MAS_WORKSPACE_ID} to requested, and removing old status"
oc patch -n ${MAS_APP_NAMESPACE} manageofflineupgraderequest.apps.mas.ibm.com manageofflineupgraderequest-${MAS_WORKSPACE_ID} --subresource status --type=json -p="[{'op': 'remove', 'path': '/status'}]"
oc patch -n ${MAS_APP_NAMESPACE} manageofflineupgraderequests.apps.mas.ibm.com manageofflineupgraderequest-${MAS_WORKSPACE_ID} --type merge -p $'spec:\n stage: requested'
echo "Patch complete"
else
Expand Down

0 comments on commit 41a02aa

Please sign in to comment.