yannh / kubeconform

A FAST Kubernetes manifests validator, with support for Custom Resources!
Apache License 2.0
2.07k stars 116 forks source link

Feature request: Support skipping kind/name #255

Open Sonlis opened 6 months ago

Sonlis commented 6 months ago

In our workflow, we first build the kustomization and then validates the built file. This is useful when working with Kustomize patches that modify the end resource. That means however that all resources end up in the same yaml file.

With the current skip skip options, there is only the possibility to skip either a file, a version/kind or a kind. The file cannot be skipped as it is the result of a kustomize build, and the kind cannot be skipped as it would skip all other resources of the same kind in the file.

For example, let's say we want to skip an nginx deployment within the file. It would be helpful to be able to skip v1/Deployment/nginx.

Sonlis commented 6 months ago

After some thoughts, this may not be useful at all as kustomize should catch those errors when building. I'll let this open in case someone comes up with a situation where this would be useful; otherwise feel free to close it.