Open levenleven opened 1 year ago
Hi, could you maybe provide a diff to the "Usage" documentation to explain how you would see this being used first? Thanks!
👋 Thanks for looking into this, I've updated the description hopefully it makes sense now. So basically the suggestion is to allow skipping the apiVersion
.
Before:
-skip string
comma-separated list of kinds or GVKs to ignore
After:
-skip string
comma-separated list of kinds, api versions or GVKs to ignore
Would like to see support for this as well.
My use case is with Gatekeeper.
This allows you to create OPA policies by first creating a templates.gatekeeper.sh/v1/ConstraintTemplate
resource which contains a OpenAPIV3Schema schema and then one or more constraints.gatekeeper.sh/v1beta1/<MY_CUSTOM_CONSTRAINT>
resources based on that template.
See https://open-policy-agent.github.io/gatekeeper/website/docs/howto#constraint-templates
I would like to ignore all constraints.gatekeeper.sh/v1beta1
because it's pretty much impossible to keep our schemas up to date with those constraint resources (or the list for -skip
).
Currently
-skip
allows providing akind
orversion/kind
https://github.com/yannh/kubeconform/blob/ee7c49858007a5644743c458fb31113c0d6a921c/pkg/validator/validator.go#L107-L111
In some cases it would be handy to be able to skip all resources from the api version altogether e.g.
instead of skipping kinds one by one like
Would you accept PR introducing such functionality?