define endpointslice.endpoints as optional

The field is actually optional but defined as required in OpenAPI, causing issues
with clients that expected the field to be required when it was not.
This commit is contained in:
Antonio Ojea
2026-01-08 17:12:25 +00:00
parent b54554b72d
commit e0c545353c
5 changed files with 5 additions and 5 deletions

View File

@@ -12804,8 +12804,7 @@
}
},
"required": [
"addressType",
"endpoints"
"addressType"
],
"type": "object",
"x-kubernetes-group-version-kind": [

View File

@@ -226,8 +226,7 @@
}
},
"required": [
"addressType",
"endpoints"
"addressType"
],
"type": "object",
"x-kubernetes-group-version-kind": [

View File

@@ -33256,7 +33256,7 @@ func schema_k8sio_api_discovery_v1_EndpointSlice(ref common.ReferenceCallback) c
},
},
},
Required: []string{"addressType", "endpoints"},
Required: []string{"addressType"},
},
},
Dependencies: []string{

View File

@@ -185,6 +185,7 @@ message EndpointSlice {
// endpoints is a list of unique endpoints in this slice. Each slice may
// include a maximum of 1000 endpoints.
// +optional
// +listType=atomic
repeated Endpoint endpoints = 2;

View File

@@ -52,6 +52,7 @@ type EndpointSlice struct {
// endpoints is a list of unique endpoints in this slice. Each slice may
// include a maximum of 1000 endpoints.
// +optional
// +listType=atomic
Endpoints []Endpoint `json:"endpoints" protobuf:"bytes,2,rep,name=endpoints"`