kubeval icon indicating copy to clipboard operation
kubeval copied to clipboard

Validation of Kustomization files

Open alisonjenkins opened this issue 2 years ago • 1 comments

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)?

alisonjenkins avatar Jan 15 '22 18:01 alisonjenkins

Also this one ... Kustomizations Validation

muhammedsaidkaya avatar Aug 12 '22 16:08 muhammedsaidkaya