api icon indicating copy to clipboard operation
api copied to clipboard

`PodFailurePolicyRule` fails to validate if `onPodConditions` is not set.

Open Tanemahuta opened this issue 1 year ago • 3 comments

As stated in the docs https://github.com/kubernetes/api/blob/2f9553831ec24dc60e3e1c3a374fb63ca091688f/batch/v1/types.go#L182 one of fields must be present.

But https://github.com/kubernetes/api/blob/2f9553831ec24dc60e3e1c3a374fb63ca091688f/batch/v1/types.go#L204 lacks +optional. This, the OpenAPI validation fails, if onPodConditions is not set.

Background: we are using kyverno, which uses the OpenAPI validation after applying a policy.

Tanemahuta avatar May 17 '23 05:05 Tanemahuta