forked from instrumenta/kubernetes-json-schema
-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
When validating the YAML for a resource from the cluster against the schema, errors are reported when timestamps are null. I believe this is a bug, since YAML given during kubectl edit contains timestamp fields with null.
See redhat-developer/yaml-language-server#1005 for an example. I can also reproduce this issue by creating a deployment from a container, then doing kubectl edit on it.
I think this can be fixed by converting occurences of "io.k8s.apimachinery.pkg.apis.meta.v1.Time" to "string" or "null" in the schema, in a similar way to how it's done for some other fields here: https://github.com/yannh/openapi2jsonschema/blob/master/openapi2jsonschema/command.py#L83.
fbricon and msivasubramaniaan
Metadata
Metadata
Assignees
Labels
No labels