mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-25 22:51:40 +00:00
Merge pull request #128240 from LionelJouin/KEP-4817
DRA: Implementation of ResourceClaim.Status.Devices (KEP-4817) Kubernetes-commit: 4cf2818f964d8862db4399cb548060f72bea4ded
This commit is contained in:
commit
ec126553e2
@ -12353,6 +12353,35 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: namespace
|
- name: namespace
|
||||||
type:
|
type:
|
||||||
scalar: string
|
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: associative
|
||||||
|
keys:
|
||||||
|
- type
|
||||||
|
- 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
|
- name: io.k8s.api.resource.v1alpha3.AllocationResult
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -12576,6 +12605,21 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: cel
|
- name: cel
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.resource.v1alpha3.CELDeviceSelector
|
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
|
- name: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -12638,6 +12682,16 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: allocation
|
- name: allocation
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.resource.v1alpha3.AllocationResult
|
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
|
- name: reservedFor
|
||||||
type:
|
type:
|
||||||
list:
|
list:
|
||||||
@ -12732,6 +12786,35 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.resource.v1alpha3.ResourcePool
|
namedType: io.k8s.api.resource.v1alpha3.ResourcePool
|
||||||
default: {}
|
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: associative
|
||||||
|
keys:
|
||||||
|
- type
|
||||||
|
- 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
|
- name: io.k8s.api.resource.v1beta1.AllocationResult
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -12961,6 +13044,21 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: cel
|
- name: cel
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.resource.v1beta1.CELDeviceSelector
|
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
|
- name: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@ -13023,6 +13121,16 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: allocation
|
- name: allocation
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.resource.v1beta1.AllocationResult
|
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
|
- name: reservedFor
|
||||||
type:
|
type:
|
||||||
list:
|
list:
|
||||||
|
@ -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
|
||||||
|
}
|
59
applyconfigurations/resource/v1alpha3/networkdevicedata.go
Normal file
59
applyconfigurations/resource/v1alpha3/networkdevicedata.go
Normal 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
|
||||||
|
}
|
@ -23,6 +23,7 @@ package v1alpha3
|
|||||||
type ResourceClaimStatusApplyConfiguration struct {
|
type ResourceClaimStatusApplyConfiguration struct {
|
||||||
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
|
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
|
||||||
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
|
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
|
||||||
|
Devices []AllocatedDeviceStatusApplyConfiguration `json:"devices,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResourceClaimStatusApplyConfiguration constructs a declarative configuration of the ResourceClaimStatus type for use with
|
// ResourceClaimStatusApplyConfiguration constructs a declarative configuration of the ResourceClaimStatus type for use with
|
||||||
@ -51,3 +52,16 @@ func (b *ResourceClaimStatusApplyConfiguration) WithReservedFor(values ...*Resou
|
|||||||
}
|
}
|
||||||
return b
|
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
|
||||||
|
}
|
||||||
|
@ -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
|
||||||
|
}
|
59
applyconfigurations/resource/v1beta1/networkdevicedata.go
Normal file
59
applyconfigurations/resource/v1beta1/networkdevicedata.go
Normal 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
|
||||||
|
}
|
@ -23,6 +23,7 @@ package v1beta1
|
|||||||
type ResourceClaimStatusApplyConfiguration struct {
|
type ResourceClaimStatusApplyConfiguration struct {
|
||||||
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
|
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
|
||||||
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
|
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
|
||||||
|
Devices []AllocatedDeviceStatusApplyConfiguration `json:"devices,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResourceClaimStatusApplyConfiguration constructs a declarative configuration of the ResourceClaimStatus type for use with
|
// ResourceClaimStatusApplyConfiguration constructs a declarative configuration of the ResourceClaimStatus type for use with
|
||||||
@ -51,3 +52,16 @@ func (b *ResourceClaimStatusApplyConfiguration) WithReservedFor(values ...*Resou
|
|||||||
}
|
}
|
||||||
return b
|
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
|
||||||
|
}
|
||||||
|
@ -1582,6 +1582,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{}
|
return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{}
|
||||||
|
|
||||||
// Group=resource.k8s.io, Version=v1alpha3
|
// Group=resource.k8s.io, Version=v1alpha3
|
||||||
|
case v1alpha3.SchemeGroupVersion.WithKind("AllocatedDeviceStatus"):
|
||||||
|
return &resourcev1alpha3.AllocatedDeviceStatusApplyConfiguration{}
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("AllocationResult"):
|
case v1alpha3.SchemeGroupVersion.WithKind("AllocationResult"):
|
||||||
return &resourcev1alpha3.AllocationResultApplyConfiguration{}
|
return &resourcev1alpha3.AllocationResultApplyConfiguration{}
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("BasicDevice"):
|
case v1alpha3.SchemeGroupVersion.WithKind("BasicDevice"):
|
||||||
@ -1616,6 +1618,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &resourcev1alpha3.DeviceRequestAllocationResultApplyConfiguration{}
|
return &resourcev1alpha3.DeviceRequestAllocationResultApplyConfiguration{}
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSelector"):
|
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSelector"):
|
||||||
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
|
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
|
||||||
|
case v1alpha3.SchemeGroupVersion.WithKind("NetworkDeviceData"):
|
||||||
|
return &resourcev1alpha3.NetworkDeviceDataApplyConfiguration{}
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
|
case v1alpha3.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
|
||||||
return &resourcev1alpha3.OpaqueDeviceConfigurationApplyConfiguration{}
|
return &resourcev1alpha3.OpaqueDeviceConfigurationApplyConfiguration{}
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaim"):
|
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaim"):
|
||||||
@ -1638,6 +1642,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &resourcev1alpha3.ResourceSliceSpecApplyConfiguration{}
|
return &resourcev1alpha3.ResourceSliceSpecApplyConfiguration{}
|
||||||
|
|
||||||
// Group=resource.k8s.io, Version=v1beta1
|
// Group=resource.k8s.io, Version=v1beta1
|
||||||
|
case resourcev1beta1.SchemeGroupVersion.WithKind("AllocatedDeviceStatus"):
|
||||||
|
return &applyconfigurationsresourcev1beta1.AllocatedDeviceStatusApplyConfiguration{}
|
||||||
case resourcev1beta1.SchemeGroupVersion.WithKind("AllocationResult"):
|
case resourcev1beta1.SchemeGroupVersion.WithKind("AllocationResult"):
|
||||||
return &applyconfigurationsresourcev1beta1.AllocationResultApplyConfiguration{}
|
return &applyconfigurationsresourcev1beta1.AllocationResultApplyConfiguration{}
|
||||||
case resourcev1beta1.SchemeGroupVersion.WithKind("BasicDevice"):
|
case resourcev1beta1.SchemeGroupVersion.WithKind("BasicDevice"):
|
||||||
@ -1674,6 +1680,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &applyconfigurationsresourcev1beta1.DeviceRequestAllocationResultApplyConfiguration{}
|
return &applyconfigurationsresourcev1beta1.DeviceRequestAllocationResultApplyConfiguration{}
|
||||||
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceSelector"):
|
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceSelector"):
|
||||||
return &applyconfigurationsresourcev1beta1.DeviceSelectorApplyConfiguration{}
|
return &applyconfigurationsresourcev1beta1.DeviceSelectorApplyConfiguration{}
|
||||||
|
case resourcev1beta1.SchemeGroupVersion.WithKind("NetworkDeviceData"):
|
||||||
|
return &applyconfigurationsresourcev1beta1.NetworkDeviceDataApplyConfiguration{}
|
||||||
case resourcev1beta1.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
|
case resourcev1beta1.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
|
||||||
return &applyconfigurationsresourcev1beta1.OpaqueDeviceConfigurationApplyConfiguration{}
|
return &applyconfigurationsresourcev1beta1.OpaqueDeviceConfigurationApplyConfiguration{}
|
||||||
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceClaim"):
|
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceClaim"):
|
||||||
|
2
go.mod
2
go.mod
@ -26,7 +26,7 @@ require (
|
|||||||
golang.org/x/time v0.7.0
|
golang.org/x/time v0.7.0
|
||||||
google.golang.org/protobuf v1.35.1
|
google.golang.org/protobuf v1.35.1
|
||||||
gopkg.in/evanphx/json-patch.v4 v4.12.0
|
gopkg.in/evanphx/json-patch.v4 v4.12.0
|
||||||
k8s.io/api v0.0.0-20241108114314-0869e9d258da
|
k8s.io/api v0.0.0-20241108114315-3f43b5a94246
|
||||||
k8s.io/apimachinery v0.0.0-20241108022104-96b97de8d6ba
|
k8s.io/apimachinery v0.0.0-20241108022104-96b97de8d6ba
|
||||||
k8s.io/klog/v2 v2.130.1
|
k8s.io/klog/v2 v2.130.1
|
||||||
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f
|
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f
|
||||||
|
4
go.sum
4
go.sum
@ -150,8 +150,8 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
|||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
k8s.io/api v0.0.0-20241108114314-0869e9d258da h1:0IBD100isGkMfDCeLrXtOqsmKKeiy3Uj85sI50Aff7U=
|
k8s.io/api v0.0.0-20241108114315-3f43b5a94246 h1:lTiwDILcPkCelpoYPkQ0jt8tmY0/s6Q9sM2mq2qie8g=
|
||||||
k8s.io/api v0.0.0-20241108114314-0869e9d258da/go.mod h1:jw6pQTESH9mdZL2vOK3twojvpPxipl5TpLZpPyl5ZYU=
|
k8s.io/api v0.0.0-20241108114315-3f43b5a94246/go.mod h1:jw6pQTESH9mdZL2vOK3twojvpPxipl5TpLZpPyl5ZYU=
|
||||||
k8s.io/apimachinery v0.0.0-20241108022104-96b97de8d6ba h1:ghB5Iygt6Ge8UyIwW7C1kJx4kP7AUTCL9Qg6GCsUUOY=
|
k8s.io/apimachinery v0.0.0-20241108022104-96b97de8d6ba h1:ghB5Iygt6Ge8UyIwW7C1kJx4kP7AUTCL9Qg6GCsUUOY=
|
||||||
k8s.io/apimachinery v0.0.0-20241108022104-96b97de8d6ba/go.mod h1:HqhdaJUgQqky29T1V0o2yFkt/pZqLFIDyn9Zi/8rxoY=
|
k8s.io/apimachinery v0.0.0-20241108022104-96b97de8d6ba/go.mod h1:HqhdaJUgQqky29T1V0o2yFkt/pZqLFIDyn9Zi/8rxoY=
|
||||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||||
|
Loading…
Reference in New Issue
Block a user