kube-no-trouble
kube-no-trouble copied to clipboard
Unable to give multiple manifest files for scanning
Is there a way we can provide multiple files using -f flag for scanning.
I couldn't find docs on how to format multiple names, neither in kube-no-trouble
nor in the flags library spf13/pflag
that this kubent uses.
But I found you can do this if you want to provide the filenames with -f
:
kubent -f file1.yaml,file2.yaml
What I do is this, however:
# The - means STDIN
cat *.yaml |kubent -f -
# Actually I mostly do this, specifically:
cat **/*.yaml | kubent -f
Or if you have a command that generates the YAML, you could put that after the -f
if you'd like:
kubent -f <(cat *.yaml)
kubent -f <(cat **/*.yaml)
I guess there's this as well:
FILES=($(ls *.yaml)); kubent ${FILES[@]/#/-f} --helm3=false -c=false
but I think that's a bit complicated.
Found here
You can pipe too. I feel this issue is fine.