updated kubernetes_check_objects_namespaces.sh

pull/16/head
Hari Sekhon 2 years ago
parent 122ce38ab3
commit 4dd0e31809

@ -50,7 +50,7 @@ if [ -n "$objects_not_namespaced" ]; then
yaml_objects_without_namespace="$(yq 'select(.kind | test("^('"$regex"')$") | not)' <<< "$yaml_objects_without_namespace")"
fi
num_objects_without_namespace="$(grep -c '^kind:' <<< "$yaml_objects_without_namespace")"
num_objects_without_namespace="$(grep -c '^kind:' <<< "$yaml_objects_without_namespace" || :)"
if [ "$num_objects_without_namespace" = 0 ]; then
echo "OK: all objects have a namespace specified" >&2

Loading…
Cancel
Save