Compare commits

..

2 Commits

Author SHA1 Message Date
83978cc429
Fix namespace selector
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2021-12-08 08:34:05 +00:00
1dfe84005b
Fix bash substring for older bash
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
2021-12-08 08:22:05 +00:00

View File

@ -51,8 +51,8 @@ fi
NAMES="$(kubectl api-resources --namespaced --verbs list -o name | tr '\n' ,)" NAMES="$(kubectl api-resources --namespaced --verbs list -o name | tr '\n' ,)"
if [ $ALL_NAMESPACES ]; then if [[ "$ALL_NAMESPACES" == "true" ]]; then
kubectl get "${NAMES:0:-1}" --show-kind --ignore-not-found ${LABEL} -A kubectl get "${NAMES::${#NAMES}-1}" --show-kind --ignore-not-found ${LABEL} -A
else else
kubectl get "${NAMES:0:-1}" --show-kind --ignore-not-found ${LABEL} -n ${NAMESPACE} kubectl get "${NAMES::${#NAMES}-1}" --show-kind --ignore-not-found ${LABEL} -n ${NAMESPACE}
fi fi