kubeval
kubeval copied to clipboard
Warning that causes Kubeval to exit with non-zero status
Hi,
I am having a warning that causes Kubeval to exit with non-zero status .
WARN - ***.yaml contains an invalid ClusterIssuer (letsencrypt-staging) - spec.acme.solvers.0.dns01: Invalid type. Expected: object, given: null
After fixing it everything works fine - other warnings do not cause the kubeval failure.
In my opinion this is issue shouldn't be reported as WARN
but as ERR
.
Here is how I am running it:
kubeval --skip-kinds CustomResourceDefinition --ignored-filename-patterns "crd,knative-services" --force-color -d /tmp/k8s --schema-location /tmp/schema --kubernetes-version "1.16.0"
and versions:
kubeval --version
Version: 0.15.0
Commit: df50ea7fd4fd202458002a40a6a39ffbb3125bad
Date: 2020-04-14T09:32:29Z
I agree that the behaviour between warnings is inconsistent, some cause an exit code of 0 some not. I agree with you - I think most warnings should just be reported as errors and cause a return code >0.
bumping this as it would be nice to get a report as to which caused the exitcode != 0