Skip to content

Commit

Permalink
skip resourcetypes with no resources
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlange committed Jan 11, 2018
1 parent 29b1f23 commit befa239
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions entrypoint.sh
Expand Up @@ -71,6 +71,7 @@ for namespace in $NAMESPACES; do
fi

kubectl --namespace="${namespace}" get "$type" $label_selector -o custom-columns=SPACE:.metadata.namespace,KIND:..kind,NAME:.metadata.name --no-headers | while read -r a b name; do
[ -z $name ] && continue

kubectl --namespace="${namespace}" get --export -o=json "$type" "$name" | jq --sort-keys \
'select(.type!="kubernetes.io/service-account-token") |
Expand Down

0 comments on commit befa239

Please sign in to comment.