when kustomize build gets error, kubeval recognizes the output as empty YAML and gives PASS. use PIPESTATUS to properly capture exit status of piped command as workaround.
things like that could happen:
$ kustomize build blabla.yaml | kubeval
Error: error creating new loader with git: url lacks orgRepo: blabla.yaml, dir: evalsymlink failure on 'blabla.yaml' : lstat /home/raphael/repos/flux2-kustomize-helm-example/blabla.yaml: no such file or directory, get: invalid source string: blabla.yaml
PASS - stdin contains an empty YAML document
when
kustomize build
gets error, kubeval recognizes the output as empty YAML and gives PASS. usePIPESTATUS
to properly capture exit status of piped command as workaround.things like that could happen: