kubeval
kubeval copied to clipboard
Alert when there is no schema available for an specific K8s version
Hello,
I was wondering if it will be a good idea of an enhancement to WARN or FAIL with error when executing kubeval with a kubernetes version where there are no schemas available.
Actually, for example launching this command:
kubeval --ignore-missing-schemas -v 1.17.5 -d .\infrastructure\
I want to pass --ignore-missing-schemas
because of CRDs and other schemas which can be not found. But I will be able to not ignore missing base schemas of that kubernetes version.
Will provide an output with all YAML files as WARN because the schema is not found:
WARN - infrastructure\core\manifests\internal-load-balancer.yaml containing a Service (kube-system.internal-app) was not validated against a schema
WARN - infrastructure\core\manifests\rbac\cluster-admins.yaml containing a ClusterRoleBinding (cluster-admins) was not validated against a schema
WARN - infrastructure\core\manifests\rbac\cluster-readers.yaml containing a ClusterRoleBinding (cluster-readers) was not validated against a schema
It will be possible if a kubernetes version is not found, error with another message or try to validate against the nearest lower minor version? Do you think it will be a good enhancement?
Using kubeval version as follows:
kubeval --version
Version: 0.15.0
Commit: df50ea7fd4fd202458002a40a6a39ffbb3125bad
Date: 2020-04-14T09:32:29Z
I like the idea of looking up the nearest lower minor version automatically, I did not notice this until we upgraded our kubeval version, looks like it might have been not validating things as I expected as log output has changed and alerted me to this fact.
related to #250