Closed Hiruma31 closed 5 years ago
The cronjob validation also passes when using the wrong apiVersion
Could you try with --strict
as well and let me know what you get?
The Kubernetes API is fine with unknown fields, but the strict flag will check for anything not described in the schema.
I'm going to close this issue as this should fail with the strict flag, which is also now documented. Kubeval 8.0+ also correctly handles the apiVersion issue.
With for example a CronJob definition like
kubeval -v 1.8.2 passes.
However, the spec.jobTemplate.spec.annotations is missing metadata so when applying, kubectl throw an error pointing out to the right syntax which would be spec.jobTemplate.spec.metadata.annotations