Skip to content

Commit

Permalink
k8s lint
Browse files Browse the repository at this point in the history
Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Jul 19, 2024
1 parent f04b2d0 commit 1823cbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .k8s-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ kleftovers() {

# find crds without instances
kcrdunused() {
kubectl get crds -o jsonpath='{.items[*].metadata.name}' | tr ' ' '\n' | xargs -P16 -I "{}" sh -c '[ "$(kubectl get {} --no-headers -A 2> /dev/null | wc -l)" -eq 0 ] && echo "{}"'
# shellcheck disable=SC2016
kubectl get crds -o jsonpath='{.items[*].metadata.name}' | tr ' ' '\n' | \
xargs -P16 -I "{}" sh -c '[ "$(kubectl get {} --no-headers -A 2> /dev/null | wc -l)" -eq 0 ] && echo "{}"'
}

# check versions in all contexts
Expand Down

0 comments on commit 1823cbb

Please sign in to comment.