Skip to content

Timestamps should be "string" or "null" #41

@datho7561

Description

@datho7561

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions