[KEP-4817] make update

Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
This commit is contained in:
Lionel Jouin
2024-11-07 10:36:09 +01:00
parent 39f55e1cd0
commit d28b50e0a0
29 changed files with 3610 additions and 337 deletions

View File

@@ -14437,6 +14437,45 @@
"type": "object",
"x-kubernetes-map-type": "atomic"
},
"io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus": {
"description": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.",
"properties": {
"conditions": {
"description": "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.",
"items": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"data": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension",
"description": "Data contains arbitrary driver-specific data."
},
"device": {
"description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
"type": "string"
},
"driver": {
"description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
"type": "string"
},
"networkData": {
"$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NetworkDeviceData",
"description": "NetworkData contains network-related information specific to the device."
},
"pool": {
"description": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
"type": "string"
}
},
"required": [
"driver",
"pool",
"device"
],
"type": "object"
},
"io.k8s.api.resource.v1alpha3.AllocationResult": {
"description": "AllocationResult contains attributes of an allocated resource.",
"properties": {
@@ -14817,6 +14856,28 @@
},
"type": "object"
},
"io.k8s.api.resource.v1alpha3.NetworkDeviceData": {
"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.",
"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.",
"type": "string"
},
"ips": {
"description": "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.",
"items": {
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
},
"io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration": {
"description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.",
"properties": {
@@ -14950,6 +15011,19 @@
"$ref": "#/definitions/io.k8s.api.resource.v1alpha3.AllocationResult",
"description": "Allocation is set once the claim has been allocated successfully."
},
"devices": {
"description": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.",
"items": {
"$ref": "#/definitions/io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus"
},
"type": "array",
"x-kubernetes-list-map-keys": [
"driver",
"device",
"pool"
],
"x-kubernetes-list-type": "map"
},
"reservedFor": {
"description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.",
"items": {
@@ -15180,6 +15254,45 @@
],
"type": "object"
},
"io.k8s.api.resource.v1beta1.AllocatedDeviceStatus": {
"description": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.",
"properties": {
"conditions": {
"description": "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.",
"items": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Condition"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"data": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension",
"description": "Data contains arbitrary driver-specific data."
},
"device": {
"description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
"type": "string"
},
"driver": {
"description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
"type": "string"
},
"networkData": {
"$ref": "#/definitions/io.k8s.api.resource.v1beta1.NetworkDeviceData",
"description": "NetworkData contains network-related information specific to the device."
},
"pool": {
"description": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
"type": "string"
}
},
"required": [
"driver",
"pool",
"device"
],
"type": "object"
},
"io.k8s.api.resource.v1beta1.AllocationResult": {
"description": "AllocationResult contains attributes of an allocated resource.",
"properties": {
@@ -15573,6 +15686,28 @@
},
"type": "object"
},
"io.k8s.api.resource.v1beta1.NetworkDeviceData": {
"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.",
"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.",
"type": "string"
},
"ips": {
"description": "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.",
"items": {
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
},
"io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration": {
"description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.",
"properties": {
@@ -15706,6 +15841,19 @@
"$ref": "#/definitions/io.k8s.api.resource.v1beta1.AllocationResult",
"description": "Allocation is set once the claim has been allocated successfully."
},
"devices": {
"description": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.",
"items": {
"$ref": "#/definitions/io.k8s.api.resource.v1beta1.AllocatedDeviceStatus"
},
"type": "array",
"x-kubernetes-list-map-keys": [
"driver",
"device",
"pool"
],
"x-kubernetes-list-type": "map"
},
"reservedFor": {
"description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.",
"items": {

View File

@@ -86,6 +86,61 @@
"type": "object",
"x-kubernetes-map-type": "atomic"
},
"io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus": {
"description": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.",
"properties": {
"conditions": {
"description": "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.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Condition"
}
],
"default": {}
},
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"data": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension"
}
],
"description": "Data contains arbitrary driver-specific data."
},
"device": {
"default": "",
"description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
"type": "string"
},
"driver": {
"default": "",
"description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
"type": "string"
},
"networkData": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NetworkDeviceData"
}
],
"description": "NetworkData contains network-related information specific to the device."
},
"pool": {
"default": "",
"description": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
"type": "string"
}
},
"required": [
"driver",
"pool",
"device"
],
"type": "object"
},
"io.k8s.api.resource.v1alpha3.AllocationResult": {
"description": "AllocationResult contains attributes of an allocated resource.",
"properties": {
@@ -572,6 +627,29 @@
},
"type": "object"
},
"io.k8s.api.resource.v1alpha3.NetworkDeviceData": {
"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.",
"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.",
"type": "string"
},
"ips": {
"description": "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.",
"items": {
"default": "",
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
},
"io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration": {
"description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.",
"properties": {
@@ -747,6 +825,24 @@
],
"description": "Allocation is set once the claim has been allocated successfully."
},
"devices": {
"description": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus"
}
],
"default": {}
},
"type": "array",
"x-kubernetes-list-map-keys": [
"driver",
"device",
"pool"
],
"x-kubernetes-list-type": "map"
},
"reservedFor": {
"description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.",
"items": {
@@ -1175,6 +1271,52 @@
}
]
},
"io.k8s.apimachinery.pkg.apis.meta.v1.Condition": {
"description": "Condition contains details for one aspect of the current state of this API Resource.",
"properties": {
"lastTransitionTime": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"
}
],
"description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."
},
"message": {
"default": "",
"description": "message is a human readable message indicating details about the transition. This may be an empty string.",
"type": "string"
},
"observedGeneration": {
"description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.",
"format": "int64",
"type": "integer"
},
"reason": {
"default": "",
"description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.",
"type": "string"
},
"status": {
"default": "",
"description": "status of the condition, one of True, False, Unknown.",
"type": "string"
},
"type": {
"default": "",
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
"type": "string"
}
},
"required": [
"type",
"status",
"lastTransitionTime",
"reason",
"message"
],
"type": "object"
},
"io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": {
"description": "DeleteOptions may be provided when deleting an API object.",
"properties": {

View File

@@ -86,6 +86,61 @@
"type": "object",
"x-kubernetes-map-type": "atomic"
},
"io.k8s.api.resource.v1beta1.AllocatedDeviceStatus": {
"description": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.",
"properties": {
"conditions": {
"description": "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.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Condition"
}
],
"default": {}
},
"type": "array",
"x-kubernetes-list-type": "atomic"
},
"data": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension"
}
],
"description": "Data contains arbitrary driver-specific data."
},
"device": {
"default": "",
"description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
"type": "string"
},
"driver": {
"default": "",
"description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
"type": "string"
},
"networkData": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.resource.v1beta1.NetworkDeviceData"
}
],
"description": "NetworkData contains network-related information specific to the device."
},
"pool": {
"default": "",
"description": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
"type": "string"
}
},
"required": [
"driver",
"pool",
"device"
],
"type": "object"
},
"io.k8s.api.resource.v1beta1.AllocationResult": {
"description": "AllocationResult contains attributes of an allocated resource.",
"properties": {
@@ -594,6 +649,29 @@
},
"type": "object"
},
"io.k8s.api.resource.v1beta1.NetworkDeviceData": {
"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.",
"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.",
"type": "string"
},
"ips": {
"description": "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.",
"items": {
"default": "",
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "atomic"
}
},
"type": "object"
},
"io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration": {
"description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.",
"properties": {
@@ -769,6 +847,24 @@
],
"description": "Allocation is set once the claim has been allocated successfully."
},
"devices": {
"description": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.resource.v1beta1.AllocatedDeviceStatus"
}
],
"default": {}
},
"type": "array",
"x-kubernetes-list-map-keys": [
"driver",
"device",
"pool"
],
"x-kubernetes-list-type": "map"
},
"reservedFor": {
"description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.",
"items": {
@@ -1197,6 +1293,52 @@
}
]
},
"io.k8s.apimachinery.pkg.apis.meta.v1.Condition": {
"description": "Condition contains details for one aspect of the current state of this API Resource.",
"properties": {
"lastTransitionTime": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Time"
}
],
"description": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable."
},
"message": {
"default": "",
"description": "message is a human readable message indicating details about the transition. This may be an empty string.",
"type": "string"
},
"observedGeneration": {
"description": "observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.",
"format": "int64",
"type": "integer"
},
"reason": {
"default": "",
"description": "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.",
"type": "string"
},
"status": {
"default": "",
"description": "status of the condition, one of True, False, Unknown.",
"type": "string"
},
"type": {
"default": "",
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
"type": "string"
}
},
"required": [
"type",
"status",
"lastTransitionTime",
"reason",
"message"
],
"type": "object"
},
"io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": {
"description": "DeleteOptions may be provided when deleting an API object.",
"properties": {

View File

@@ -24,9 +24,10 @@ package v1alpha3
import (
unsafe "unsafe"
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
apiresource "k8s.io/apimachinery/pkg/api/resource"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
types "k8s.io/apimachinery/pkg/types"
@@ -41,6 +42,16 @@ func init() {
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.AllocatedDeviceStatus)(nil), (*resource.AllocatedDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha3_AllocatedDeviceStatus_To_resource_AllocatedDeviceStatus(a.(*resourcev1alpha3.AllocatedDeviceStatus), b.(*resource.AllocatedDeviceStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.AllocatedDeviceStatus)(nil), (*resourcev1alpha3.AllocatedDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_AllocatedDeviceStatus_To_v1alpha3_AllocatedDeviceStatus(a.(*resource.AllocatedDeviceStatus), b.(*resourcev1alpha3.AllocatedDeviceStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.AllocationResult)(nil), (*resource.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha3_AllocationResult_To_resource_AllocationResult(a.(*resourcev1alpha3.AllocationResult), b.(*resource.AllocationResult), scope)
}); err != nil {
@@ -221,6 +232,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.NetworkDeviceData)(nil), (*resource.NetworkDeviceData)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha3_NetworkDeviceData_To_resource_NetworkDeviceData(a.(*resourcev1alpha3.NetworkDeviceData), b.(*resource.NetworkDeviceData), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.NetworkDeviceData)(nil), (*resourcev1alpha3.NetworkDeviceData)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_NetworkDeviceData_To_v1alpha3_NetworkDeviceData(a.(*resource.NetworkDeviceData), b.(*resourcev1alpha3.NetworkDeviceData), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resourcev1alpha3.OpaqueDeviceConfiguration)(nil), (*resource.OpaqueDeviceConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha3_OpaqueDeviceConfiguration_To_resource_OpaqueDeviceConfiguration(a.(*resourcev1alpha3.OpaqueDeviceConfiguration), b.(*resource.OpaqueDeviceConfiguration), scope)
}); err != nil {
@@ -364,6 +385,36 @@ func RegisterConversions(s *runtime.Scheme) error {
return nil
}
func autoConvert_v1alpha3_AllocatedDeviceStatus_To_resource_AllocatedDeviceStatus(in *resourcev1alpha3.AllocatedDeviceStatus, out *resource.AllocatedDeviceStatus, s conversion.Scope) error {
out.Driver = in.Driver
out.Pool = in.Pool
out.Device = in.Device
out.Conditions = *(*[]v1.Condition)(unsafe.Pointer(&in.Conditions))
out.Data = in.Data
out.NetworkData = (*resource.NetworkDeviceData)(unsafe.Pointer(in.NetworkData))
return nil
}
// Convert_v1alpha3_AllocatedDeviceStatus_To_resource_AllocatedDeviceStatus is an autogenerated conversion function.
func Convert_v1alpha3_AllocatedDeviceStatus_To_resource_AllocatedDeviceStatus(in *resourcev1alpha3.AllocatedDeviceStatus, out *resource.AllocatedDeviceStatus, s conversion.Scope) error {
return autoConvert_v1alpha3_AllocatedDeviceStatus_To_resource_AllocatedDeviceStatus(in, out, s)
}
func autoConvert_resource_AllocatedDeviceStatus_To_v1alpha3_AllocatedDeviceStatus(in *resource.AllocatedDeviceStatus, out *resourcev1alpha3.AllocatedDeviceStatus, s conversion.Scope) error {
out.Driver = in.Driver
out.Pool = in.Pool
out.Device = in.Device
out.Conditions = *(*[]v1.Condition)(unsafe.Pointer(&in.Conditions))
out.Data = in.Data
out.NetworkData = (*resourcev1alpha3.NetworkDeviceData)(unsafe.Pointer(in.NetworkData))
return nil
}
// Convert_resource_AllocatedDeviceStatus_To_v1alpha3_AllocatedDeviceStatus is an autogenerated conversion function.
func Convert_resource_AllocatedDeviceStatus_To_v1alpha3_AllocatedDeviceStatus(in *resource.AllocatedDeviceStatus, out *resourcev1alpha3.AllocatedDeviceStatus, s conversion.Scope) error {
return autoConvert_resource_AllocatedDeviceStatus_To_v1alpha3_AllocatedDeviceStatus(in, out, s)
}
func autoConvert_v1alpha3_AllocationResult_To_resource_AllocationResult(in *resourcev1alpha3.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error {
if err := Convert_v1alpha3_DeviceAllocationResult_To_resource_DeviceAllocationResult(&in.Devices, &out.Devices, s); err != nil {
return err
@@ -381,7 +432,7 @@ func autoConvert_resource_AllocationResult_To_v1alpha3_AllocationResult(in *reso
if err := Convert_resource_DeviceAllocationResult_To_v1alpha3_DeviceAllocationResult(&in.Devices, &out.Devices, s); err != nil {
return err
}
out.NodeSelector = (*v1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
out.NodeSelector = (*corev1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
return nil
}
@@ -834,6 +885,30 @@ func Convert_resource_DeviceSelector_To_v1alpha3_DeviceSelector(in *resource.Dev
return autoConvert_resource_DeviceSelector_To_v1alpha3_DeviceSelector(in, out, s)
}
func autoConvert_v1alpha3_NetworkDeviceData_To_resource_NetworkDeviceData(in *resourcev1alpha3.NetworkDeviceData, out *resource.NetworkDeviceData, s conversion.Scope) error {
out.InterfaceName = in.InterfaceName
out.IPs = *(*[]string)(unsafe.Pointer(&in.IPs))
out.HardwareAddress = in.HardwareAddress
return nil
}
// Convert_v1alpha3_NetworkDeviceData_To_resource_NetworkDeviceData is an autogenerated conversion function.
func Convert_v1alpha3_NetworkDeviceData_To_resource_NetworkDeviceData(in *resourcev1alpha3.NetworkDeviceData, out *resource.NetworkDeviceData, s conversion.Scope) error {
return autoConvert_v1alpha3_NetworkDeviceData_To_resource_NetworkDeviceData(in, out, s)
}
func autoConvert_resource_NetworkDeviceData_To_v1alpha3_NetworkDeviceData(in *resource.NetworkDeviceData, out *resourcev1alpha3.NetworkDeviceData, s conversion.Scope) error {
out.InterfaceName = in.InterfaceName
out.IPs = *(*[]string)(unsafe.Pointer(&in.IPs))
out.HardwareAddress = in.HardwareAddress
return nil
}
// Convert_resource_NetworkDeviceData_To_v1alpha3_NetworkDeviceData is an autogenerated conversion function.
func Convert_resource_NetworkDeviceData_To_v1alpha3_NetworkDeviceData(in *resource.NetworkDeviceData, out *resourcev1alpha3.NetworkDeviceData, s conversion.Scope) error {
return autoConvert_resource_NetworkDeviceData_To_v1alpha3_NetworkDeviceData(in, out, s)
}
func autoConvert_v1alpha3_OpaqueDeviceConfiguration_To_resource_OpaqueDeviceConfiguration(in *resourcev1alpha3.OpaqueDeviceConfiguration, out *resource.OpaqueDeviceConfiguration, s conversion.Scope) error {
out.Driver = in.Driver
out.Parameters = in.Parameters
@@ -963,6 +1038,7 @@ func Convert_resource_ResourceClaimSpec_To_v1alpha3_ResourceClaimSpec(in *resour
func autoConvert_v1alpha3_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *resourcev1alpha3.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error {
out.Allocation = (*resource.AllocationResult)(unsafe.Pointer(in.Allocation))
out.ReservedFor = *(*[]resource.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor))
out.Devices = *(*[]resource.AllocatedDeviceStatus)(unsafe.Pointer(&in.Devices))
return nil
}
@@ -974,6 +1050,7 @@ func Convert_v1alpha3_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *re
func autoConvert_resource_ResourceClaimStatus_To_v1alpha3_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *resourcev1alpha3.ResourceClaimStatus, s conversion.Scope) error {
out.Allocation = (*resourcev1alpha3.AllocationResult)(unsafe.Pointer(in.Allocation))
out.ReservedFor = *(*[]resourcev1alpha3.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor))
out.Devices = *(*[]resourcev1alpha3.AllocatedDeviceStatus)(unsafe.Pointer(&in.Devices))
return nil
}
@@ -1181,7 +1258,7 @@ func autoConvert_resource_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec(in *re
return err
}
out.NodeName = in.NodeName
out.NodeSelector = (*v1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
out.NodeSelector = (*corev1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
out.AllNodes = in.AllNodes
if in.Devices != nil {
in, out := &in.Devices, &out.Devices

View File

@@ -24,8 +24,9 @@ package v1beta1
import (
unsafe "unsafe"
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
resourcev1beta1 "k8s.io/api/resource/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
types "k8s.io/apimachinery/pkg/types"
@@ -40,6 +41,16 @@ func init() {
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*resourcev1beta1.AllocatedDeviceStatus)(nil), (*resource.AllocatedDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_AllocatedDeviceStatus_To_resource_AllocatedDeviceStatus(a.(*resourcev1beta1.AllocatedDeviceStatus), b.(*resource.AllocatedDeviceStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.AllocatedDeviceStatus)(nil), (*resourcev1beta1.AllocatedDeviceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_AllocatedDeviceStatus_To_v1beta1_AllocatedDeviceStatus(a.(*resource.AllocatedDeviceStatus), b.(*resourcev1beta1.AllocatedDeviceStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resourcev1beta1.AllocationResult)(nil), (*resource.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_AllocationResult_To_resource_AllocationResult(a.(*resourcev1beta1.AllocationResult), b.(*resource.AllocationResult), scope)
}); err != nil {
@@ -230,6 +241,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resourcev1beta1.NetworkDeviceData)(nil), (*resource.NetworkDeviceData)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_NetworkDeviceData_To_resource_NetworkDeviceData(a.(*resourcev1beta1.NetworkDeviceData), b.(*resource.NetworkDeviceData), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.NetworkDeviceData)(nil), (*resourcev1beta1.NetworkDeviceData)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_NetworkDeviceData_To_v1beta1_NetworkDeviceData(a.(*resource.NetworkDeviceData), b.(*resourcev1beta1.NetworkDeviceData), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resourcev1beta1.OpaqueDeviceConfiguration)(nil), (*resource.OpaqueDeviceConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1beta1_OpaqueDeviceConfiguration_To_resource_OpaqueDeviceConfiguration(a.(*resourcev1beta1.OpaqueDeviceConfiguration), b.(*resource.OpaqueDeviceConfiguration), scope)
}); err != nil {
@@ -363,6 +384,36 @@ func RegisterConversions(s *runtime.Scheme) error {
return nil
}
func autoConvert_v1beta1_AllocatedDeviceStatus_To_resource_AllocatedDeviceStatus(in *resourcev1beta1.AllocatedDeviceStatus, out *resource.AllocatedDeviceStatus, s conversion.Scope) error {
out.Driver = in.Driver
out.Pool = in.Pool
out.Device = in.Device
out.Conditions = *(*[]v1.Condition)(unsafe.Pointer(&in.Conditions))
out.Data = in.Data
out.NetworkData = (*resource.NetworkDeviceData)(unsafe.Pointer(in.NetworkData))
return nil
}
// Convert_v1beta1_AllocatedDeviceStatus_To_resource_AllocatedDeviceStatus is an autogenerated conversion function.
func Convert_v1beta1_AllocatedDeviceStatus_To_resource_AllocatedDeviceStatus(in *resourcev1beta1.AllocatedDeviceStatus, out *resource.AllocatedDeviceStatus, s conversion.Scope) error {
return autoConvert_v1beta1_AllocatedDeviceStatus_To_resource_AllocatedDeviceStatus(in, out, s)
}
func autoConvert_resource_AllocatedDeviceStatus_To_v1beta1_AllocatedDeviceStatus(in *resource.AllocatedDeviceStatus, out *resourcev1beta1.AllocatedDeviceStatus, s conversion.Scope) error {
out.Driver = in.Driver
out.Pool = in.Pool
out.Device = in.Device
out.Conditions = *(*[]v1.Condition)(unsafe.Pointer(&in.Conditions))
out.Data = in.Data
out.NetworkData = (*resourcev1beta1.NetworkDeviceData)(unsafe.Pointer(in.NetworkData))
return nil
}
// Convert_resource_AllocatedDeviceStatus_To_v1beta1_AllocatedDeviceStatus is an autogenerated conversion function.
func Convert_resource_AllocatedDeviceStatus_To_v1beta1_AllocatedDeviceStatus(in *resource.AllocatedDeviceStatus, out *resourcev1beta1.AllocatedDeviceStatus, s conversion.Scope) error {
return autoConvert_resource_AllocatedDeviceStatus_To_v1beta1_AllocatedDeviceStatus(in, out, s)
}
func autoConvert_v1beta1_AllocationResult_To_resource_AllocationResult(in *resourcev1beta1.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error {
if err := Convert_v1beta1_DeviceAllocationResult_To_resource_DeviceAllocationResult(&in.Devices, &out.Devices, s); err != nil {
return err
@@ -380,7 +431,7 @@ func autoConvert_resource_AllocationResult_To_v1beta1_AllocationResult(in *resou
if err := Convert_resource_DeviceAllocationResult_To_v1beta1_DeviceAllocationResult(&in.Devices, &out.Devices, s); err != nil {
return err
}
out.NodeSelector = (*v1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
out.NodeSelector = (*corev1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
return nil
}
@@ -813,6 +864,30 @@ func Convert_resource_DeviceSelector_To_v1beta1_DeviceSelector(in *resource.Devi
return autoConvert_resource_DeviceSelector_To_v1beta1_DeviceSelector(in, out, s)
}
func autoConvert_v1beta1_NetworkDeviceData_To_resource_NetworkDeviceData(in *resourcev1beta1.NetworkDeviceData, out *resource.NetworkDeviceData, s conversion.Scope) error {
out.InterfaceName = in.InterfaceName
out.IPs = *(*[]string)(unsafe.Pointer(&in.IPs))
out.HardwareAddress = in.HardwareAddress
return nil
}
// Convert_v1beta1_NetworkDeviceData_To_resource_NetworkDeviceData is an autogenerated conversion function.
func Convert_v1beta1_NetworkDeviceData_To_resource_NetworkDeviceData(in *resourcev1beta1.NetworkDeviceData, out *resource.NetworkDeviceData, s conversion.Scope) error {
return autoConvert_v1beta1_NetworkDeviceData_To_resource_NetworkDeviceData(in, out, s)
}
func autoConvert_resource_NetworkDeviceData_To_v1beta1_NetworkDeviceData(in *resource.NetworkDeviceData, out *resourcev1beta1.NetworkDeviceData, s conversion.Scope) error {
out.InterfaceName = in.InterfaceName
out.IPs = *(*[]string)(unsafe.Pointer(&in.IPs))
out.HardwareAddress = in.HardwareAddress
return nil
}
// Convert_resource_NetworkDeviceData_To_v1beta1_NetworkDeviceData is an autogenerated conversion function.
func Convert_resource_NetworkDeviceData_To_v1beta1_NetworkDeviceData(in *resource.NetworkDeviceData, out *resourcev1beta1.NetworkDeviceData, s conversion.Scope) error {
return autoConvert_resource_NetworkDeviceData_To_v1beta1_NetworkDeviceData(in, out, s)
}
func autoConvert_v1beta1_OpaqueDeviceConfiguration_To_resource_OpaqueDeviceConfiguration(in *resourcev1beta1.OpaqueDeviceConfiguration, out *resource.OpaqueDeviceConfiguration, s conversion.Scope) error {
out.Driver = in.Driver
out.Parameters = in.Parameters
@@ -942,6 +1017,7 @@ func Convert_resource_ResourceClaimSpec_To_v1beta1_ResourceClaimSpec(in *resourc
func autoConvert_v1beta1_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *resourcev1beta1.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error {
out.Allocation = (*resource.AllocationResult)(unsafe.Pointer(in.Allocation))
out.ReservedFor = *(*[]resource.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor))
out.Devices = *(*[]resource.AllocatedDeviceStatus)(unsafe.Pointer(&in.Devices))
return nil
}
@@ -953,6 +1029,7 @@ func Convert_v1beta1_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *res
func autoConvert_resource_ResourceClaimStatus_To_v1beta1_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *resourcev1beta1.ResourceClaimStatus, s conversion.Scope) error {
out.Allocation = (*resourcev1beta1.AllocationResult)(unsafe.Pointer(in.Allocation))
out.ReservedFor = *(*[]resourcev1beta1.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor))
out.Devices = *(*[]resourcev1beta1.AllocatedDeviceStatus)(unsafe.Pointer(&in.Devices))
return nil
}
@@ -1130,7 +1207,7 @@ func autoConvert_resource_ResourceSliceSpec_To_v1beta1_ResourceSliceSpec(in *res
return err
}
out.NodeName = in.NodeName
out.NodeSelector = (*v1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
out.NodeSelector = (*corev1.NodeSelector)(unsafe.Pointer(in.NodeSelector))
out.AllNodes = in.AllNodes
out.Devices = *(*[]resourcev1beta1.Device)(unsafe.Pointer(&in.Devices))
return nil

View File

@@ -22,10 +22,40 @@ limitations under the License.
package resource
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
core "k8s.io/kubernetes/pkg/apis/core"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AllocatedDeviceStatus) DeepCopyInto(out *AllocatedDeviceStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]v1.Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
in.Data.DeepCopyInto(&out.Data)
if in.NetworkData != nil {
in, out := &in.NetworkData, &out.NetworkData
*out = new(NetworkDeviceData)
(*in).DeepCopyInto(*out)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedDeviceStatus.
func (in *AllocatedDeviceStatus) DeepCopy() *AllocatedDeviceStatus {
if in == nil {
return nil
}
out := new(AllocatedDeviceStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AllocationResult) DeepCopyInto(out *AllocationResult) {
*out = *in
@@ -503,6 +533,27 @@ func (in *DeviceSelector) DeepCopy() *DeviceSelector {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData) {
*out = *in
if in.IPs != nil {
in, out := &in.IPs, &out.IPs
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDeviceData.
func (in *NetworkDeviceData) DeepCopy() *NetworkDeviceData {
if in == nil {
return nil
}
out := new(NetworkDeviceData)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OpaqueDeviceConfiguration) DeepCopyInto(out *OpaqueDeviceConfiguration) {
*out = *in
@@ -627,6 +678,13 @@ func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus) {
*out = make([]ResourceClaimConsumerReference, len(*in))
copy(*out, *in)
}
if in.Devices != nil {
in, out := &in.Devices, &out.Devices
*out = make([]AllocatedDeviceStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}

View File

@@ -900,6 +900,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"k8s.io/api/rbac/v1beta1.RoleList": schema_k8sio_api_rbac_v1beta1_RoleList(ref),
"k8s.io/api/rbac/v1beta1.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(ref),
"k8s.io/api/rbac/v1beta1.Subject": schema_k8sio_api_rbac_v1beta1_Subject(ref),
"k8s.io/api/resource/v1alpha3.AllocatedDeviceStatus": schema_k8sio_api_resource_v1alpha3_AllocatedDeviceStatus(ref),
"k8s.io/api/resource/v1alpha3.AllocationResult": schema_k8sio_api_resource_v1alpha3_AllocationResult(ref),
"k8s.io/api/resource/v1alpha3.BasicDevice": schema_k8sio_api_resource_v1alpha3_BasicDevice(ref),
"k8s.io/api/resource/v1alpha3.CELDeviceSelector": schema_k8sio_api_resource_v1alpha3_CELDeviceSelector(ref),
@@ -918,6 +919,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"k8s.io/api/resource/v1alpha3.DeviceRequest": schema_k8sio_api_resource_v1alpha3_DeviceRequest(ref),
"k8s.io/api/resource/v1alpha3.DeviceRequestAllocationResult": schema_k8sio_api_resource_v1alpha3_DeviceRequestAllocationResult(ref),
"k8s.io/api/resource/v1alpha3.DeviceSelector": schema_k8sio_api_resource_v1alpha3_DeviceSelector(ref),
"k8s.io/api/resource/v1alpha3.NetworkDeviceData": schema_k8sio_api_resource_v1alpha3_NetworkDeviceData(ref),
"k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration": schema_k8sio_api_resource_v1alpha3_OpaqueDeviceConfiguration(ref),
"k8s.io/api/resource/v1alpha3.ResourceClaim": schema_k8sio_api_resource_v1alpha3_ResourceClaim(ref),
"k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1alpha3_ResourceClaimConsumerReference(ref),
@@ -931,6 +933,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"k8s.io/api/resource/v1alpha3.ResourceSlice": schema_k8sio_api_resource_v1alpha3_ResourceSlice(ref),
"k8s.io/api/resource/v1alpha3.ResourceSliceList": schema_k8sio_api_resource_v1alpha3_ResourceSliceList(ref),
"k8s.io/api/resource/v1alpha3.ResourceSliceSpec": schema_k8sio_api_resource_v1alpha3_ResourceSliceSpec(ref),
"k8s.io/api/resource/v1beta1.AllocatedDeviceStatus": schema_k8sio_api_resource_v1beta1_AllocatedDeviceStatus(ref),
"k8s.io/api/resource/v1beta1.AllocationResult": schema_k8sio_api_resource_v1beta1_AllocationResult(ref),
"k8s.io/api/resource/v1beta1.BasicDevice": schema_k8sio_api_resource_v1beta1_BasicDevice(ref),
"k8s.io/api/resource/v1beta1.CELDeviceSelector": schema_k8sio_api_resource_v1beta1_CELDeviceSelector(ref),
@@ -950,6 +953,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"k8s.io/api/resource/v1beta1.DeviceRequest": schema_k8sio_api_resource_v1beta1_DeviceRequest(ref),
"k8s.io/api/resource/v1beta1.DeviceRequestAllocationResult": schema_k8sio_api_resource_v1beta1_DeviceRequestAllocationResult(ref),
"k8s.io/api/resource/v1beta1.DeviceSelector": schema_k8sio_api_resource_v1beta1_DeviceSelector(ref),
"k8s.io/api/resource/v1beta1.NetworkDeviceData": schema_k8sio_api_resource_v1beta1_NetworkDeviceData(ref),
"k8s.io/api/resource/v1beta1.OpaqueDeviceConfiguration": schema_k8sio_api_resource_v1beta1_OpaqueDeviceConfiguration(ref),
"k8s.io/api/resource/v1beta1.ResourceClaim": schema_k8sio_api_resource_v1beta1_ResourceClaim(ref),
"k8s.io/api/resource/v1beta1.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1beta1_ResourceClaimConsumerReference(ref),
@@ -46287,6 +46291,77 @@ func schema_k8sio_api_rbac_v1beta1_Subject(ref common.ReferenceCallback) common.
}
}
func schema_k8sio_api_resource_v1alpha3_AllocatedDeviceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"driver": {
SchemaProps: spec.SchemaProps{
Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"pool": {
SchemaProps: spec.SchemaProps{
Description: "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"device": {
SchemaProps: spec.SchemaProps{
Description: "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"conditions": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "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.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"),
},
},
},
},
},
"data": {
SchemaProps: spec.SchemaProps{
Description: "Data contains arbitrary driver-specific data.",
Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"),
},
},
"networkData": {
SchemaProps: spec.SchemaProps{
Description: "NetworkData contains network-related information specific to the device.",
Ref: ref("k8s.io/api/resource/v1alpha3.NetworkDeviceData"),
},
},
},
Required: []string{"driver", "pool", "device"},
},
},
Dependencies: []string{
"k8s.io/api/resource/v1alpha3.NetworkDeviceData", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/runtime.RawExtension"},
}
}
func schema_k8sio_api_resource_v1alpha3_AllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -47044,6 +47119,53 @@ func schema_k8sio_api_resource_v1alpha3_DeviceSelector(ref common.ReferenceCallb
}
}
func schema_k8sio_api_resource_v1alpha3_NetworkDeviceData(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
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.",
Type: []string{"object"},
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.",
Type: []string{"string"},
Format: "",
},
},
"ips": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "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.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
},
},
},
"hardwareAddress": {
SchemaProps: spec.SchemaProps{
Description: "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.",
Type: []string{"string"},
Format: "",
},
},
},
},
},
}
}
func schema_k8sio_api_resource_v1alpha3_OpaqueDeviceConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -47280,11 +47402,35 @@ func schema_k8sio_api_resource_v1alpha3_ResourceClaimStatus(ref common.Reference
},
},
},
"devices": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"driver",
"device",
"pool",
},
"x-kubernetes-list-type": "map",
},
},
SchemaProps: spec.SchemaProps{
Description: "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha3.AllocatedDeviceStatus"),
},
},
},
},
},
},
},
},
Dependencies: []string{
"k8s.io/api/resource/v1alpha3.AllocationResult", "k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference"},
"k8s.io/api/resource/v1alpha3.AllocatedDeviceStatus", "k8s.io/api/resource/v1alpha3.AllocationResult", "k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference"},
}
}
@@ -47616,6 +47762,77 @@ func schema_k8sio_api_resource_v1alpha3_ResourceSliceSpec(ref common.ReferenceCa
}
}
func schema_k8sio_api_resource_v1beta1_AllocatedDeviceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"driver": {
SchemaProps: spec.SchemaProps{
Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"pool": {
SchemaProps: spec.SchemaProps{
Description: "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"device": {
SchemaProps: spec.SchemaProps{
Description: "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"conditions": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "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.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"),
},
},
},
},
},
"data": {
SchemaProps: spec.SchemaProps{
Description: "Data contains arbitrary driver-specific data.",
Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"),
},
},
"networkData": {
SchemaProps: spec.SchemaProps{
Description: "NetworkData contains network-related information specific to the device.",
Ref: ref("k8s.io/api/resource/v1beta1.NetworkDeviceData"),
},
},
},
Required: []string{"driver", "pool", "device"},
},
},
Dependencies: []string{
"k8s.io/api/resource/v1beta1.NetworkDeviceData", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition", "k8s.io/apimachinery/pkg/runtime.RawExtension"},
}
}
func schema_k8sio_api_resource_v1beta1_AllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -48396,6 +48613,53 @@ func schema_k8sio_api_resource_v1beta1_DeviceSelector(ref common.ReferenceCallba
}
}
func schema_k8sio_api_resource_v1beta1_NetworkDeviceData(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
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.",
Type: []string{"object"},
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.",
Type: []string{"string"},
Format: "",
},
},
"ips": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
Description: "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.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
},
},
},
"hardwareAddress": {
SchemaProps: spec.SchemaProps{
Description: "HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.",
Type: []string{"string"},
Format: "",
},
},
},
},
},
}
}
func schema_k8sio_api_resource_v1beta1_OpaqueDeviceConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -48632,11 +48896,35 @@ func schema_k8sio_api_resource_v1beta1_ResourceClaimStatus(ref common.ReferenceC
},
},
},
"devices": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"driver",
"device",
"pool",
},
"x-kubernetes-list-type": "map",
},
},
SchemaProps: spec.SchemaProps{
Description: "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1beta1.AllocatedDeviceStatus"),
},
},
},
},
},
},
},
},
Dependencies: []string{
"k8s.io/api/resource/v1beta1.AllocationResult", "k8s.io/api/resource/v1beta1.ResourceClaimConsumerReference"},
"k8s.io/api/resource/v1beta1.AllocatedDeviceStatus", "k8s.io/api/resource/v1beta1.AllocationResult", "k8s.io/api/resource/v1beta1.ResourceClaimConsumerReference"},
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -30,6 +30,53 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "k8s.io/api/resource/v1alpha3";
// AllocatedDeviceStatus contains the status of an allocated device, if the
// driver chooses to report it. This may include driver-specific information.
message AllocatedDeviceStatus {
// Driver specifies the name of the DRA driver whose kubelet
// plugin should be invoked to process the allocation once the claim is
// needed on a node.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
//
// +required
optional string driver = 1;
// This name together with the driver name and the device name field
// identify which device was allocated (`<driver name>/<pool name>/<device name>`).
//
// Must not be longer than 253 characters and may contain one or more
// DNS sub-domains separated by slashes.
//
// +required
optional string pool = 2;
// Device references one device instance via its name in the driver's
// resource pool. It must be a DNS label.
//
// +required
optional string device = 3;
// 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.
//
// +optional
// +listType=atomic
repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 4;
// Data contains arbitrary driver-specific data.
//
// +optional
optional .k8s.io.apimachinery.pkg.runtime.RawExtension data = 5;
// NetworkData contains network-related information specific to the device.
//
// +optional
optional NetworkDeviceData networkData = 6;
}
// AllocationResult contains attributes of an allocated resource.
message AllocationResult {
// Devices is the result of allocating devices.
@@ -480,6 +527,33 @@ message DeviceSelector {
optional CELDeviceSelector cel = 1;
}
// 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.
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.
//
// +optional
optional string interfaceName = 1;
// 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.
//
// +optional
// +listType=atomic
repeated string ips = 2;
// HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.
//
// +optional
optional string hardwareAddress = 3;
}
// OpaqueDeviceConfiguration contains configuration parameters for a driver
// in a format defined by the driver vendor.
message OpaqueDeviceConfiguration {
@@ -603,6 +677,18 @@ message ResourceClaimStatus {
// +patchStrategy=merge
// +patchMergeKey=uid
repeated ResourceClaimConsumerReference reservedFor = 2;
// Devices contains the status of each device allocated for this
// claim, as reported by the driver. This can include driver-specific
// information. Entries are owned by their respective drivers.
//
// +optional
// +listType=map
// +listMapKey=driver
// +listMapKey=device
// +listMapKey=pool
// +featureGate=DRAResourceClaimDeviceStatus
repeated AllocatedDeviceStatus devices = 4;
}
// ResourceClaimTemplate is used to produce ResourceClaim objects.

View File

@@ -27,6 +27,20 @@ package v1alpha3
// Those methods can be generated by using hack/update-codegen.sh
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
var map_AllocatedDeviceStatus = map[string]string{
"": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.",
"driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
"pool": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\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.",
"networkData": "NetworkData contains network-related information specific to the device.",
}
func (AllocatedDeviceStatus) SwaggerDoc() map[string]string {
return map_AllocatedDeviceStatus
}
var map_AllocationResult = map[string]string{
"": "AllocationResult contains attributes of an allocated resource.",
"devices": "Devices is the result of allocating devices.",
@@ -211,6 +225,17 @@ func (DeviceSelector) SwaggerDoc() map[string]string {
return map_DeviceSelector
}
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.",
"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.",
}
func (NetworkDeviceData) SwaggerDoc() map[string]string {
return map_NetworkDeviceData
}
var map_OpaqueDeviceConfiguration = map[string]string{
"": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.",
"driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
@@ -267,6 +292,7 @@ var map_ResourceClaimStatus = map[string]string{
"": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.",
"allocation": "Allocation is set once the claim has been allocated successfully.",
"reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.",
"devices": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.",
}
func (ResourceClaimStatus) SwaggerDoc() map[string]string {

View File

@@ -22,18 +22,48 @@ limitations under the License.
package v1alpha3
import (
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
resource "k8s.io/apimachinery/pkg/api/resource"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AllocatedDeviceStatus) DeepCopyInto(out *AllocatedDeviceStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]v1.Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
in.Data.DeepCopyInto(&out.Data)
if in.NetworkData != nil {
in, out := &in.NetworkData, &out.NetworkData
*out = new(NetworkDeviceData)
(*in).DeepCopyInto(*out)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedDeviceStatus.
func (in *AllocatedDeviceStatus) DeepCopy() *AllocatedDeviceStatus {
if in == nil {
return nil
}
out := new(AllocatedDeviceStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AllocationResult) DeepCopyInto(out *AllocationResult) {
*out = *in
in.Devices.DeepCopyInto(&out.Devices)
if in.NodeSelector != nil {
in, out := &in.NodeSelector, &out.NodeSelector
*out = new(v1.NodeSelector)
*out = new(corev1.NodeSelector)
(*in).DeepCopyInto(*out)
}
return
@@ -487,6 +517,27 @@ func (in *DeviceSelector) DeepCopy() *DeviceSelector {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData) {
*out = *in
if in.IPs != nil {
in, out := &in.IPs, &out.IPs
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDeviceData.
func (in *NetworkDeviceData) DeepCopy() *NetworkDeviceData {
if in == nil {
return nil
}
out := new(NetworkDeviceData)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OpaqueDeviceConfiguration) DeepCopyInto(out *OpaqueDeviceConfiguration) {
*out = *in
@@ -611,6 +662,13 @@ func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus) {
*out = make([]ResourceClaimConsumerReference, len(*in))
copy(*out, *in)
}
if in.Devices != nil {
in, out := &in.Devices, &out.Devices
*out = make([]AllocatedDeviceStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
@@ -784,7 +842,7 @@ func (in *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec) {
out.Pool = in.Pool
if in.NodeSelector != nil {
in, out := &in.NodeSelector, &out.NodeSelector
*out = new(v1.NodeSelector)
*out = new(corev1.NodeSelector)
(*in).DeepCopyInto(*out)
}
if in.Devices != nil {

File diff suppressed because it is too large Load Diff

View File

@@ -30,6 +30,53 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "k8s.io/api/resource/v1beta1";
// AllocatedDeviceStatus contains the status of an allocated device, if the
// driver chooses to report it. This may include driver-specific information.
message AllocatedDeviceStatus {
// Driver specifies the name of the DRA driver whose kubelet
// plugin should be invoked to process the allocation once the claim is
// needed on a node.
//
// Must be a DNS subdomain and should end with a DNS domain owned by the
// vendor of the driver.
//
// +required
optional string driver = 1;
// This name together with the driver name and the device name field
// identify which device was allocated (`<driver name>/<pool name>/<device name>`).
//
// Must not be longer than 253 characters and may contain one or more
// DNS sub-domains separated by slashes.
//
// +required
optional string pool = 2;
// Device references one device instance via its name in the driver's
// resource pool. It must be a DNS label.
//
// +required
optional string device = 3;
// 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.
//
// +optional
// +listType=atomic
repeated .k8s.io.apimachinery.pkg.apis.meta.v1.Condition conditions = 4;
// Data contains arbitrary driver-specific data.
//
// +optional
optional .k8s.io.apimachinery.pkg.runtime.RawExtension data = 5;
// NetworkData contains network-related information specific to the device.
//
// +optional
optional NetworkDeviceData networkData = 6;
}
// AllocationResult contains attributes of an allocated resource.
message AllocationResult {
// Devices is the result of allocating devices.
@@ -488,6 +535,33 @@ message DeviceSelector {
optional CELDeviceSelector cel = 1;
}
// 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.
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.
//
// +optional
optional string interfaceName = 1;
// 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.
//
// +optional
// +listType=atomic
repeated string ips = 2;
// HardwareAddress represents the hardware address (e.g. MAC Address) of the device's network interface.
//
// +optional
optional string hardwareAddress = 3;
}
// OpaqueDeviceConfiguration contains configuration parameters for a driver
// in a format defined by the driver vendor.
message OpaqueDeviceConfiguration {
@@ -611,6 +685,18 @@ message ResourceClaimStatus {
// +patchStrategy=merge
// +patchMergeKey=uid
repeated ResourceClaimConsumerReference reservedFor = 2;
// Devices contains the status of each device allocated for this
// claim, as reported by the driver. This can include driver-specific
// information. Entries are owned by their respective drivers.
//
// +optional
// +listType=map
// +listMapKey=driver
// +listMapKey=device
// +listMapKey=pool
// +featureGate=DRAResourceClaimDeviceStatus
repeated AllocatedDeviceStatus devices = 4;
}
// ResourceClaimTemplate is used to produce ResourceClaim objects.

View File

@@ -27,6 +27,20 @@ package v1beta1
// Those methods can be generated by using hack/update-codegen.sh
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
var map_AllocatedDeviceStatus = map[string]string{
"": "AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.",
"driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
"pool": "This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).\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.",
"networkData": "NetworkData contains network-related information specific to the device.",
}
func (AllocatedDeviceStatus) SwaggerDoc() map[string]string {
return map_AllocatedDeviceStatus
}
var map_AllocationResult = map[string]string{
"": "AllocationResult contains attributes of an allocated resource.",
"devices": "Devices is the result of allocating devices.",
@@ -220,6 +234,17 @@ func (DeviceSelector) SwaggerDoc() map[string]string {
return map_DeviceSelector
}
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.",
"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.",
}
func (NetworkDeviceData) SwaggerDoc() map[string]string {
return map_NetworkDeviceData
}
var map_OpaqueDeviceConfiguration = map[string]string{
"": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.",
"driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.",
@@ -276,6 +301,7 @@ var map_ResourceClaimStatus = map[string]string{
"": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.",
"allocation": "Allocation is set once the claim has been allocated successfully.",
"reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.",
"devices": "Devices contains the status of each device allocated for this claim, as reported by the driver. This can include driver-specific information. Entries are owned by their respective drivers.",
}
func (ResourceClaimStatus) SwaggerDoc() map[string]string {

View File

@@ -22,17 +22,47 @@ limitations under the License.
package v1beta1
import (
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AllocatedDeviceStatus) DeepCopyInto(out *AllocatedDeviceStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]v1.Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
in.Data.DeepCopyInto(&out.Data)
if in.NetworkData != nil {
in, out := &in.NetworkData, &out.NetworkData
*out = new(NetworkDeviceData)
(*in).DeepCopyInto(*out)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedDeviceStatus.
func (in *AllocatedDeviceStatus) DeepCopy() *AllocatedDeviceStatus {
if in == nil {
return nil
}
out := new(AllocatedDeviceStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AllocationResult) DeepCopyInto(out *AllocationResult) {
*out = *in
in.Devices.DeepCopyInto(&out.Devices)
if in.NodeSelector != nil {
in, out := &in.NodeSelector, &out.NodeSelector
*out = new(v1.NodeSelector)
*out = new(corev1.NodeSelector)
(*in).DeepCopyInto(*out)
}
return
@@ -503,6 +533,27 @@ func (in *DeviceSelector) DeepCopy() *DeviceSelector {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkDeviceData) DeepCopyInto(out *NetworkDeviceData) {
*out = *in
if in.IPs != nil {
in, out := &in.IPs, &out.IPs
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDeviceData.
func (in *NetworkDeviceData) DeepCopy() *NetworkDeviceData {
if in == nil {
return nil
}
out := new(NetworkDeviceData)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OpaqueDeviceConfiguration) DeepCopyInto(out *OpaqueDeviceConfiguration) {
*out = *in
@@ -627,6 +678,13 @@ func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus) {
*out = make([]ResourceClaimConsumerReference, len(*in))
copy(*out, *in)
}
if in.Devices != nil {
in, out := &in.Devices, &out.Devices
*out = make([]AllocatedDeviceStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
@@ -800,7 +858,7 @@ func (in *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec) {
out.Pool = in.Pool
if in.NodeSelector != nil {
in, out := &in.NodeSelector, &out.NodeSelector
*out = new(v1.NodeSelector)
*out = new(corev1.NodeSelector)
(*in).DeepCopyInto(*out)
}
if in.Devices != nil {

View File

@@ -157,6 +157,40 @@
"name": "nameValue",
"uid": "uidValue"
}
],
"devices": [
{
"driver": "driverValue",
"pool": "poolValue",
"device": "deviceValue",
"conditions": [
{
"type": "typeValue",
"status": "statusValue",
"observedGeneration": 3,
"lastTransitionTime": "2004-01-01T01:01:01Z",
"reason": "reasonValue",
"message": "messageValue"
}
],
"data": {
"apiVersion": "example.com/v1",
"kind": "CustomType",
"spec": {
"replicas": 1
},
"status": {
"available": 1
}
},
"networkData": {
"interfaceName": "interfaceNameValue",
"ips": [
"ipsValue"
],
"hardwareAddress": "hardwareAddressValue"
}
}
]
}
}

View File

@@ -93,6 +93,29 @@ status:
operator: operatorValue
values:
- valuesValue
devices:
- conditions:
- lastTransitionTime: "2004-01-01T01:01:01Z"
message: messageValue
observedGeneration: 3
reason: reasonValue
status: statusValue
type: typeValue
data:
apiVersion: example.com/v1
kind: CustomType
spec:
replicas: 1
status:
available: 1
device: deviceValue
driver: driverValue
networkData:
hardwareAddress: hardwareAddressValue
interfaceName: interfaceNameValue
ips:
- ipsValue
pool: poolValue
reservedFor:
- apiGroup: apiGroupValue
name: nameValue

View File

@@ -157,6 +157,40 @@
"name": "nameValue",
"uid": "uidValue"
}
],
"devices": [
{
"driver": "driverValue",
"pool": "poolValue",
"device": "deviceValue",
"conditions": [
{
"type": "typeValue",
"status": "statusValue",
"observedGeneration": 3,
"lastTransitionTime": "2004-01-01T01:01:01Z",
"reason": "reasonValue",
"message": "messageValue"
}
],
"data": {
"apiVersion": "example.com/v1",
"kind": "CustomType",
"spec": {
"replicas": 1
},
"status": {
"available": 1
}
},
"networkData": {
"interfaceName": "interfaceNameValue",
"ips": [
"ipsValue"
],
"hardwareAddress": "hardwareAddressValue"
}
}
]
}
}

View File

@@ -93,6 +93,29 @@ status:
operator: operatorValue
values:
- valuesValue
devices:
- conditions:
- lastTransitionTime: "2004-01-01T01:01:01Z"
message: messageValue
observedGeneration: 3
reason: reasonValue
status: statusValue
type: typeValue
data:
apiVersion: example.com/v1
kind: CustomType
spec:
replicas: 1
status:
available: 1
device: deviceValue
driver: driverValue
networkData:
hardwareAddress: hardwareAddressValue
interfaceName: interfaceNameValue
ips:
- ipsValue
pool: poolValue
reservedFor:
- apiGroup: apiGroupValue
name: nameValue

View File

@@ -12353,6 +12353,33 @@ var schemaYAML = typed.YAMLObject(`types:
- name: namespace
type:
scalar: string
- name: io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus
map:
fields:
- name: conditions
type:
list:
elementType:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
elementRelationship: atomic
- name: data
type:
namedType: __untyped_atomic_
- name: device
type:
scalar: string
default: ""
- name: driver
type:
scalar: string
default: ""
- name: networkData
type:
namedType: io.k8s.api.resource.v1alpha3.NetworkDeviceData
- name: pool
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.AllocationResult
map:
fields:
@@ -12576,6 +12603,21 @@ var schemaYAML = typed.YAMLObject(`types:
- name: cel
type:
namedType: io.k8s.api.resource.v1alpha3.CELDeviceSelector
- name: io.k8s.api.resource.v1alpha3.NetworkDeviceData
map:
fields:
- name: hardwareAddress
type:
scalar: string
- name: interfaceName
type:
scalar: string
- name: ips
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration
map:
fields:
@@ -12638,6 +12680,16 @@ var schemaYAML = typed.YAMLObject(`types:
- name: allocation
type:
namedType: io.k8s.api.resource.v1alpha3.AllocationResult
- name: devices
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus
elementRelationship: associative
keys:
- driver
- device
- pool
- name: reservedFor
type:
list:
@@ -12732,6 +12784,33 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.api.resource.v1alpha3.ResourcePool
default: {}
- name: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus
map:
fields:
- name: conditions
type:
list:
elementType:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
elementRelationship: atomic
- name: data
type:
namedType: __untyped_atomic_
- name: device
type:
scalar: string
default: ""
- name: driver
type:
scalar: string
default: ""
- name: networkData
type:
namedType: io.k8s.api.resource.v1beta1.NetworkDeviceData
- name: pool
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1beta1.AllocationResult
map:
fields:
@@ -12961,6 +13040,21 @@ var schemaYAML = typed.YAMLObject(`types:
- name: cel
type:
namedType: io.k8s.api.resource.v1beta1.CELDeviceSelector
- name: io.k8s.api.resource.v1beta1.NetworkDeviceData
map:
fields:
- name: hardwareAddress
type:
scalar: string
- name: interfaceName
type:
scalar: string
- name: ips
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration
map:
fields:
@@ -13023,6 +13117,16 @@ var schemaYAML = typed.YAMLObject(`types:
- name: allocation
type:
namedType: io.k8s.api.resource.v1beta1.AllocationResult
- name: devices
type:
list:
elementType:
namedType: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus
elementRelationship: associative
keys:
- driver
- device
- pool
- name: reservedFor
type:
list:

View File

@@ -0,0 +1,94 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha3
import (
runtime "k8s.io/apimachinery/pkg/runtime"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// AllocatedDeviceStatusApplyConfiguration represents a declarative configuration of the AllocatedDeviceStatus type for use
// with apply.
type AllocatedDeviceStatusApplyConfiguration struct {
Driver *string `json:"driver,omitempty"`
Pool *string `json:"pool,omitempty"`
Device *string `json:"device,omitempty"`
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
Data *runtime.RawExtension `json:"data,omitempty"`
NetworkData *NetworkDeviceDataApplyConfiguration `json:"networkData,omitempty"`
}
// AllocatedDeviceStatusApplyConfiguration constructs a declarative configuration of the AllocatedDeviceStatus type for use with
// apply.
func AllocatedDeviceStatus() *AllocatedDeviceStatusApplyConfiguration {
return &AllocatedDeviceStatusApplyConfiguration{}
}
// WithDriver sets the Driver field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Driver field is set to the value of the last call.
func (b *AllocatedDeviceStatusApplyConfiguration) WithDriver(value string) *AllocatedDeviceStatusApplyConfiguration {
b.Driver = &value
return b
}
// WithPool sets the Pool field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Pool field is set to the value of the last call.
func (b *AllocatedDeviceStatusApplyConfiguration) WithPool(value string) *AllocatedDeviceStatusApplyConfiguration {
b.Pool = &value
return b
}
// WithDevice sets the Device field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Device field is set to the value of the last call.
func (b *AllocatedDeviceStatusApplyConfiguration) WithDevice(value string) *AllocatedDeviceStatusApplyConfiguration {
b.Device = &value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *AllocatedDeviceStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *AllocatedDeviceStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}
// WithData sets the Data field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Data field is set to the value of the last call.
func (b *AllocatedDeviceStatusApplyConfiguration) WithData(value runtime.RawExtension) *AllocatedDeviceStatusApplyConfiguration {
b.Data = &value
return b
}
// WithNetworkData sets the NetworkData field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the NetworkData field is set to the value of the last call.
func (b *AllocatedDeviceStatusApplyConfiguration) WithNetworkData(value *NetworkDeviceDataApplyConfiguration) *AllocatedDeviceStatusApplyConfiguration {
b.NetworkData = value
return b
}

View File

@@ -0,0 +1,59 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha3
// NetworkDeviceDataApplyConfiguration represents a declarative configuration of the NetworkDeviceData type for use
// with apply.
type NetworkDeviceDataApplyConfiguration struct {
InterfaceName *string `json:"interfaceName,omitempty"`
IPs []string `json:"ips,omitempty"`
HardwareAddress *string `json:"hardwareAddress,omitempty"`
}
// NetworkDeviceDataApplyConfiguration constructs a declarative configuration of the NetworkDeviceData type for use with
// apply.
func NetworkDeviceData() *NetworkDeviceDataApplyConfiguration {
return &NetworkDeviceDataApplyConfiguration{}
}
// WithInterfaceName sets the InterfaceName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the InterfaceName field is set to the value of the last call.
func (b *NetworkDeviceDataApplyConfiguration) WithInterfaceName(value string) *NetworkDeviceDataApplyConfiguration {
b.InterfaceName = &value
return b
}
// WithIPs adds the given value to the IPs field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the IPs field.
func (b *NetworkDeviceDataApplyConfiguration) WithIPs(values ...string) *NetworkDeviceDataApplyConfiguration {
for i := range values {
b.IPs = append(b.IPs, values[i])
}
return b
}
// WithHardwareAddress sets the HardwareAddress field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the HardwareAddress field is set to the value of the last call.
func (b *NetworkDeviceDataApplyConfiguration) WithHardwareAddress(value string) *NetworkDeviceDataApplyConfiguration {
b.HardwareAddress = &value
return b
}

View File

@@ -23,6 +23,7 @@ package v1alpha3
type ResourceClaimStatusApplyConfiguration struct {
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
Devices []AllocatedDeviceStatusApplyConfiguration `json:"devices,omitempty"`
}
// ResourceClaimStatusApplyConfiguration constructs a declarative configuration of the ResourceClaimStatus type for use with
@@ -51,3 +52,16 @@ func (b *ResourceClaimStatusApplyConfiguration) WithReservedFor(values ...*Resou
}
return b
}
// WithDevices adds the given value to the Devices field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Devices field.
func (b *ResourceClaimStatusApplyConfiguration) WithDevices(values ...*AllocatedDeviceStatusApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithDevices")
}
b.Devices = append(b.Devices, *values[i])
}
return b
}

View File

@@ -0,0 +1,94 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// AllocatedDeviceStatusApplyConfiguration represents a declarative configuration of the AllocatedDeviceStatus type for use
// with apply.
type AllocatedDeviceStatusApplyConfiguration struct {
Driver *string `json:"driver,omitempty"`
Pool *string `json:"pool,omitempty"`
Device *string `json:"device,omitempty"`
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
Data *runtime.RawExtension `json:"data,omitempty"`
NetworkData *NetworkDeviceDataApplyConfiguration `json:"networkData,omitempty"`
}
// AllocatedDeviceStatusApplyConfiguration constructs a declarative configuration of the AllocatedDeviceStatus type for use with
// apply.
func AllocatedDeviceStatus() *AllocatedDeviceStatusApplyConfiguration {
return &AllocatedDeviceStatusApplyConfiguration{}
}
// WithDriver sets the Driver field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Driver field is set to the value of the last call.
func (b *AllocatedDeviceStatusApplyConfiguration) WithDriver(value string) *AllocatedDeviceStatusApplyConfiguration {
b.Driver = &value
return b
}
// WithPool sets the Pool field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Pool field is set to the value of the last call.
func (b *AllocatedDeviceStatusApplyConfiguration) WithPool(value string) *AllocatedDeviceStatusApplyConfiguration {
b.Pool = &value
return b
}
// WithDevice sets the Device field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Device field is set to the value of the last call.
func (b *AllocatedDeviceStatusApplyConfiguration) WithDevice(value string) *AllocatedDeviceStatusApplyConfiguration {
b.Device = &value
return b
}
// WithConditions adds the given value to the Conditions field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Conditions field.
func (b *AllocatedDeviceStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *AllocatedDeviceStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}
// WithData sets the Data field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Data field is set to the value of the last call.
func (b *AllocatedDeviceStatusApplyConfiguration) WithData(value runtime.RawExtension) *AllocatedDeviceStatusApplyConfiguration {
b.Data = &value
return b
}
// WithNetworkData sets the NetworkData field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the NetworkData field is set to the value of the last call.
func (b *AllocatedDeviceStatusApplyConfiguration) WithNetworkData(value *NetworkDeviceDataApplyConfiguration) *AllocatedDeviceStatusApplyConfiguration {
b.NetworkData = value
return b
}

View File

@@ -0,0 +1,59 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
// NetworkDeviceDataApplyConfiguration represents a declarative configuration of the NetworkDeviceData type for use
// with apply.
type NetworkDeviceDataApplyConfiguration struct {
InterfaceName *string `json:"interfaceName,omitempty"`
IPs []string `json:"ips,omitempty"`
HardwareAddress *string `json:"hardwareAddress,omitempty"`
}
// NetworkDeviceDataApplyConfiguration constructs a declarative configuration of the NetworkDeviceData type for use with
// apply.
func NetworkDeviceData() *NetworkDeviceDataApplyConfiguration {
return &NetworkDeviceDataApplyConfiguration{}
}
// WithInterfaceName sets the InterfaceName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the InterfaceName field is set to the value of the last call.
func (b *NetworkDeviceDataApplyConfiguration) WithInterfaceName(value string) *NetworkDeviceDataApplyConfiguration {
b.InterfaceName = &value
return b
}
// WithIPs adds the given value to the IPs field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the IPs field.
func (b *NetworkDeviceDataApplyConfiguration) WithIPs(values ...string) *NetworkDeviceDataApplyConfiguration {
for i := range values {
b.IPs = append(b.IPs, values[i])
}
return b
}
// WithHardwareAddress sets the HardwareAddress field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the HardwareAddress field is set to the value of the last call.
func (b *NetworkDeviceDataApplyConfiguration) WithHardwareAddress(value string) *NetworkDeviceDataApplyConfiguration {
b.HardwareAddress = &value
return b
}

View File

@@ -23,6 +23,7 @@ package v1beta1
type ResourceClaimStatusApplyConfiguration struct {
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
Devices []AllocatedDeviceStatusApplyConfiguration `json:"devices,omitempty"`
}
// ResourceClaimStatusApplyConfiguration constructs a declarative configuration of the ResourceClaimStatus type for use with
@@ -51,3 +52,16 @@ func (b *ResourceClaimStatusApplyConfiguration) WithReservedFor(values ...*Resou
}
return b
}
// WithDevices adds the given value to the Devices field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Devices field.
func (b *ResourceClaimStatusApplyConfiguration) WithDevices(values ...*AllocatedDeviceStatusApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithDevices")
}
b.Devices = append(b.Devices, *values[i])
}
return b
}

View File

@@ -1582,6 +1582,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{}
// Group=resource.k8s.io, Version=v1alpha3
case v1alpha3.SchemeGroupVersion.WithKind("AllocatedDeviceStatus"):
return &resourcev1alpha3.AllocatedDeviceStatusApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("AllocationResult"):
return &resourcev1alpha3.AllocationResultApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("BasicDevice"):
@@ -1616,6 +1618,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &resourcev1alpha3.DeviceRequestAllocationResultApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSelector"):
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("NetworkDeviceData"):
return &resourcev1alpha3.NetworkDeviceDataApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
return &resourcev1alpha3.OpaqueDeviceConfigurationApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaim"):
@@ -1638,6 +1642,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &resourcev1alpha3.ResourceSliceSpecApplyConfiguration{}
// Group=resource.k8s.io, Version=v1beta1
case resourcev1beta1.SchemeGroupVersion.WithKind("AllocatedDeviceStatus"):
return &applyconfigurationsresourcev1beta1.AllocatedDeviceStatusApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("AllocationResult"):
return &applyconfigurationsresourcev1beta1.AllocationResultApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("BasicDevice"):
@@ -1674,6 +1680,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsresourcev1beta1.DeviceRequestAllocationResultApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceSelector"):
return &applyconfigurationsresourcev1beta1.DeviceSelectorApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("NetworkDeviceData"):
return &applyconfigurationsresourcev1beta1.NetworkDeviceDataApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
return &applyconfigurationsresourcev1beta1.OpaqueDeviceConfigurationApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceClaim"):