diff --git a/instance-applications/130-ibm-mas-suite/templates/05-postsync-add-label_Job.yaml b/instance-applications/130-ibm-mas-suite/templates/05-postsync-add-label_Job.yaml index a040257d9..f2fc596a4 100644 --- a/instance-applications/130-ibm-mas-suite/templates/05-postsync-add-label_Job.yaml +++ b/instance-applications/130-ibm-mas-suite/templates/05-postsync-add-label_Job.yaml @@ -130,18 +130,13 @@ spec: fi done - oc get routes -n ${SUITE_NAMESPACE} export routes=$(oc get routes -n ${SUITE_NAMESPACE} -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}') echo "Add label to routes updated ${routes}" - for route in $routes do - echo "Adding -1" + for route in $routes; do echo "Adding label to route $route" oc patch route/${route} -p '{"metadata":{"labels":{"type":"external"}}}' - echo "Adding -2" done - - sleep 90000 restartPolicy: Never serviceAccountName: "mas-route-sa" backoffLimit: 4 diff --git a/instance-applications/510-550-ibm-mas-suite-app-config/templates/04-postsync-add-label_Job.yaml b/instance-applications/510-550-ibm-mas-suite-app-config/templates/04-postsync-add-label_Job.yaml index 959f8e4e1..6afc16c89 100644 --- a/instance-applications/510-550-ibm-mas-suite-app-config/templates/04-postsync-add-label_Job.yaml +++ b/instance-applications/510-550-ibm-mas-suite-app-config/templates/04-postsync-add-label_Job.yaml @@ -147,12 +147,12 @@ spec: fi done - export ROUTELIST=$(oc get routes -n $MAS_APP_NAMESPACE -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') - echo "Add label to routes ${ROUTELIST}" + export routes=$(oc get routes -n ${MAS_APP_NAMESPACE} -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}') + echo "Add label to routes ${routes}" - for ROUTE in $ROUTELIST do - echo "Adding label to route - ${ROUTE}" - oc patch route/${ROUTE} -p '{"metadata":{"labels":{"type":"external"}}}' + for route in $routes; do + echo "Adding label to route - ${route}" + oc patch route/${route} -p '{"metadata":{"labels":{"type":"external"}}}' done fi