Open llxp opened 9 months ago
Hi @llxp ! Could you expand how this is different from the current behaviour for kubeconform? It should already mark tests as failed when -strict is set and additional properties are found? See this test:
What exactly are you trying to achieve?
This pull request changes the strict mode in such a way, that when there are additional properties in the schema, it throws an error. It sets additional properties to false in the schema, if strict mode is set. Also introduces an additional parameter to exclude specific properties using a yaml path. By default, if no exception is set, the metadata property is excluded, as most k8s yaml schemes are missing it and thus would give out false positives.