Skip to content

Commit

Permalink
Increase verbosity when failing to fetch networks from configuration …
Browse files Browse the repository at this point in the history
…map.
  • Loading branch information
Arik Kfir committed Nov 28, 2017
1 parent 9cfe701 commit 05ef80a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scan-ingress-networks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ fi
while true; do
NETWORKS=$(kubectl get "configmap/${CONFIG_MAP_NAME}" -n "${CONFIG_MAP_NAMESPACE}" --output=json | jq '.data | map_values(. | split(","))')
if [[ $? != 0 ]]; then
echo "Failed fetching networks" >&2
exit 1
elif [[ -z "${NETWORKS}" ]]; then
echo "Empty response received while fetching networks" >&2
exit 1
fi

Expand Down

0 comments on commit 05ef80a

Please sign in to comment.