Restore omitempty on ServerStorageVersion fields

This commit is contained in:
Joel Speed 2026-02-12 17:59:07 +00:00
parent 319978e216
commit 82a9a99a44
No known key found for this signature in database
GPG key ID: 6E80578D6751DEFB
4 changed files with 3 additions and 9 deletions

View file

@ -5,7 +5,6 @@
"description": "An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend.",
"properties": {
"apiServerID": {
"default": "",
"description": "The ID of the reporting API server.",
"type": "string"
},
@ -19,7 +18,6 @@
"x-kubernetes-list-type": "set"
},
"encodingVersion": {
"default": "",
"description": "The API server encodes the object to this version when persisting it in the backend (e.g., etcd).",
"type": "string"
},

View file

@ -7084,7 +7084,6 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_ServerStorageVersion(ref common
"apiServerID": {
SchemaProps: spec.SchemaProps{
Description: "The ID of the reporting API server.",
Default: "",
Type: []string{"string"},
Format: "",
},
@ -7092,7 +7091,6 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_ServerStorageVersion(ref common
"encodingVersion": {
SchemaProps: spec.SchemaProps{
Description: "The API server encodes the object to this version when persisting it in the backend (e.g., etcd).",
Default: "",
Type: []string{"string"},
Format: "",
},

View file

@ -71,18 +71,18 @@ type StorageVersionStatus struct {
type ServerStorageVersion struct {
// The ID of the reporting API server.
// +required
APIServerID string `json:"apiServerID" protobuf:"bytes,1,opt,name=apiServerID"`
APIServerID string `json:"apiServerID,omitempty" protobuf:"bytes,1,opt,name=apiServerID"`
// The API server encodes the object to this version when persisting it in
// the backend (e.g., etcd).
// +required
EncodingVersion string `json:"encodingVersion" protobuf:"bytes,2,opt,name=encodingVersion"`
EncodingVersion string `json:"encodingVersion,omitempty" protobuf:"bytes,2,opt,name=encodingVersion"`
// The API server can decode objects encoded in these versions.
// The encodingVersion must be included in the decodableVersions.
// +listType=set
// +required
DecodableVersions []string `json:"decodableVersions" protobuf:"bytes,3,opt,name=decodableVersions"`
DecodableVersions []string `json:"decodableVersions,omitempty" protobuf:"bytes,3,opt,name=decodableVersions"`
// The API server can serve these versions.
// DecodableVersions must include all ServedVersions.

View file

@ -1443,7 +1443,6 @@ var schemaYAML = typed.YAMLObject(`types:
- name: apiServerID
type:
scalar: string
default: ""
- name: decodableVersions
type:
list:
@ -1453,7 +1452,6 @@ var schemaYAML = typed.YAMLObject(`types:
- name: encodingVersion
type:
scalar: string
default: ""
- name: servedVersions
type:
list: