Skip to content

BackendTrafficPolicy openapi schemas do not validate correctly #4746

@nicks

Description

@nicks

Description:
I'm trying to use kubeconform to validate BackendTrafficPolicy

I get this error:

stdin - BackendTrafficPolicy my-policy is invalid: problem validating schema. Check JSON formatting: jsonschema: '/spec/healthCheck/active/interval' does not validate with https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/gateway.envoyproxy.io/backendtrafficpolicy_v1alpha1.json#/properties/spec/properties/healthCheck/properties/active/properties/interval/format: '3s' is not valid 'duration'
stdin - BackendTrafficPolicy my-policy is invalid: problem validating schema. Check JSON formatting: jsonschema: '/spec/healthCheck/active/timeout' does not validate with https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/gateway.envoyproxy.io/backendtrafficpolicy_v1alpha1.json#/properties/spec/properties/healthCheck/properties/active/properties/timeout/format: '20ms' is not valid 'duration'

Additional info:
I think the openapi schemas that we're generating are wrong. Particularly this line:

They say that timeout and interval are openapi durations. But they're not, they're a Kubernetes-specific duration format.

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't workingrelease-noteIndicates a required release note

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions