Skip to content

Standard CRD manifests contain invalid null values in .status fields, breaking schema validationΒ #4402

Closed

Description

@Skaronator

What happened:

The install YAML manifests for v1.4.1 (and potentially earlier versions) contain explicit null values for .status.conditions and .status.storedVersions in the CustomResourceDefinition objects.

Example from gateway.networking.k8s.io_gateways.yaml:

status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null

According to the Kubernetes API Reference (CRD v1), these fields cannot be null:

  • .status.conditions: Must be an array (or omitted).
  • .status.storedVersions: Must be an string array (or omitted).

This causes CI/CD pipelines using strict validation tools like kubeconform to fail.

What you expected to happen:

Static manifest files intended for installation should ideally not contain a .status block at all.
If the block is present, the fields within it must adhere to the OpenAPI schema (i.e., be empty arrays rather than null).

How to reproduce it (as minimally and precisely as possible):

You can validate the release artifact against the official Kubernetes JSON schema using kubeconform:

$ curl -sL https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.1/standard-install.yaml | kubeconform -schema-location "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/{{.NormalizedKubernetesVersion}}/{{.ResourceKind}}.json"
stdin - CustomResourceDefinition gatewayclasses.gateway.networking.k8s.io is invalid: problem validating schema. Check JSON formatting: jsonschema validation failed with 'https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master/customresourcedefinition.json#' - at '/status': validation failed   - at '/status/conditions': got null, want array   - at '/status/storedVersions': got null, want array
stdin - CustomResourceDefinition backendtlspolicies.gateway.networking.k8s.io is invalid: problem validating schema. Check JSON formatting: jsonschema validation failed with 'https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master/customresourcedefinition.json#' - at '/status': validation failed   - at '/status/conditions': got null, want array   - at '/status/storedVersions': got null, want array
stdin - CustomResourceDefinition referencegrants.gateway.networking.k8s.io is invalid: problem validating schema. Check JSON formatting: jsonschema validation failed with 'https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master/customresourcedefinition.json#' - at '/status': validation failed   - at '/status/conditions': got null, want array   - at '/status/storedVersions': got null, want array
stdin - CustomResourceDefinition grpcroutes.gateway.networking.k8s.io is invalid: problem validating schema. Check JSON formatting: jsonschema validation failed with 'https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master/customresourcedefinition.json#' - at '/status': validation failed   - at '/status/storedVersions': got null, want array   - at '/status/conditions': got null, want array
stdin - CustomResourceDefinition gateways.gateway.networking.k8s.io is invalid: problem validating schema. Check JSON formatting: jsonschema validation failed with 'https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master/customresourcedefinition.json#' - at '/status': validation failed   - at '/status/conditions': got null, want array   - at '/status/storedVersions': got null, want array
stdin - CustomResourceDefinition httproutes.gateway.networking.k8s.io is invalid: problem validating schema. Check JSON formatting: jsonschema validation failed with 'https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master/customresourcedefinition.json#' - at '/status': validation failed   - at '/status/conditions': got null, want array   - at '/status/storedVersions': got null, want array

Anything else we need to know?:

Thanks πŸ’š

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug.
    on Jan 5, 2026
  2. jkleinlercher commented on Feb 25, 2026

    @jkleinlercher

    These null values breaks all kubeconform tests in GitOps pipelines, and I guess the fix would be rather easy?

  3. youngnick commented on Feb 25, 2026

    @youngnick
    Contributor

    These YAML files are all generated, so the fix will be to make the generator omit these fields correctly.

  4. jkleinlercher commented on Feb 25, 2026

    @jkleinlercher

    I ask myself if the status fields in the CRDs are needed anyways. Haven’t seen them in other crds

  5. MatteoFari commented on Mar 24, 2026

    @MatteoFari
    Contributor

    /assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions