kubeval
kubeval copied to clipboard
Validation of Kustomization files
Over Christmas I hit an issue where I had gotten confused and tried to put a Flux CRD Kustomization in a file called kustomization.yaml.
This was giving me unusual errors (I filed an issue against FluxCD here: https://github.com/fluxcd/flux2/issues/2251).
The problem is that the file name kustomization.yaml is reserved for Kustomize's variant of Kustomization and if you make the mistake of putting anything else in a file of that name you will get unhelpful errors.
Would it be possible to have kubeval validate kustomization.yaml files and if the contents of a file by that name does not fit a Kustomize Kustomization schema and mentions a apiVersion and kind that it warns that the file name kustomization.yaml is reserved for Kustomize and that you should name your file (or something to that effect)?
Also this one ... Kustomizations Validation