From d84c8d2a647aee3a7b0ac499a55e5f630c71d2a9 Mon Sep 17 00:00:00 2001 From: Lionel Jouin Date: Thu, 7 Nov 2024 22:19:09 +0100 Subject: [PATCH] [KEP-4817] make update --- api/openapi-spec/swagger.json | 22 ++++++++++++------- ...is__resource.k8s.io__v1alpha3_openapi.json | 11 ++++++---- ...pis__resource.k8s.io__v1beta1_openapi.json | 11 ++++++---- pkg/generated/openapi/zz_generated.openapi.go | 22 ++++++++++++------- .../api/resource/v1alpha3/generated.proto | 11 ++++++++-- .../v1alpha3/types_swagger_doc_generated.go | 6 ++--- .../api/resource/v1beta1/generated.proto | 11 ++++++++-- .../v1beta1/types_swagger_doc_generated.go | 6 ++--- .../applyconfigurations/internal/internal.go | 8 +++++-- 9 files changed, 72 insertions(+), 36 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index d62316f8a08..03a615f356d 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -14446,11 +14446,14 @@ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" }, "type": "array", - "x-kubernetes-list-type": "atomic" + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" }, "data": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", - "description": "Data contains arbitrary driver-specific data." + "description": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki." }, "device": { "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", @@ -14860,11 +14863,11 @@ "description": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", "properties": { "hardwareAddress": { - "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.", + "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", "type": "string" }, "interfaceName": { - "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface.", + "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", "type": "string" }, "ips": { @@ -15263,11 +15266,14 @@ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition" }, "type": "array", - "x-kubernetes-list-type": "atomic" + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" }, "data": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", - "description": "Data contains arbitrary driver-specific data." + "description": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki." }, "device": { "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", @@ -15690,11 +15696,11 @@ "description": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", "properties": { "hardwareAddress": { - "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.", + "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", "type": "string" }, "interfaceName": { - "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface.", + "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", "type": "string" }, "ips": { diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json index 2ba1ece886f..f13c36e793d 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json @@ -100,7 +100,10 @@ "default": {} }, "type": "array", - "x-kubernetes-list-type": "atomic" + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" }, "data": { "allOf": [ @@ -108,7 +111,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" } ], - "description": "Data contains arbitrary driver-specific data." + "description": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki." }, "device": { "default": "", @@ -631,11 +634,11 @@ "description": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", "properties": { "hardwareAddress": { - "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.", + "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", "type": "string" }, "interfaceName": { - "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface.", + "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", "type": "string" }, "ips": { diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json index 5c056541230..0d3e2f1f5d3 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1beta1_openapi.json @@ -100,7 +100,10 @@ "default": {} }, "type": "array", - "x-kubernetes-list-type": "atomic" + "x-kubernetes-list-map-keys": [ + "type" + ], + "x-kubernetes-list-type": "map" }, "data": { "allOf": [ @@ -108,7 +111,7 @@ "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" } ], - "description": "Data contains arbitrary driver-specific data." + "description": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki." }, "device": { "default": "", @@ -653,11 +656,11 @@ "description": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", "properties": { "hardwareAddress": { - "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.", + "description": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", "type": "string" }, "interfaceName": { - "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface.", + "description": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", "type": "string" }, "ips": { diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index ce4ca0fd321..7c31cb58fc2 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -46325,7 +46325,10 @@ func schema_k8sio_api_resource_v1alpha3_AllocatedDeviceStatus(ref common.Referen "conditions": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", }, }, SchemaProps: spec.SchemaProps{ @@ -46343,7 +46346,7 @@ func schema_k8sio_api_resource_v1alpha3_AllocatedDeviceStatus(ref common.Referen }, "data": { SchemaProps: spec.SchemaProps{ - Description: "Data contains arbitrary driver-specific data.", + Description: "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, @@ -47128,7 +47131,7 @@ func schema_k8sio_api_resource_v1alpha3_NetworkDeviceData(ref common.ReferenceCa Properties: map[string]spec.Schema{ "interfaceName": { SchemaProps: spec.SchemaProps{ - Description: "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface.", + Description: "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", Type: []string{"string"}, Format: "", }, @@ -47155,7 +47158,7 @@ func schema_k8sio_api_resource_v1alpha3_NetworkDeviceData(ref common.ReferenceCa }, "hardwareAddress": { SchemaProps: spec.SchemaProps{ - Description: "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.", + Description: "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", Type: []string{"string"}, Format: "", }, @@ -47796,7 +47799,10 @@ func schema_k8sio_api_resource_v1beta1_AllocatedDeviceStatus(ref common.Referenc "conditions": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", + "x-kubernetes-list-map-keys": []interface{}{ + "type", + }, + "x-kubernetes-list-type": "map", }, }, SchemaProps: spec.SchemaProps{ @@ -47814,7 +47820,7 @@ func schema_k8sio_api_resource_v1beta1_AllocatedDeviceStatus(ref common.Referenc }, "data": { SchemaProps: spec.SchemaProps{ - Description: "Data contains arbitrary driver-specific data.", + Description: "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, @@ -48622,7 +48628,7 @@ func schema_k8sio_api_resource_v1beta1_NetworkDeviceData(ref common.ReferenceCal Properties: map[string]spec.Schema{ "interfaceName": { SchemaProps: spec.SchemaProps{ - Description: "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface.", + Description: "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", Type: []string{"string"}, Format: "", }, @@ -48649,7 +48655,7 @@ func schema_k8sio_api_resource_v1beta1_NetworkDeviceData(ref common.ReferenceCal }, "hardwareAddress": { SchemaProps: spec.SchemaProps{ - Description: "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.", + Description: "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", Type: []string{"string"}, Format: "", }, diff --git a/staging/src/k8s.io/api/resource/v1alpha3/generated.proto b/staging/src/k8s.io/api/resource/v1alpha3/generated.proto index 26ef30f604d..13be7cbd8ea 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/generated.proto +++ b/staging/src/k8s.io/api/resource/v1alpha3/generated.proto @@ -63,11 +63,14 @@ message AllocatedDeviceStatus { // config references, the `Ready` condition should be True. // // +optional - // +listType=atomic + // +listType=map + // +listMapKey=type repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 4; // Data contains arbitrary driver-specific data. // + // The length of the raw data must be smaller or equal to 10 Ki. + // // +optional optional .k8s.io.apimachinery.pkg.runtime.RawExtension data = 5; @@ -533,7 +536,9 @@ message DeviceSelector { message NetworkDeviceData { // InterfaceName specifies the name of the network interface associated with // the allocated device. This might be the name of a physical or virtual - // network interface. + // network interface being configured in the pod. + // + // Must not be longer than 256 characters. // // +optional optional string interfaceName = 1; @@ -550,6 +555,8 @@ message NetworkDeviceData { // HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface. // + // Must not be longer than 128 characters. + // // +optional optional string hardwareAddress = 3; } diff --git a/staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go b/staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go index ac517b69810..1a71d64c10d 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go @@ -33,7 +33,7 @@ var map_AllocatedDeviceStatus = map[string]string{ "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "conditions": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.", - "data": "Data contains arbitrary driver-specific data.", + "data": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", "networkData": "NetworkData contains network-related information specific to the device.", } @@ -227,9 +227,9 @@ func (DeviceSelector) SwaggerDoc() map[string]string { var map_NetworkDeviceData = map[string]string{ "": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", - "interfaceName": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface.", + "interfaceName": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", "ips": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.", - "hardwareAddress": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.", + "hardwareAddress": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", } func (NetworkDeviceData) SwaggerDoc() map[string]string { diff --git a/staging/src/k8s.io/api/resource/v1beta1/generated.proto b/staging/src/k8s.io/api/resource/v1beta1/generated.proto index 869af6a03cb..6d525d5b856 100644 --- a/staging/src/k8s.io/api/resource/v1beta1/generated.proto +++ b/staging/src/k8s.io/api/resource/v1beta1/generated.proto @@ -63,11 +63,14 @@ message AllocatedDeviceStatus { // config references, the `Ready` condition should be True. // // +optional - // +listType=atomic + // +listType=map + // +listMapKey=type repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 4; // Data contains arbitrary driver-specific data. // + // The length of the raw data must be smaller or equal to 10 Ki. + // // +optional optional .k8s.io.apimachinery.pkg.runtime.RawExtension data = 5; @@ -541,7 +544,9 @@ message DeviceSelector { message NetworkDeviceData { // InterfaceName specifies the name of the network interface associated with // the allocated device. This might be the name of a physical or virtual - // network interface. + // network interface being configured in the pod. + // + // Must not be longer than 256 characters. // // +optional optional string interfaceName = 1; @@ -558,6 +563,8 @@ message NetworkDeviceData { // HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface. // + // Must not be longer than 128 characters. + // // +optional optional string hardwareAddress = 3; } diff --git a/staging/src/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go index 20aebf75740..1d0176cbcae 100644 --- a/staging/src/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/resource/v1beta1/types_swagger_doc_generated.go @@ -33,7 +33,7 @@ var map_AllocatedDeviceStatus = map[string]string{ "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "conditions": "Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.", - "data": "Data contains arbitrary driver-specific data.", + "data": "Data contains arbitrary driver-specific data.\n\nThe length of the raw data must be smaller or equal to 10 Ki.", "networkData": "NetworkData contains network-related information specific to the device.", } @@ -236,9 +236,9 @@ func (DeviceSelector) SwaggerDoc() map[string]string { var map_NetworkDeviceData = map[string]string{ "": "NetworkDeviceData provides network-related details for the allocated device. This information may be filled by drivers or other components to configure or identify the device within a network context.", - "interfaceName": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface.", + "interfaceName": "InterfaceName specifies the name of the network interface associated with the allocated device. This might be the name of a physical or virtual network interface being configured in the pod.\n\nMust not be longer than 256 characters.", "ips": "IPs lists the network addresses assigned to the device's network interface. This can include both IPv4 and IPv6 addresses. The IPs are in the CIDR notation, which includes both the address and the associated subnet mask. e.g.: \"192.0.2.5/24\" for IPv4 and \"2001:db8::5/64\" for IPv6.", - "hardwareAddress": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.", + "hardwareAddress": "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.\n\nMust not be longer than 128 characters.", } func (NetworkDeviceData) SwaggerDoc() map[string]string { diff --git a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go index 488a3ae1306..a9c0e1598d8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -12361,7 +12361,9 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: atomic + elementRelationship: associative + keys: + - type - name: data type: namedType: __untyped_atomic_ @@ -12792,7 +12794,9 @@ var schemaYAML = typed.YAMLObject(`types: list: elementType: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: atomic + elementRelationship: associative + keys: + - type - name: data type: namedType: __untyped_atomic_