Skip to content

Commit

Permalink
[patch] [MASCORE-3232] oc route template
Browse files Browse the repository at this point in the history
  • Loading branch information
padmankosalaram committed Aug 7, 2024
1 parent 024172a commit a57814b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a57814b

Please sign in to comment.