Skip to content

Commit

Permalink
No err message on node found
Browse files Browse the repository at this point in the history
  • Loading branch information
mimiteto committed Dec 13, 2024
1 parent 3c3307e commit 253f708
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hacks/ops-pod
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ if [[ -n ${node_of_pod} ]]; then
else
echo "Node name provided ..."
# shellcheck disable=SC2076
if [[ $(kubectl get nodes -o jsonpath='{.items[*].metadata.name}') =~ " ${node} " ]]; then
if kubectl get nodes -o jsonpath='{.items[*].metadata.name}' | grep -q "\b${node}\b"; then
echo -e "Deploying ops pod on ${node}\n"
else
echo -e "Error: node ${node} does not exist in the cluster.\n"
Expand Down

0 comments on commit 253f708

Please sign in to comment.