DRA: new API for 1.31

This is a complete revamp of the original API. Some of the key
differences:
- refocused on structured parameters and allocating devices
- support for constraints across devices
- support for allocating "all" or a fixed amount
  of similar devices in a single request
- no class for ResourceClaims, instead individual
  device requests are associated with a mandatory
  DeviceClass

For the sake of simplicity, optional basic types (ints, strings) where the null
value is the default are represented as values in the API types. This makes Go
code simpler because it doesn't have to check for nil (consumers) and values
can be set directly (producers). The effect is that in protobuf, these fields
always get encoded because `opt` only has an effect for pointers.

The roundtrip test data for v1.29.0 and v1.30.0 changes because of the new
"request" field. This is considered acceptable because the entire `claims`
field in the pod spec is still alpha.

The implementation is complete enough to bring up the apiserver.
Adapting other components follows.

Kubernetes-commit: 91d7882e867da25ae8014f679db32b20e35e89b4
This commit is contained in:
Patrick Ohly 2024-06-18 17:47:29 +02:00 committed by Kubernetes Publisher
parent e0bc24e153
commit a7db3ade62
67 changed files with 1588 additions and 3155 deletions

View File

@ -21,7 +21,8 @@ package v1
// ResourceClaimApplyConfiguration represents a declarative configuration of the ResourceClaim type for use
// with apply.
type ResourceClaimApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Name *string `json:"name,omitempty"`
Request *string `json:"request,omitempty"`
}
// ResourceClaimApplyConfiguration constructs a declarative configuration of the ResourceClaim type for use with
@ -37,3 +38,11 @@ func (b *ResourceClaimApplyConfiguration) WithName(value string) *ResourceClaimA
b.Name = &value
return b
}
// WithRequest sets the Request 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 Request field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithRequest(value string) *ResourceClaimApplyConfiguration {
b.Request = &value
return b
}

View File

@ -7432,6 +7432,9 @@ var schemaYAML = typed.YAMLObject(`types:
type:
scalar: string
default: ""
- name: request
type:
scalar: string
- name: io.k8s.api.core.v1.ResourceFieldSelector
map:
fields:
@ -12157,47 +12160,78 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.resource.v1alpha3.AllocationResult
map:
fields:
- name: availableOnNodes
type:
namedType: io.k8s.api.core.v1.NodeSelector
- name: resourceHandles
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.ResourceHandle
elementRelationship: atomic
- name: io.k8s.api.resource.v1alpha3.DriverAllocationResult
map:
fields:
- name: namedResources
type:
namedType: io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult
- name: vendorRequestParameters
type:
namedType: __untyped_atomic_
- name: io.k8s.api.resource.v1alpha3.DriverRequests
map:
fields:
- name: driverName
- name: controller
type:
scalar: string
- name: requests
- name: devices
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.ResourceRequest
elementRelationship: atomic
- name: vendorParameters
namedType: io.k8s.api.resource.v1alpha3.DeviceAllocationResult
default: {}
- name: nodeSelector
type:
namedType: __untyped_atomic_
- name: io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult
namedType: io.k8s.api.core.v1.NodeSelector
- name: io.k8s.api.resource.v1alpha3.BasicDevice
map:
fields:
- name: attributes
type:
map:
elementType:
namedType: io.k8s.api.resource.v1alpha3.DeviceAttribute
- name: capacity
type:
map:
elementType:
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
- name: io.k8s.api.resource.v1alpha3.CELDeviceSelector
map:
fields:
- name: expression
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.Device
map:
fields:
- name: basic
type:
namedType: io.k8s.api.resource.v1alpha3.BasicDevice
- name: name
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.NamedResourcesAttribute
- name: io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration
map:
fields:
- name: opaque
type:
namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration
- name: requests
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: source
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.DeviceAllocationResult
map:
fields:
- name: config
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration
elementRelationship: atomic
- name: results
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult
elementRelationship: atomic
- name: io.k8s.api.resource.v1alpha3.DeviceAttribute
map:
fields:
- name: bool
@ -12206,79 +12240,160 @@ var schemaYAML = typed.YAMLObject(`types:
- name: int
type:
scalar: numeric
- name: intSlice
type:
namedType: io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice
- name: name
type:
scalar: string
default: ""
- name: quantity
type:
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
- name: string
type:
scalar: string
- name: stringSlice
type:
namedType: io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice
- name: version
type:
scalar: string
- name: io.k8s.api.resource.v1alpha3.NamedResourcesFilter
- name: io.k8s.api.resource.v1alpha3.DeviceClaim
map:
fields:
- name: selector
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.NamedResourcesInstance
map:
fields:
- name: attributes
- name: config
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.NamedResourcesAttribute
namedType: io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration
elementRelationship: atomic
- name: name
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice
map:
fields:
- name: ints
- name: constraints
type:
list:
elementType:
scalar: numeric
namedType: io.k8s.api.resource.v1alpha3.DeviceConstraint
elementRelationship: atomic
- name: io.k8s.api.resource.v1alpha3.NamedResourcesRequest
map:
fields:
- name: selector
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.NamedResourcesResources
map:
fields:
- name: instances
- name: requests
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.NamedResourcesInstance
namedType: io.k8s.api.resource.v1alpha3.DeviceRequest
elementRelationship: atomic
- name: io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice
- name: io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration
map:
fields:
- name: strings
- name: opaque
type:
namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration
- name: requests
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.resource.v1alpha3.DeviceClass
map:
fields:
- name: apiVersion
type:
scalar: string
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.resource.v1alpha3.DeviceClassSpec
default: {}
- name: io.k8s.api.resource.v1alpha3.DeviceClassConfiguration
map:
fields:
- name: opaque
type:
namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration
- name: io.k8s.api.resource.v1alpha3.DeviceClassSpec
map:
fields:
- name: config
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.DeviceClassConfiguration
elementRelationship: atomic
- name: selectors
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
elementRelationship: atomic
- name: suitableNodes
type:
namedType: io.k8s.api.core.v1.NodeSelector
- name: io.k8s.api.resource.v1alpha3.DeviceConstraint
map:
fields:
- name: matchAttribute
type:
scalar: string
- name: requests
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.resource.v1alpha3.DeviceRequest
map:
fields:
- name: adminAccess
type:
scalar: boolean
default: false
- name: allocationMode
type:
scalar: string
- name: count
type:
scalar: numeric
- name: deviceClassName
type:
scalar: string
default: ""
- name: name
type:
scalar: string
default: ""
- name: selectors
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
elementRelationship: atomic
- name: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult
map:
fields:
- name: device
type:
scalar: string
default: ""
- name: driver
type:
scalar: string
default: ""
- name: pool
type:
scalar: string
default: ""
- name: request
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.DeviceSelector
map:
fields:
- name: cel
type:
namedType: io.k8s.api.resource.v1alpha3.CELDeviceSelector
- name: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration
map:
fields:
- name: driver
type:
scalar: string
default: ""
- name: parameters
type:
namedType: __untyped_atomic_
- name: io.k8s.api.resource.v1alpha3.PodSchedulingContext
map:
fields:
@ -12362,48 +12477,13 @@ var schemaYAML = typed.YAMLObject(`types:
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.ResourceClaimParameters
map:
fields:
- name: apiVersion
type:
scalar: string
- name: driverRequests
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.DriverRequests
elementRelationship: atomic
- name: generatedFrom
type:
namedType: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference
map:
fields:
- name: apiGroup
type:
scalar: string
- name: kind
type:
scalar: string
default: ""
- name: name
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus
map:
fields:
- name: name
type:
scalar: string
default: ""
- name: unsuitableNodes
type:
list:
@ -12413,13 +12493,13 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.resource.v1alpha3.ResourceClaimSpec
map:
fields:
- name: parametersRef
type:
namedType: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference
- name: resourceClassName
- name: controller
type:
scalar: string
default: ""
- name: devices
type:
namedType: io.k8s.api.resource.v1alpha3.DeviceClaim
default: {}
- name: io.k8s.api.resource.v1alpha3.ResourceClaimStatus
map:
fields:
@ -12429,9 +12509,6 @@ var schemaYAML = typed.YAMLObject(`types:
- name: deallocationRequested
type:
scalar: boolean
- name: driverName
type:
scalar: string
- name: reservedFor
type:
list:
@ -12468,118 +12545,27 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSpec
default: {}
- name: io.k8s.api.resource.v1alpha3.ResourceClass
- name: io.k8s.api.resource.v1alpha3.ResourcePool
map:
fields:
- name: apiVersion
- name: generation
type:
scalar: string
- name: driverName
type:
scalar: string
default: ""
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: parametersRef
type:
namedType: io.k8s.api.resource.v1alpha3.ResourceClassParametersReference
- name: structuredParameters
type:
scalar: boolean
- name: suitableNodes
type:
namedType: io.k8s.api.core.v1.NodeSelector
- name: io.k8s.api.resource.v1alpha3.ResourceClassParameters
map:
fields:
- name: apiVersion
type:
scalar: string
- name: filters
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.ResourceFilter
elementRelationship: atomic
- name: generatedFrom
type:
namedType: io.k8s.api.resource.v1alpha3.ResourceClassParametersReference
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: vendorParameters
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.VendorParameters
elementRelationship: atomic
- name: io.k8s.api.resource.v1alpha3.ResourceClassParametersReference
map:
fields:
- name: apiGroup
type:
scalar: string
- name: kind
type:
scalar: string
default: ""
scalar: numeric
default: 0
- name: name
type:
scalar: string
default: ""
- name: namespace
- name: resourceSliceCount
type:
scalar: string
- name: io.k8s.api.resource.v1alpha3.ResourceFilter
map:
fields:
- name: driverName
type:
scalar: string
- name: namedResources
type:
namedType: io.k8s.api.resource.v1alpha3.NamedResourcesFilter
- name: io.k8s.api.resource.v1alpha3.ResourceHandle
map:
fields:
- name: data
type:
scalar: string
- name: driverName
type:
scalar: string
default: ""
- name: structuredData
type:
namedType: io.k8s.api.resource.v1alpha3.StructuredResourceHandle
- name: io.k8s.api.resource.v1alpha3.ResourceRequest
map:
fields:
- name: namedResources
type:
namedType: io.k8s.api.resource.v1alpha3.NamedResourcesRequest
- name: vendorParameters
type:
namedType: __untyped_atomic_
scalar: numeric
default: 0
- name: io.k8s.api.resource.v1alpha3.ResourceSlice
map:
fields:
- name: apiVersion
type:
scalar: string
- name: driverName
type:
scalar: string
default: ""
- name: kind
type:
scalar: string
@ -12587,39 +12573,36 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: namedResources
- name: spec
type:
namedType: io.k8s.api.resource.v1alpha3.NamedResourcesResources
- name: nodeName
type:
scalar: string
- name: io.k8s.api.resource.v1alpha3.StructuredResourceHandle
namedType: io.k8s.api.resource.v1alpha3.ResourceSliceSpec
default: {}
- name: io.k8s.api.resource.v1alpha3.ResourceSliceSpec
map:
fields:
- name: nodeName
- name: allNodes
type:
scalar: string
- name: results
scalar: boolean
- name: devices
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.DriverAllocationResult
namedType: io.k8s.api.resource.v1alpha3.Device
elementRelationship: atomic
- name: vendorClaimParameters
type:
namedType: __untyped_atomic_
- name: vendorClassParameters
type:
namedType: __untyped_atomic_
- name: io.k8s.api.resource.v1alpha3.VendorParameters
map:
fields:
- name: driverName
- name: driver
type:
scalar: string
- name: parameters
default: ""
- name: nodeName
type:
namedType: __untyped_atomic_
scalar: string
- name: nodeSelector
type:
namedType: io.k8s.api.core.v1.NodeSelector
- name: pool
type:
namedType: io.k8s.api.resource.v1alpha3.ResourcePool
default: {}
- name: io.k8s.api.scheduling.v1.PriorityClass
map:
fields:

View File

@ -25,8 +25,9 @@ import (
// AllocationResultApplyConfiguration represents a declarative configuration of the AllocationResult type for use
// with apply.
type AllocationResultApplyConfiguration struct {
ResourceHandles []ResourceHandleApplyConfiguration `json:"resourceHandles,omitempty"`
AvailableOnNodes *v1.NodeSelectorApplyConfiguration `json:"availableOnNodes,omitempty"`
Devices *DeviceAllocationResultApplyConfiguration `json:"devices,omitempty"`
NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"`
Controller *string `json:"controller,omitempty"`
}
// AllocationResultApplyConfiguration constructs a declarative configuration of the AllocationResult type for use with
@ -35,23 +36,26 @@ func AllocationResult() *AllocationResultApplyConfiguration {
return &AllocationResultApplyConfiguration{}
}
// WithResourceHandles adds the given value to the ResourceHandles 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 ResourceHandles field.
func (b *AllocationResultApplyConfiguration) WithResourceHandles(values ...*ResourceHandleApplyConfiguration) *AllocationResultApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResourceHandles")
}
b.ResourceHandles = append(b.ResourceHandles, *values[i])
}
// WithDevices sets the Devices 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 Devices field is set to the value of the last call.
func (b *AllocationResultApplyConfiguration) WithDevices(value *DeviceAllocationResultApplyConfiguration) *AllocationResultApplyConfiguration {
b.Devices = value
return b
}
// WithAvailableOnNodes sets the AvailableOnNodes field in the declarative configuration to the given value
// WithNodeSelector sets the NodeSelector 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 AvailableOnNodes field is set to the value of the last call.
func (b *AllocationResultApplyConfiguration) WithAvailableOnNodes(value *v1.NodeSelectorApplyConfiguration) *AllocationResultApplyConfiguration {
b.AvailableOnNodes = value
// If called multiple times, the NodeSelector field is set to the value of the last call.
func (b *AllocationResultApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *AllocationResultApplyConfiguration {
b.NodeSelector = value
return b
}
// WithController sets the Controller 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 Controller field is set to the value of the last call.
func (b *AllocationResultApplyConfiguration) WithController(value string) *AllocationResultApplyConfiguration {
b.Controller = &value
return b
}

View File

@ -1,39 +0,0 @@
/*
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
// AllocationResultModelApplyConfiguration represents a declarative configuration of the AllocationResultModel type for use
// with apply.
type AllocationResultModelApplyConfiguration struct {
NamedResources *NamedResourcesAllocationResultApplyConfiguration `json:"namedResources,omitempty"`
}
// AllocationResultModelApplyConfiguration constructs a declarative configuration of the AllocationResultModel type for use with
// apply.
func AllocationResultModel() *AllocationResultModelApplyConfiguration {
return &AllocationResultModelApplyConfiguration{}
}
// WithNamedResources sets the NamedResources 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 NamedResources field is set to the value of the last call.
func (b *AllocationResultModelApplyConfiguration) WithNamedResources(value *NamedResourcesAllocationResultApplyConfiguration) *AllocationResultModelApplyConfiguration {
b.NamedResources = value
return b
}

View File

@ -0,0 +1,65 @@
/*
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 (
v1alpha3 "k8s.io/api/resource/v1alpha3"
resource "k8s.io/apimachinery/pkg/api/resource"
)
// BasicDeviceApplyConfiguration represents a declarative configuration of the BasicDevice type for use
// with apply.
type BasicDeviceApplyConfiguration struct {
Attributes map[v1alpha3.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"`
Capacity map[v1alpha3.QualifiedName]resource.Quantity `json:"capacity,omitempty"`
}
// BasicDeviceApplyConfiguration constructs a declarative configuration of the BasicDevice type for use with
// apply.
func BasicDevice() *BasicDeviceApplyConfiguration {
return &BasicDeviceApplyConfiguration{}
}
// WithAttributes puts the entries into the Attributes field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Attributes field,
// overwriting an existing map entries in Attributes field with the same key.
func (b *BasicDeviceApplyConfiguration) WithAttributes(entries map[v1alpha3.QualifiedName]DeviceAttributeApplyConfiguration) *BasicDeviceApplyConfiguration {
if b.Attributes == nil && len(entries) > 0 {
b.Attributes = make(map[v1alpha3.QualifiedName]DeviceAttributeApplyConfiguration, len(entries))
}
for k, v := range entries {
b.Attributes[k] = v
}
return b
}
// WithCapacity puts the entries into the Capacity field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Capacity field,
// overwriting an existing map entries in Capacity field with the same key.
func (b *BasicDeviceApplyConfiguration) WithCapacity(entries map[v1alpha3.QualifiedName]resource.Quantity) *BasicDeviceApplyConfiguration {
if b.Capacity == nil && len(entries) > 0 {
b.Capacity = make(map[v1alpha3.QualifiedName]resource.Quantity, len(entries))
}
for k, v := range entries {
b.Capacity[k] = v
}
return b
}

View File

@ -18,22 +18,22 @@ limitations under the License.
package v1alpha3
// NamedResourcesFilterApplyConfiguration represents a declarative configuration of the NamedResourcesFilter type for use
// CELDeviceSelectorApplyConfiguration represents a declarative configuration of the CELDeviceSelector type for use
// with apply.
type NamedResourcesFilterApplyConfiguration struct {
Selector *string `json:"selector,omitempty"`
type CELDeviceSelectorApplyConfiguration struct {
Expression *string `json:"expression,omitempty"`
}
// NamedResourcesFilterApplyConfiguration constructs a declarative configuration of the NamedResourcesFilter type for use with
// CELDeviceSelectorApplyConfiguration constructs a declarative configuration of the CELDeviceSelector type for use with
// apply.
func NamedResourcesFilter() *NamedResourcesFilterApplyConfiguration {
return &NamedResourcesFilterApplyConfiguration{}
func CELDeviceSelector() *CELDeviceSelectorApplyConfiguration {
return &CELDeviceSelectorApplyConfiguration{}
}
// WithSelector sets the Selector field in the declarative configuration to the given value
// WithExpression sets the Expression 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 Selector field is set to the value of the last call.
func (b *NamedResourcesFilterApplyConfiguration) WithSelector(value string) *NamedResourcesFilterApplyConfiguration {
b.Selector = &value
// If called multiple times, the Expression field is set to the value of the last call.
func (b *CELDeviceSelectorApplyConfiguration) WithExpression(value string) *CELDeviceSelectorApplyConfiguration {
b.Expression = &value
return b
}

View File

@ -18,22 +18,31 @@ limitations under the License.
package v1alpha3
// NamedResourcesAllocationResultApplyConfiguration represents a declarative configuration of the NamedResourcesAllocationResult type for use
// DeviceApplyConfiguration represents a declarative configuration of the Device type for use
// with apply.
type NamedResourcesAllocationResultApplyConfiguration struct {
Name *string `json:"name,omitempty"`
type DeviceApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Basic *BasicDeviceApplyConfiguration `json:"basic,omitempty"`
}
// NamedResourcesAllocationResultApplyConfiguration constructs a declarative configuration of the NamedResourcesAllocationResult type for use with
// DeviceApplyConfiguration constructs a declarative configuration of the Device type for use with
// apply.
func NamedResourcesAllocationResult() *NamedResourcesAllocationResultApplyConfiguration {
return &NamedResourcesAllocationResultApplyConfiguration{}
func Device() *DeviceApplyConfiguration {
return &DeviceApplyConfiguration{}
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *NamedResourcesAllocationResultApplyConfiguration) WithName(value string) *NamedResourcesAllocationResultApplyConfiguration {
func (b *DeviceApplyConfiguration) WithName(value string) *DeviceApplyConfiguration {
b.Name = &value
return b
}
// WithBasic sets the Basic 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 Basic field is set to the value of the last call.
func (b *DeviceApplyConfiguration) WithBasic(value *BasicDeviceApplyConfiguration) *DeviceApplyConfiguration {
b.Basic = value
return b
}

View File

@ -0,0 +1,63 @@
/*
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 (
v1alpha3 "k8s.io/api/resource/v1alpha3"
)
// DeviceAllocationConfigurationApplyConfiguration represents a declarative configuration of the DeviceAllocationConfiguration type for use
// with apply.
type DeviceAllocationConfigurationApplyConfiguration struct {
Source *v1alpha3.AllocationConfigSource `json:"source,omitempty"`
Requests []string `json:"requests,omitempty"`
DeviceConfigurationApplyConfiguration `json:",inline"`
}
// DeviceAllocationConfigurationApplyConfiguration constructs a declarative configuration of the DeviceAllocationConfiguration type for use with
// apply.
func DeviceAllocationConfiguration() *DeviceAllocationConfigurationApplyConfiguration {
return &DeviceAllocationConfigurationApplyConfiguration{}
}
// WithSource sets the Source 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 Source field is set to the value of the last call.
func (b *DeviceAllocationConfigurationApplyConfiguration) WithSource(value v1alpha3.AllocationConfigSource) *DeviceAllocationConfigurationApplyConfiguration {
b.Source = &value
return b
}
// WithRequests adds the given value to the Requests 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 Requests field.
func (b *DeviceAllocationConfigurationApplyConfiguration) WithRequests(values ...string) *DeviceAllocationConfigurationApplyConfiguration {
for i := range values {
b.Requests = append(b.Requests, values[i])
}
return b
}
// WithOpaque sets the Opaque 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 Opaque field is set to the value of the last call.
func (b *DeviceAllocationConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceAllocationConfigurationApplyConfiguration {
b.Opaque = value
return b
}

View File

@ -0,0 +1,58 @@
/*
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
// DeviceAllocationResultApplyConfiguration represents a declarative configuration of the DeviceAllocationResult type for use
// with apply.
type DeviceAllocationResultApplyConfiguration struct {
Results []DeviceRequestAllocationResultApplyConfiguration `json:"results,omitempty"`
Config []DeviceAllocationConfigurationApplyConfiguration `json:"config,omitempty"`
}
// DeviceAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceAllocationResult type for use with
// apply.
func DeviceAllocationResult() *DeviceAllocationResultApplyConfiguration {
return &DeviceAllocationResultApplyConfiguration{}
}
// WithResults adds the given value to the Results 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 Results field.
func (b *DeviceAllocationResultApplyConfiguration) WithResults(values ...*DeviceRequestAllocationResultApplyConfiguration) *DeviceAllocationResultApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResults")
}
b.Results = append(b.Results, *values[i])
}
return b
}
// WithConfig adds the given value to the Config 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 Config field.
func (b *DeviceAllocationResultApplyConfiguration) WithConfig(values ...*DeviceAllocationConfigurationApplyConfiguration) *DeviceAllocationResultApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConfig")
}
b.Config = append(b.Config, *values[i])
}
return b
}

View File

@ -0,0 +1,66 @@
/*
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
// DeviceAttributeApplyConfiguration represents a declarative configuration of the DeviceAttribute type for use
// with apply.
type DeviceAttributeApplyConfiguration struct {
IntValue *int64 `json:"int,omitempty"`
BoolValue *bool `json:"bool,omitempty"`
StringValue *string `json:"string,omitempty"`
VersionValue *string `json:"version,omitempty"`
}
// DeviceAttributeApplyConfiguration constructs a declarative configuration of the DeviceAttribute type for use with
// apply.
func DeviceAttribute() *DeviceAttributeApplyConfiguration {
return &DeviceAttributeApplyConfiguration{}
}
// WithIntValue sets the IntValue 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 IntValue field is set to the value of the last call.
func (b *DeviceAttributeApplyConfiguration) WithIntValue(value int64) *DeviceAttributeApplyConfiguration {
b.IntValue = &value
return b
}
// WithBoolValue sets the BoolValue 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 BoolValue field is set to the value of the last call.
func (b *DeviceAttributeApplyConfiguration) WithBoolValue(value bool) *DeviceAttributeApplyConfiguration {
b.BoolValue = &value
return b
}
// WithStringValue sets the StringValue 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 StringValue field is set to the value of the last call.
func (b *DeviceAttributeApplyConfiguration) WithStringValue(value string) *DeviceAttributeApplyConfiguration {
b.StringValue = &value
return b
}
// WithVersionValue sets the VersionValue 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 VersionValue field is set to the value of the last call.
func (b *DeviceAttributeApplyConfiguration) WithVersionValue(value string) *DeviceAttributeApplyConfiguration {
b.VersionValue = &value
return b
}

View File

@ -0,0 +1,72 @@
/*
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
// DeviceClaimApplyConfiguration represents a declarative configuration of the DeviceClaim type for use
// with apply.
type DeviceClaimApplyConfiguration struct {
Requests []DeviceRequestApplyConfiguration `json:"requests,omitempty"`
Constraints []DeviceConstraintApplyConfiguration `json:"constraints,omitempty"`
Config []DeviceClaimConfigurationApplyConfiguration `json:"config,omitempty"`
}
// DeviceClaimApplyConfiguration constructs a declarative configuration of the DeviceClaim type for use with
// apply.
func DeviceClaim() *DeviceClaimApplyConfiguration {
return &DeviceClaimApplyConfiguration{}
}
// WithRequests adds the given value to the Requests 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 Requests field.
func (b *DeviceClaimApplyConfiguration) WithRequests(values ...*DeviceRequestApplyConfiguration) *DeviceClaimApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithRequests")
}
b.Requests = append(b.Requests, *values[i])
}
return b
}
// WithConstraints adds the given value to the Constraints 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 Constraints field.
func (b *DeviceClaimApplyConfiguration) WithConstraints(values ...*DeviceConstraintApplyConfiguration) *DeviceClaimApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConstraints")
}
b.Constraints = append(b.Constraints, *values[i])
}
return b
}
// WithConfig adds the given value to the Config 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 Config field.
func (b *DeviceClaimApplyConfiguration) WithConfig(values ...*DeviceClaimConfigurationApplyConfiguration) *DeviceClaimApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConfig")
}
b.Config = append(b.Config, *values[i])
}
return b
}

View File

@ -0,0 +1,50 @@
/*
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
// DeviceClaimConfigurationApplyConfiguration represents a declarative configuration of the DeviceClaimConfiguration type for use
// with apply.
type DeviceClaimConfigurationApplyConfiguration struct {
Requests []string `json:"requests,omitempty"`
DeviceConfigurationApplyConfiguration `json:",inline"`
}
// DeviceClaimConfigurationApplyConfiguration constructs a declarative configuration of the DeviceClaimConfiguration type for use with
// apply.
func DeviceClaimConfiguration() *DeviceClaimConfigurationApplyConfiguration {
return &DeviceClaimConfigurationApplyConfiguration{}
}
// WithRequests adds the given value to the Requests 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 Requests field.
func (b *DeviceClaimConfigurationApplyConfiguration) WithRequests(values ...string) *DeviceClaimConfigurationApplyConfiguration {
for i := range values {
b.Requests = append(b.Requests, values[i])
}
return b
}
// WithOpaque sets the Opaque 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 Opaque field is set to the value of the last call.
func (b *DeviceClaimConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceClaimConfigurationApplyConfiguration {
b.Opaque = value
return b
}

View File

@ -27,58 +27,55 @@ import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ResourceClaimParametersApplyConfiguration represents a declarative configuration of the ResourceClaimParameters type for use
// DeviceClassApplyConfiguration represents a declarative configuration of the DeviceClass type for use
// with apply.
type ResourceClaimParametersApplyConfiguration struct {
type DeviceClassApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
GeneratedFrom *ResourceClaimParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"`
DriverRequests []DriverRequestsApplyConfiguration `json:"driverRequests,omitempty"`
Spec *DeviceClassSpecApplyConfiguration `json:"spec,omitempty"`
}
// ResourceClaimParameters constructs a declarative configuration of the ResourceClaimParameters type for use with
// DeviceClass constructs a declarative configuration of the DeviceClass type for use with
// apply.
func ResourceClaimParameters(name, namespace string) *ResourceClaimParametersApplyConfiguration {
b := &ResourceClaimParametersApplyConfiguration{}
func DeviceClass(name string) *DeviceClassApplyConfiguration {
b := &DeviceClassApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("ResourceClaimParameters")
b.WithKind("DeviceClass")
b.WithAPIVersion("resource.k8s.io/v1alpha3")
return b
}
// ExtractResourceClaimParameters extracts the applied configuration owned by fieldManager from
// resourceClaimParameters. If no managedFields are found in resourceClaimParameters for fieldManager, a
// ResourceClaimParametersApplyConfiguration is returned with only the Name, Namespace (if applicable),
// ExtractDeviceClass extracts the applied configuration owned by fieldManager from
// deviceClass. If no managedFields are found in deviceClass for fieldManager, a
// DeviceClassApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// resourceClaimParameters must be a unmodified ResourceClaimParameters API object that was retrieved from the Kubernetes API.
// ExtractResourceClaimParameters provides a way to perform a extract/modify-in-place/apply workflow.
// deviceClass must be a unmodified DeviceClass API object that was retrieved from the Kubernetes API.
// ExtractDeviceClass provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractResourceClaimParameters(resourceClaimParameters *resourcev1alpha3.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) {
return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "")
func ExtractDeviceClass(deviceClass *resourcev1alpha3.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) {
return extractDeviceClass(deviceClass, fieldManager, "")
}
// ExtractResourceClaimParametersStatus is the same as ExtractResourceClaimParameters except
// ExtractDeviceClassStatus is the same as ExtractDeviceClass except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractResourceClaimParametersStatus(resourceClaimParameters *resourcev1alpha3.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) {
return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "status")
func ExtractDeviceClassStatus(deviceClass *resourcev1alpha3.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) {
return extractDeviceClass(deviceClass, fieldManager, "status")
}
func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha3.ResourceClaimParameters, fieldManager string, subresource string) (*ResourceClaimParametersApplyConfiguration, error) {
b := &ResourceClaimParametersApplyConfiguration{}
err := managedfields.ExtractInto(resourceClaimParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClaimParameters"), fieldManager, b, subresource)
func extractDeviceClass(deviceClass *resourcev1alpha3.DeviceClass, fieldManager string, subresource string) (*DeviceClassApplyConfiguration, error) {
b := &DeviceClassApplyConfiguration{}
err := managedfields.ExtractInto(deviceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha3.DeviceClass"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(resourceClaimParameters.Name)
b.WithNamespace(resourceClaimParameters.Namespace)
b.WithName(deviceClass.Name)
b.WithKind("ResourceClaimParameters")
b.WithKind("DeviceClass")
b.WithAPIVersion("resource.k8s.io/v1alpha3")
return b, nil
}
@ -86,7 +83,7 @@ func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha3.Re
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithKind(value string) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithKind(value string) *DeviceClassApplyConfiguration {
b.Kind = &value
return b
}
@ -94,7 +91,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithKind(value string) *Reso
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithAPIVersion(value string) *DeviceClassApplyConfiguration {
b.APIVersion = &value
return b
}
@ -102,7 +99,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithAPIVersion(value string)
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithName(value string) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithName(value string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
@ -111,7 +108,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithName(value string) *Reso
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithGenerateName(value string) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithGenerateName(value string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
@ -120,7 +117,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithGenerateName(value strin
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithNamespace(value string) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithNamespace(value string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
@ -129,7 +126,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithNamespace(value string)
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithUID(value types.UID) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithUID(value types.UID) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
@ -138,7 +135,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithUID(value types.UID) *Re
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithResourceVersion(value string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
@ -147,7 +144,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithResourceVersion(value st
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithGeneration(value int64) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithGeneration(value int64) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
@ -156,7 +153,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithGeneration(value int64)
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
@ -165,7 +162,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithCreationTimestamp(value
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
@ -174,7 +171,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithDeletionTimestamp(value
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
@ -184,7 +181,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithDeletionGracePeriodSecon
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ResourceClaimParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithLabels(entries map[string]string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
@ -199,7 +196,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithLabels(entries map[strin
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ResourceClaimParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithAnnotations(entries map[string]string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
@ -213,7 +210,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithAnnotations(entries map[
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *ResourceClaimParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
@ -227,7 +224,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithOwnerReferences(values .
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *ResourceClaimParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimParametersApplyConfiguration {
func (b *DeviceClassApplyConfiguration) WithFinalizers(values ...string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
@ -235,35 +232,22 @@ func (b *ResourceClaimParametersApplyConfiguration) WithFinalizers(values ...str
return b
}
func (b *ResourceClaimParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
func (b *DeviceClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value
// WithSpec sets the Spec 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 GeneratedFrom field is set to the value of the last call.
func (b *ResourceClaimParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClaimParametersReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration {
b.GeneratedFrom = value
return b
}
// WithDriverRequests adds the given value to the DriverRequests 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 DriverRequests field.
func (b *ResourceClaimParametersApplyConfiguration) WithDriverRequests(values ...*DriverRequestsApplyConfiguration) *ResourceClaimParametersApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithDriverRequests")
}
b.DriverRequests = append(b.DriverRequests, *values[i])
}
// If called multiple times, the Spec field is set to the value of the last call.
func (b *DeviceClassApplyConfiguration) WithSpec(value *DeviceClassSpecApplyConfiguration) *DeviceClassApplyConfiguration {
b.Spec = value
return b
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ResourceClaimParametersApplyConfiguration) GetName() *string {
func (b *DeviceClassApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.Name
}

View File

@ -0,0 +1,39 @@
/*
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
// DeviceClassConfigurationApplyConfiguration represents a declarative configuration of the DeviceClassConfiguration type for use
// with apply.
type DeviceClassConfigurationApplyConfiguration struct {
DeviceConfigurationApplyConfiguration `json:",inline"`
}
// DeviceClassConfigurationApplyConfiguration constructs a declarative configuration of the DeviceClassConfiguration type for use with
// apply.
func DeviceClassConfiguration() *DeviceClassConfigurationApplyConfiguration {
return &DeviceClassConfigurationApplyConfiguration{}
}
// WithOpaque sets the Opaque 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 Opaque field is set to the value of the last call.
func (b *DeviceClassConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceClassConfigurationApplyConfiguration {
b.Opaque = value
return b
}

View File

@ -0,0 +1,71 @@
/*
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 (
v1 "k8s.io/client-go/applyconfigurations/core/v1"
)
// DeviceClassSpecApplyConfiguration represents a declarative configuration of the DeviceClassSpec type for use
// with apply.
type DeviceClassSpecApplyConfiguration struct {
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
Config []DeviceClassConfigurationApplyConfiguration `json:"config,omitempty"`
SuitableNodes *v1.NodeSelectorApplyConfiguration `json:"suitableNodes,omitempty"`
}
// DeviceClassSpecApplyConfiguration constructs a declarative configuration of the DeviceClassSpec type for use with
// apply.
func DeviceClassSpec() *DeviceClassSpecApplyConfiguration {
return &DeviceClassSpecApplyConfiguration{}
}
// WithSelectors adds the given value to the Selectors 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 Selectors field.
func (b *DeviceClassSpecApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceClassSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithSelectors")
}
b.Selectors = append(b.Selectors, *values[i])
}
return b
}
// WithConfig adds the given value to the Config 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 Config field.
func (b *DeviceClassSpecApplyConfiguration) WithConfig(values ...*DeviceClassConfigurationApplyConfiguration) *DeviceClassSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConfig")
}
b.Config = append(b.Config, *values[i])
}
return b
}
// WithSuitableNodes sets the SuitableNodes 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 SuitableNodes field is set to the value of the last call.
func (b *DeviceClassSpecApplyConfiguration) WithSuitableNodes(value *v1.NodeSelectorApplyConfiguration) *DeviceClassSpecApplyConfiguration {
b.SuitableNodes = value
return b
}

View File

@ -0,0 +1,39 @@
/*
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
// DeviceConfigurationApplyConfiguration represents a declarative configuration of the DeviceConfiguration type for use
// with apply.
type DeviceConfigurationApplyConfiguration struct {
Opaque *OpaqueDeviceConfigurationApplyConfiguration `json:"opaque,omitempty"`
}
// DeviceConfigurationApplyConfiguration constructs a declarative configuration of the DeviceConfiguration type for use with
// apply.
func DeviceConfiguration() *DeviceConfigurationApplyConfiguration {
return &DeviceConfigurationApplyConfiguration{}
}
// WithOpaque sets the Opaque 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 Opaque field is set to the value of the last call.
func (b *DeviceConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceConfigurationApplyConfiguration {
b.Opaque = value
return b
}

View File

@ -0,0 +1,54 @@
/*
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 (
v1alpha3 "k8s.io/api/resource/v1alpha3"
)
// DeviceConstraintApplyConfiguration represents a declarative configuration of the DeviceConstraint type for use
// with apply.
type DeviceConstraintApplyConfiguration struct {
Requests []string `json:"requests,omitempty"`
MatchAttribute *v1alpha3.FullyQualifiedName `json:"matchAttribute,omitempty"`
}
// DeviceConstraintApplyConfiguration constructs a declarative configuration of the DeviceConstraint type for use with
// apply.
func DeviceConstraint() *DeviceConstraintApplyConfiguration {
return &DeviceConstraintApplyConfiguration{}
}
// WithRequests adds the given value to the Requests 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 Requests field.
func (b *DeviceConstraintApplyConfiguration) WithRequests(values ...string) *DeviceConstraintApplyConfiguration {
for i := range values {
b.Requests = append(b.Requests, values[i])
}
return b
}
// WithMatchAttribute sets the MatchAttribute 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 MatchAttribute field is set to the value of the last call.
func (b *DeviceConstraintApplyConfiguration) WithMatchAttribute(value v1alpha3.FullyQualifiedName) *DeviceConstraintApplyConfiguration {
b.MatchAttribute = &value
return b
}

View File

@ -0,0 +1,93 @@
/*
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 (
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
)
// DeviceRequestApplyConfiguration represents a declarative configuration of the DeviceRequest type for use
// with apply.
type DeviceRequestApplyConfiguration struct {
Name *string `json:"name,omitempty"`
DeviceClassName *string `json:"deviceClassName,omitempty"`
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
AllocationMode *resourcev1alpha3.DeviceAllocationMode `json:"allocationMode,omitempty"`
Count *int64 `json:"count,omitempty"`
AdminAccess *bool `json:"adminAccess,omitempty"`
}
// DeviceRequestApplyConfiguration constructs a declarative configuration of the DeviceRequest type for use with
// apply.
func DeviceRequest() *DeviceRequestApplyConfiguration {
return &DeviceRequestApplyConfiguration{}
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *DeviceRequestApplyConfiguration) WithName(value string) *DeviceRequestApplyConfiguration {
b.Name = &value
return b
}
// WithDeviceClassName sets the DeviceClassName 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 DeviceClassName field is set to the value of the last call.
func (b *DeviceRequestApplyConfiguration) WithDeviceClassName(value string) *DeviceRequestApplyConfiguration {
b.DeviceClassName = &value
return b
}
// WithSelectors adds the given value to the Selectors 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 Selectors field.
func (b *DeviceRequestApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceRequestApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithSelectors")
}
b.Selectors = append(b.Selectors, *values[i])
}
return b
}
// WithAllocationMode sets the AllocationMode 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 AllocationMode field is set to the value of the last call.
func (b *DeviceRequestApplyConfiguration) WithAllocationMode(value resourcev1alpha3.DeviceAllocationMode) *DeviceRequestApplyConfiguration {
b.AllocationMode = &value
return b
}
// WithCount sets the Count 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 Count field is set to the value of the last call.
func (b *DeviceRequestApplyConfiguration) WithCount(value int64) *DeviceRequestApplyConfiguration {
b.Count = &value
return b
}
// WithAdminAccess sets the AdminAccess 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 AdminAccess field is set to the value of the last call.
func (b *DeviceRequestApplyConfiguration) WithAdminAccess(value bool) *DeviceRequestApplyConfiguration {
b.AdminAccess = &value
return b
}

View File

@ -0,0 +1,66 @@
/*
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
// DeviceRequestAllocationResultApplyConfiguration represents a declarative configuration of the DeviceRequestAllocationResult type for use
// with apply.
type DeviceRequestAllocationResultApplyConfiguration struct {
Request *string `json:"request,omitempty"`
Driver *string `json:"driver,omitempty"`
Pool *string `json:"pool,omitempty"`
Device *string `json:"device,omitempty"`
}
// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with
// apply.
func DeviceRequestAllocationResult() *DeviceRequestAllocationResultApplyConfiguration {
return &DeviceRequestAllocationResultApplyConfiguration{}
}
// WithRequest sets the Request 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 Request field is set to the value of the last call.
func (b *DeviceRequestAllocationResultApplyConfiguration) WithRequest(value string) *DeviceRequestAllocationResultApplyConfiguration {
b.Request = &value
return b
}
// 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 *DeviceRequestAllocationResultApplyConfiguration) WithDriver(value string) *DeviceRequestAllocationResultApplyConfiguration {
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 *DeviceRequestAllocationResultApplyConfiguration) WithPool(value string) *DeviceRequestAllocationResultApplyConfiguration {
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 *DeviceRequestAllocationResultApplyConfiguration) WithDevice(value string) *DeviceRequestAllocationResultApplyConfiguration {
b.Device = &value
return b
}

View File

@ -0,0 +1,39 @@
/*
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
// DeviceSelectorApplyConfiguration represents a declarative configuration of the DeviceSelector type for use
// with apply.
type DeviceSelectorApplyConfiguration struct {
CEL *CELDeviceSelectorApplyConfiguration `json:"cel,omitempty"`
}
// DeviceSelectorApplyConfiguration constructs a declarative configuration of the DeviceSelector type for use with
// apply.
func DeviceSelector() *DeviceSelectorApplyConfiguration {
return &DeviceSelectorApplyConfiguration{}
}
// WithCEL sets the CEL 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 CEL field is set to the value of the last call.
func (b *DeviceSelectorApplyConfiguration) WithCEL(value *CELDeviceSelectorApplyConfiguration) *DeviceSelectorApplyConfiguration {
b.CEL = value
return b
}

View File

@ -1,52 +0,0 @@
/*
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"
)
// DriverAllocationResultApplyConfiguration represents a declarative configuration of the DriverAllocationResult type for use
// with apply.
type DriverAllocationResultApplyConfiguration struct {
VendorRequestParameters *runtime.RawExtension `json:"vendorRequestParameters,omitempty"`
AllocationResultModelApplyConfiguration `json:",inline"`
}
// DriverAllocationResultApplyConfiguration constructs a declarative configuration of the DriverAllocationResult type for use with
// apply.
func DriverAllocationResult() *DriverAllocationResultApplyConfiguration {
return &DriverAllocationResultApplyConfiguration{}
}
// WithVendorRequestParameters sets the VendorRequestParameters 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 VendorRequestParameters field is set to the value of the last call.
func (b *DriverAllocationResultApplyConfiguration) WithVendorRequestParameters(value runtime.RawExtension) *DriverAllocationResultApplyConfiguration {
b.VendorRequestParameters = &value
return b
}
// WithNamedResources sets the NamedResources 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 NamedResources field is set to the value of the last call.
func (b *DriverAllocationResultApplyConfiguration) WithNamedResources(value *NamedResourcesAllocationResultApplyConfiguration) *DriverAllocationResultApplyConfiguration {
b.NamedResources = value
return b
}

View File

@ -1,66 +0,0 @@
/*
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"
)
// DriverRequestsApplyConfiguration represents a declarative configuration of the DriverRequests type for use
// with apply.
type DriverRequestsApplyConfiguration struct {
DriverName *string `json:"driverName,omitempty"`
VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"`
Requests []ResourceRequestApplyConfiguration `json:"requests,omitempty"`
}
// DriverRequestsApplyConfiguration constructs a declarative configuration of the DriverRequests type for use with
// apply.
func DriverRequests() *DriverRequestsApplyConfiguration {
return &DriverRequestsApplyConfiguration{}
}
// WithDriverName sets the DriverName 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 DriverName field is set to the value of the last call.
func (b *DriverRequestsApplyConfiguration) WithDriverName(value string) *DriverRequestsApplyConfiguration {
b.DriverName = &value
return b
}
// WithVendorParameters sets the VendorParameters 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 VendorParameters field is set to the value of the last call.
func (b *DriverRequestsApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *DriverRequestsApplyConfiguration {
b.VendorParameters = &value
return b
}
// WithRequests adds the given value to the Requests 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 Requests field.
func (b *DriverRequestsApplyConfiguration) WithRequests(values ...*ResourceRequestApplyConfiguration) *DriverRequestsApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithRequests")
}
b.Requests = append(b.Requests, *values[i])
}
return b
}

View File

@ -1,100 +0,0 @@
/*
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 (
resource "k8s.io/apimachinery/pkg/api/resource"
)
// NamedResourcesAttributeApplyConfiguration represents a declarative configuration of the NamedResourcesAttribute type for use
// with apply.
type NamedResourcesAttributeApplyConfiguration struct {
Name *string `json:"name,omitempty"`
NamedResourcesAttributeValueApplyConfiguration `json:",inline"`
}
// NamedResourcesAttributeApplyConfiguration constructs a declarative configuration of the NamedResourcesAttribute type for use with
// apply.
func NamedResourcesAttribute() *NamedResourcesAttributeApplyConfiguration {
return &NamedResourcesAttributeApplyConfiguration{}
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *NamedResourcesAttributeApplyConfiguration) WithName(value string) *NamedResourcesAttributeApplyConfiguration {
b.Name = &value
return b
}
// WithQuantityValue sets the QuantityValue 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 QuantityValue field is set to the value of the last call.
func (b *NamedResourcesAttributeApplyConfiguration) WithQuantityValue(value resource.Quantity) *NamedResourcesAttributeApplyConfiguration {
b.QuantityValue = &value
return b
}
// WithBoolValue sets the BoolValue 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 BoolValue field is set to the value of the last call.
func (b *NamedResourcesAttributeApplyConfiguration) WithBoolValue(value bool) *NamedResourcesAttributeApplyConfiguration {
b.BoolValue = &value
return b
}
// WithIntValue sets the IntValue 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 IntValue field is set to the value of the last call.
func (b *NamedResourcesAttributeApplyConfiguration) WithIntValue(value int64) *NamedResourcesAttributeApplyConfiguration {
b.IntValue = &value
return b
}
// WithIntSliceValue sets the IntSliceValue 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 IntSliceValue field is set to the value of the last call.
func (b *NamedResourcesAttributeApplyConfiguration) WithIntSliceValue(value *NamedResourcesIntSliceApplyConfiguration) *NamedResourcesAttributeApplyConfiguration {
b.IntSliceValue = value
return b
}
// WithStringValue sets the StringValue 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 StringValue field is set to the value of the last call.
func (b *NamedResourcesAttributeApplyConfiguration) WithStringValue(value string) *NamedResourcesAttributeApplyConfiguration {
b.StringValue = &value
return b
}
// WithStringSliceValue sets the StringSliceValue 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 StringSliceValue field is set to the value of the last call.
func (b *NamedResourcesAttributeApplyConfiguration) WithStringSliceValue(value *NamedResourcesStringSliceApplyConfiguration) *NamedResourcesAttributeApplyConfiguration {
b.StringSliceValue = value
return b
}
// WithVersionValue sets the VersionValue 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 VersionValue field is set to the value of the last call.
func (b *NamedResourcesAttributeApplyConfiguration) WithVersionValue(value string) *NamedResourcesAttributeApplyConfiguration {
b.VersionValue = &value
return b
}

View File

@ -1,97 +0,0 @@
/*
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 (
resource "k8s.io/apimachinery/pkg/api/resource"
)
// NamedResourcesAttributeValueApplyConfiguration represents a declarative configuration of the NamedResourcesAttributeValue type for use
// with apply.
type NamedResourcesAttributeValueApplyConfiguration struct {
QuantityValue *resource.Quantity `json:"quantity,omitempty"`
BoolValue *bool `json:"bool,omitempty"`
IntValue *int64 `json:"int,omitempty"`
IntSliceValue *NamedResourcesIntSliceApplyConfiguration `json:"intSlice,omitempty"`
StringValue *string `json:"string,omitempty"`
StringSliceValue *NamedResourcesStringSliceApplyConfiguration `json:"stringSlice,omitempty"`
VersionValue *string `json:"version,omitempty"`
}
// NamedResourcesAttributeValueApplyConfiguration constructs a declarative configuration of the NamedResourcesAttributeValue type for use with
// apply.
func NamedResourcesAttributeValue() *NamedResourcesAttributeValueApplyConfiguration {
return &NamedResourcesAttributeValueApplyConfiguration{}
}
// WithQuantityValue sets the QuantityValue 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 QuantityValue field is set to the value of the last call.
func (b *NamedResourcesAttributeValueApplyConfiguration) WithQuantityValue(value resource.Quantity) *NamedResourcesAttributeValueApplyConfiguration {
b.QuantityValue = &value
return b
}
// WithBoolValue sets the BoolValue 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 BoolValue field is set to the value of the last call.
func (b *NamedResourcesAttributeValueApplyConfiguration) WithBoolValue(value bool) *NamedResourcesAttributeValueApplyConfiguration {
b.BoolValue = &value
return b
}
// WithIntValue sets the IntValue 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 IntValue field is set to the value of the last call.
func (b *NamedResourcesAttributeValueApplyConfiguration) WithIntValue(value int64) *NamedResourcesAttributeValueApplyConfiguration {
b.IntValue = &value
return b
}
// WithIntSliceValue sets the IntSliceValue 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 IntSliceValue field is set to the value of the last call.
func (b *NamedResourcesAttributeValueApplyConfiguration) WithIntSliceValue(value *NamedResourcesIntSliceApplyConfiguration) *NamedResourcesAttributeValueApplyConfiguration {
b.IntSliceValue = value
return b
}
// WithStringValue sets the StringValue 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 StringValue field is set to the value of the last call.
func (b *NamedResourcesAttributeValueApplyConfiguration) WithStringValue(value string) *NamedResourcesAttributeValueApplyConfiguration {
b.StringValue = &value
return b
}
// WithStringSliceValue sets the StringSliceValue 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 StringSliceValue field is set to the value of the last call.
func (b *NamedResourcesAttributeValueApplyConfiguration) WithStringSliceValue(value *NamedResourcesStringSliceApplyConfiguration) *NamedResourcesAttributeValueApplyConfiguration {
b.StringSliceValue = value
return b
}
// WithVersionValue sets the VersionValue 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 VersionValue field is set to the value of the last call.
func (b *NamedResourcesAttributeValueApplyConfiguration) WithVersionValue(value string) *NamedResourcesAttributeValueApplyConfiguration {
b.VersionValue = &value
return b
}

View File

@ -1,53 +0,0 @@
/*
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
// NamedResourcesInstanceApplyConfiguration represents a declarative configuration of the NamedResourcesInstance type for use
// with apply.
type NamedResourcesInstanceApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Attributes []NamedResourcesAttributeApplyConfiguration `json:"attributes,omitempty"`
}
// NamedResourcesInstanceApplyConfiguration constructs a declarative configuration of the NamedResourcesInstance type for use with
// apply.
func NamedResourcesInstance() *NamedResourcesInstanceApplyConfiguration {
return &NamedResourcesInstanceApplyConfiguration{}
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *NamedResourcesInstanceApplyConfiguration) WithName(value string) *NamedResourcesInstanceApplyConfiguration {
b.Name = &value
return b
}
// WithAttributes adds the given value to the Attributes 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 Attributes field.
func (b *NamedResourcesInstanceApplyConfiguration) WithAttributes(values ...*NamedResourcesAttributeApplyConfiguration) *NamedResourcesInstanceApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithAttributes")
}
b.Attributes = append(b.Attributes, *values[i])
}
return b
}

View File

@ -1,41 +0,0 @@
/*
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
// NamedResourcesIntSliceApplyConfiguration represents a declarative configuration of the NamedResourcesIntSlice type for use
// with apply.
type NamedResourcesIntSliceApplyConfiguration struct {
Ints []int64 `json:"ints,omitempty"`
}
// NamedResourcesIntSliceApplyConfiguration constructs a declarative configuration of the NamedResourcesIntSlice type for use with
// apply.
func NamedResourcesIntSlice() *NamedResourcesIntSliceApplyConfiguration {
return &NamedResourcesIntSliceApplyConfiguration{}
}
// WithInts adds the given value to the Ints 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 Ints field.
func (b *NamedResourcesIntSliceApplyConfiguration) WithInts(values ...int64) *NamedResourcesIntSliceApplyConfiguration {
for i := range values {
b.Ints = append(b.Ints, values[i])
}
return b
}

View File

@ -1,39 +0,0 @@
/*
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
// NamedResourcesRequestApplyConfiguration represents a declarative configuration of the NamedResourcesRequest type for use
// with apply.
type NamedResourcesRequestApplyConfiguration struct {
Selector *string `json:"selector,omitempty"`
}
// NamedResourcesRequestApplyConfiguration constructs a declarative configuration of the NamedResourcesRequest type for use with
// apply.
func NamedResourcesRequest() *NamedResourcesRequestApplyConfiguration {
return &NamedResourcesRequestApplyConfiguration{}
}
// WithSelector sets the Selector 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 Selector field is set to the value of the last call.
func (b *NamedResourcesRequestApplyConfiguration) WithSelector(value string) *NamedResourcesRequestApplyConfiguration {
b.Selector = &value
return b
}

View File

@ -1,44 +0,0 @@
/*
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
// NamedResourcesResourcesApplyConfiguration represents a declarative configuration of the NamedResourcesResources type for use
// with apply.
type NamedResourcesResourcesApplyConfiguration struct {
Instances []NamedResourcesInstanceApplyConfiguration `json:"instances,omitempty"`
}
// NamedResourcesResourcesApplyConfiguration constructs a declarative configuration of the NamedResourcesResources type for use with
// apply.
func NamedResourcesResources() *NamedResourcesResourcesApplyConfiguration {
return &NamedResourcesResourcesApplyConfiguration{}
}
// WithInstances adds the given value to the Instances 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 Instances field.
func (b *NamedResourcesResourcesApplyConfiguration) WithInstances(values ...*NamedResourcesInstanceApplyConfiguration) *NamedResourcesResourcesApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithInstances")
}
b.Instances = append(b.Instances, *values[i])
}
return b
}

View File

@ -1,41 +0,0 @@
/*
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
// NamedResourcesStringSliceApplyConfiguration represents a declarative configuration of the NamedResourcesStringSlice type for use
// with apply.
type NamedResourcesStringSliceApplyConfiguration struct {
Strings []string `json:"strings,omitempty"`
}
// NamedResourcesStringSliceApplyConfiguration constructs a declarative configuration of the NamedResourcesStringSlice type for use with
// apply.
func NamedResourcesStringSlice() *NamedResourcesStringSliceApplyConfiguration {
return &NamedResourcesStringSliceApplyConfiguration{}
}
// WithStrings adds the given value to the Strings 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 Strings field.
func (b *NamedResourcesStringSliceApplyConfiguration) WithStrings(values ...string) *NamedResourcesStringSliceApplyConfiguration {
for i := range values {
b.Strings = append(b.Strings, values[i])
}
return b
}

View File

@ -22,31 +22,31 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// VendorParametersApplyConfiguration represents a declarative configuration of the VendorParameters type for use
// OpaqueDeviceConfigurationApplyConfiguration represents a declarative configuration of the OpaqueDeviceConfiguration type for use
// with apply.
type VendorParametersApplyConfiguration struct {
DriverName *string `json:"driverName,omitempty"`
type OpaqueDeviceConfigurationApplyConfiguration struct {
Driver *string `json:"driver,omitempty"`
Parameters *runtime.RawExtension `json:"parameters,omitempty"`
}
// VendorParametersApplyConfiguration constructs a declarative configuration of the VendorParameters type for use with
// OpaqueDeviceConfigurationApplyConfiguration constructs a declarative configuration of the OpaqueDeviceConfiguration type for use with
// apply.
func VendorParameters() *VendorParametersApplyConfiguration {
return &VendorParametersApplyConfiguration{}
func OpaqueDeviceConfiguration() *OpaqueDeviceConfigurationApplyConfiguration {
return &OpaqueDeviceConfigurationApplyConfiguration{}
}
// WithDriverName sets the DriverName field in the declarative configuration to the given value
// 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 DriverName field is set to the value of the last call.
func (b *VendorParametersApplyConfiguration) WithDriverName(value string) *VendorParametersApplyConfiguration {
b.DriverName = &value
// If called multiple times, the Driver field is set to the value of the last call.
func (b *OpaqueDeviceConfigurationApplyConfiguration) WithDriver(value string) *OpaqueDeviceConfigurationApplyConfiguration {
b.Driver = &value
return b
}
// WithParameters sets the Parameters 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 Parameters field is set to the value of the last call.
func (b *VendorParametersApplyConfiguration) WithParameters(value runtime.RawExtension) *VendorParametersApplyConfiguration {
func (b *OpaqueDeviceConfigurationApplyConfiguration) WithParameters(value runtime.RawExtension) *OpaqueDeviceConfigurationApplyConfiguration {
b.Parameters = &value
return b
}

View File

@ -1,57 +0,0 @@
/*
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
// ResourceClaimParametersReferenceApplyConfiguration represents a declarative configuration of the ResourceClaimParametersReference type for use
// with apply.
type ResourceClaimParametersReferenceApplyConfiguration struct {
APIGroup *string `json:"apiGroup,omitempty"`
Kind *string `json:"kind,omitempty"`
Name *string `json:"name,omitempty"`
}
// ResourceClaimParametersReferenceApplyConfiguration constructs a declarative configuration of the ResourceClaimParametersReference type for use with
// apply.
func ResourceClaimParametersReference() *ResourceClaimParametersReferenceApplyConfiguration {
return &ResourceClaimParametersReferenceApplyConfiguration{}
}
// WithAPIGroup sets the APIGroup 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 APIGroup field is set to the value of the last call.
func (b *ResourceClaimParametersReferenceApplyConfiguration) WithAPIGroup(value string) *ResourceClaimParametersReferenceApplyConfiguration {
b.APIGroup = &value
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *ResourceClaimParametersReferenceApplyConfiguration) WithKind(value string) *ResourceClaimParametersReferenceApplyConfiguration {
b.Kind = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *ResourceClaimParametersReferenceApplyConfiguration) WithName(value string) *ResourceClaimParametersReferenceApplyConfiguration {
b.Name = &value
return b
}

View File

@ -21,8 +21,8 @@ package v1alpha3
// ResourceClaimSpecApplyConfiguration represents a declarative configuration of the ResourceClaimSpec type for use
// with apply.
type ResourceClaimSpecApplyConfiguration struct {
ResourceClassName *string `json:"resourceClassName,omitempty"`
ParametersRef *ResourceClaimParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"`
Devices *DeviceClaimApplyConfiguration `json:"devices,omitempty"`
Controller *string `json:"controller,omitempty"`
}
// ResourceClaimSpecApplyConfiguration constructs a declarative configuration of the ResourceClaimSpec type for use with
@ -31,18 +31,18 @@ func ResourceClaimSpec() *ResourceClaimSpecApplyConfiguration {
return &ResourceClaimSpecApplyConfiguration{}
}
// WithResourceClassName sets the ResourceClassName field in the declarative configuration to the given value
// WithDevices sets the Devices 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 ResourceClassName field is set to the value of the last call.
func (b *ResourceClaimSpecApplyConfiguration) WithResourceClassName(value string) *ResourceClaimSpecApplyConfiguration {
b.ResourceClassName = &value
// If called multiple times, the Devices field is set to the value of the last call.
func (b *ResourceClaimSpecApplyConfiguration) WithDevices(value *DeviceClaimApplyConfiguration) *ResourceClaimSpecApplyConfiguration {
b.Devices = value
return b
}
// WithParametersRef sets the ParametersRef field in the declarative configuration to the given value
// WithController sets the Controller 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 ParametersRef field is set to the value of the last call.
func (b *ResourceClaimSpecApplyConfiguration) WithParametersRef(value *ResourceClaimParametersReferenceApplyConfiguration) *ResourceClaimSpecApplyConfiguration {
b.ParametersRef = value
// If called multiple times, the Controller field is set to the value of the last call.
func (b *ResourceClaimSpecApplyConfiguration) WithController(value string) *ResourceClaimSpecApplyConfiguration {
b.Controller = &value
return b
}

View File

@ -21,7 +21,6 @@ package v1alpha3
// ResourceClaimStatusApplyConfiguration represents a declarative configuration of the ResourceClaimStatus type for use
// with apply.
type ResourceClaimStatusApplyConfiguration struct {
DriverName *string `json:"driverName,omitempty"`
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
DeallocationRequested *bool `json:"deallocationRequested,omitempty"`
@ -33,14 +32,6 @@ func ResourceClaimStatus() *ResourceClaimStatusApplyConfiguration {
return &ResourceClaimStatusApplyConfiguration{}
}
// WithDriverName sets the DriverName 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 DriverName field is set to the value of the last call.
func (b *ResourceClaimStatusApplyConfiguration) WithDriverName(value string) *ResourceClaimStatusApplyConfiguration {
b.DriverName = &value
return b
}
// WithAllocation sets the Allocation 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 Allocation field is set to the value of the last call.

View File

@ -1,281 +0,0 @@
/*
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 (
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
internal "k8s.io/client-go/applyconfigurations/internal"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ResourceClassApplyConfiguration represents a declarative configuration of the ResourceClass type for use
// with apply.
type ResourceClassApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
DriverName *string `json:"driverName,omitempty"`
ParametersRef *ResourceClassParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"`
SuitableNodes *corev1.NodeSelectorApplyConfiguration `json:"suitableNodes,omitempty"`
StructuredParameters *bool `json:"structuredParameters,omitempty"`
}
// ResourceClass constructs a declarative configuration of the ResourceClass type for use with
// apply.
func ResourceClass(name string) *ResourceClassApplyConfiguration {
b := &ResourceClassApplyConfiguration{}
b.WithName(name)
b.WithKind("ResourceClass")
b.WithAPIVersion("resource.k8s.io/v1alpha3")
return b
}
// ExtractResourceClass extracts the applied configuration owned by fieldManager from
// resourceClass. If no managedFields are found in resourceClass for fieldManager, a
// ResourceClassApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// resourceClass must be a unmodified ResourceClass API object that was retrieved from the Kubernetes API.
// ExtractResourceClass provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractResourceClass(resourceClass *resourcev1alpha3.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) {
return extractResourceClass(resourceClass, fieldManager, "")
}
// ExtractResourceClassStatus is the same as ExtractResourceClass except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractResourceClassStatus(resourceClass *resourcev1alpha3.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) {
return extractResourceClass(resourceClass, fieldManager, "status")
}
func extractResourceClass(resourceClass *resourcev1alpha3.ResourceClass, fieldManager string, subresource string) (*ResourceClassApplyConfiguration, error) {
b := &ResourceClassApplyConfiguration{}
err := managedfields.ExtractInto(resourceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClass"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(resourceClass.Name)
b.WithKind("ResourceClass")
b.WithAPIVersion("resource.k8s.io/v1alpha3")
return b, nil
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithKind(value string) *ResourceClassApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithAPIVersion(value string) *ResourceClassApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithName(value string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithGenerateName(value string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithNamespace(value string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithUID(value types.UID) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithResourceVersion(value string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithGeneration(value int64) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ResourceClassApplyConfiguration) WithLabels(entries map[string]string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ResourceClassApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *ResourceClassApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *ResourceClassApplyConfiguration) WithFinalizers(values ...string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ResourceClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithDriverName sets the DriverName 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 DriverName field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithDriverName(value string) *ResourceClassApplyConfiguration {
b.DriverName = &value
return b
}
// WithParametersRef sets the ParametersRef 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 ParametersRef field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithParametersRef(value *ResourceClassParametersReferenceApplyConfiguration) *ResourceClassApplyConfiguration {
b.ParametersRef = value
return b
}
// WithSuitableNodes sets the SuitableNodes 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 SuitableNodes field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithSuitableNodes(value *corev1.NodeSelectorApplyConfiguration) *ResourceClassApplyConfiguration {
b.SuitableNodes = value
return b
}
// WithStructuredParameters sets the StructuredParameters 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 StructuredParameters field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithStructuredParameters(value bool) *ResourceClassApplyConfiguration {
b.StructuredParameters = &value
return b
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ResourceClassApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.Name
}

View File

@ -1,283 +0,0 @@
/*
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 (
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
internal "k8s.io/client-go/applyconfigurations/internal"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ResourceClassParametersApplyConfiguration represents a declarative configuration of the ResourceClassParameters type for use
// with apply.
type ResourceClassParametersApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
GeneratedFrom *ResourceClassParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"`
VendorParameters []VendorParametersApplyConfiguration `json:"vendorParameters,omitempty"`
Filters []ResourceFilterApplyConfiguration `json:"filters,omitempty"`
}
// ResourceClassParameters constructs a declarative configuration of the ResourceClassParameters type for use with
// apply.
func ResourceClassParameters(name, namespace string) *ResourceClassParametersApplyConfiguration {
b := &ResourceClassParametersApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("ResourceClassParameters")
b.WithAPIVersion("resource.k8s.io/v1alpha3")
return b
}
// ExtractResourceClassParameters extracts the applied configuration owned by fieldManager from
// resourceClassParameters. If no managedFields are found in resourceClassParameters for fieldManager, a
// ResourceClassParametersApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// resourceClassParameters must be a unmodified ResourceClassParameters API object that was retrieved from the Kubernetes API.
// ExtractResourceClassParameters provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractResourceClassParameters(resourceClassParameters *resourcev1alpha3.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) {
return extractResourceClassParameters(resourceClassParameters, fieldManager, "")
}
// ExtractResourceClassParametersStatus is the same as ExtractResourceClassParameters except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractResourceClassParametersStatus(resourceClassParameters *resourcev1alpha3.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) {
return extractResourceClassParameters(resourceClassParameters, fieldManager, "status")
}
func extractResourceClassParameters(resourceClassParameters *resourcev1alpha3.ResourceClassParameters, fieldManager string, subresource string) (*ResourceClassParametersApplyConfiguration, error) {
b := &ResourceClassParametersApplyConfiguration{}
err := managedfields.ExtractInto(resourceClassParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClassParameters"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(resourceClassParameters.Name)
b.WithNamespace(resourceClassParameters.Namespace)
b.WithKind("ResourceClassParameters")
b.WithAPIVersion("resource.k8s.io/v1alpha3")
return b, nil
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithKind(value string) *ResourceClassParametersApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClassParametersApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithName(value string) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithGenerateName(value string) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithNamespace(value string) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithUID(value types.UID) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithGeneration(value int64) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ResourceClassParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ResourceClassParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
func (b *ResourceClassParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
func (b *ResourceClassParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClassParametersApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ResourceClassParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithGeneratedFrom sets the GeneratedFrom 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 GeneratedFrom field is set to the value of the last call.
func (b *ResourceClassParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClassParametersReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration {
b.GeneratedFrom = value
return b
}
// WithVendorParameters adds the given value to the VendorParameters 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 VendorParameters field.
func (b *ResourceClassParametersApplyConfiguration) WithVendorParameters(values ...*VendorParametersApplyConfiguration) *ResourceClassParametersApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithVendorParameters")
}
b.VendorParameters = append(b.VendorParameters, *values[i])
}
return b
}
// WithFilters adds the given value to the Filters 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 Filters field.
func (b *ResourceClassParametersApplyConfiguration) WithFilters(values ...*ResourceFilterApplyConfiguration) *ResourceClassParametersApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithFilters")
}
b.Filters = append(b.Filters, *values[i])
}
return b
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ResourceClassParametersApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.Name
}

View File

@ -1,66 +0,0 @@
/*
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
// ResourceClassParametersReferenceApplyConfiguration represents a declarative configuration of the ResourceClassParametersReference type for use
// with apply.
type ResourceClassParametersReferenceApplyConfiguration struct {
APIGroup *string `json:"apiGroup,omitempty"`
Kind *string `json:"kind,omitempty"`
Name *string `json:"name,omitempty"`
Namespace *string `json:"namespace,omitempty"`
}
// ResourceClassParametersReferenceApplyConfiguration constructs a declarative configuration of the ResourceClassParametersReference type for use with
// apply.
func ResourceClassParametersReference() *ResourceClassParametersReferenceApplyConfiguration {
return &ResourceClassParametersReferenceApplyConfiguration{}
}
// WithAPIGroup sets the APIGroup 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 APIGroup field is set to the value of the last call.
func (b *ResourceClassParametersReferenceApplyConfiguration) WithAPIGroup(value string) *ResourceClassParametersReferenceApplyConfiguration {
b.APIGroup = &value
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *ResourceClassParametersReferenceApplyConfiguration) WithKind(value string) *ResourceClassParametersReferenceApplyConfiguration {
b.Kind = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *ResourceClassParametersReferenceApplyConfiguration) WithName(value string) *ResourceClassParametersReferenceApplyConfiguration {
b.Name = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *ResourceClassParametersReferenceApplyConfiguration) WithNamespace(value string) *ResourceClassParametersReferenceApplyConfiguration {
b.Namespace = &value
return b
}

View File

@ -1,48 +0,0 @@
/*
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
// ResourceFilterApplyConfiguration represents a declarative configuration of the ResourceFilter type for use
// with apply.
type ResourceFilterApplyConfiguration struct {
DriverName *string `json:"driverName,omitempty"`
ResourceFilterModelApplyConfiguration `json:",inline"`
}
// ResourceFilterApplyConfiguration constructs a declarative configuration of the ResourceFilter type for use with
// apply.
func ResourceFilter() *ResourceFilterApplyConfiguration {
return &ResourceFilterApplyConfiguration{}
}
// WithDriverName sets the DriverName 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 DriverName field is set to the value of the last call.
func (b *ResourceFilterApplyConfiguration) WithDriverName(value string) *ResourceFilterApplyConfiguration {
b.DriverName = &value
return b
}
// WithNamedResources sets the NamedResources 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 NamedResources field is set to the value of the last call.
func (b *ResourceFilterApplyConfiguration) WithNamedResources(value *NamedResourcesFilterApplyConfiguration) *ResourceFilterApplyConfiguration {
b.NamedResources = value
return b
}

View File

@ -1,39 +0,0 @@
/*
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
// ResourceFilterModelApplyConfiguration represents a declarative configuration of the ResourceFilterModel type for use
// with apply.
type ResourceFilterModelApplyConfiguration struct {
NamedResources *NamedResourcesFilterApplyConfiguration `json:"namedResources,omitempty"`
}
// ResourceFilterModelApplyConfiguration constructs a declarative configuration of the ResourceFilterModel type for use with
// apply.
func ResourceFilterModel() *ResourceFilterModelApplyConfiguration {
return &ResourceFilterModelApplyConfiguration{}
}
// WithNamedResources sets the NamedResources 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 NamedResources field is set to the value of the last call.
func (b *ResourceFilterModelApplyConfiguration) WithNamedResources(value *NamedResourcesFilterApplyConfiguration) *ResourceFilterModelApplyConfiguration {
b.NamedResources = value
return b
}

View File

@ -1,57 +0,0 @@
/*
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
// ResourceHandleApplyConfiguration represents a declarative configuration of the ResourceHandle type for use
// with apply.
type ResourceHandleApplyConfiguration struct {
DriverName *string `json:"driverName,omitempty"`
Data *string `json:"data,omitempty"`
StructuredData *StructuredResourceHandleApplyConfiguration `json:"structuredData,omitempty"`
}
// ResourceHandleApplyConfiguration constructs a declarative configuration of the ResourceHandle type for use with
// apply.
func ResourceHandle() *ResourceHandleApplyConfiguration {
return &ResourceHandleApplyConfiguration{}
}
// WithDriverName sets the DriverName 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 DriverName field is set to the value of the last call.
func (b *ResourceHandleApplyConfiguration) WithDriverName(value string) *ResourceHandleApplyConfiguration {
b.DriverName = &value
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 *ResourceHandleApplyConfiguration) WithData(value string) *ResourceHandleApplyConfiguration {
b.Data = &value
return b
}
// WithStructuredData sets the StructuredData 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 StructuredData field is set to the value of the last call.
func (b *ResourceHandleApplyConfiguration) WithStructuredData(value *StructuredResourceHandleApplyConfiguration) *ResourceHandleApplyConfiguration {
b.StructuredData = value
return b
}

View File

@ -1,39 +0,0 @@
/*
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
// ResourceModelApplyConfiguration represents a declarative configuration of the ResourceModel type for use
// with apply.
type ResourceModelApplyConfiguration struct {
NamedResources *NamedResourcesResourcesApplyConfiguration `json:"namedResources,omitempty"`
}
// ResourceModelApplyConfiguration constructs a declarative configuration of the ResourceModel type for use with
// apply.
func ResourceModel() *ResourceModelApplyConfiguration {
return &ResourceModelApplyConfiguration{}
}
// WithNamedResources sets the NamedResources 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 NamedResources field is set to the value of the last call.
func (b *ResourceModelApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceModelApplyConfiguration {
b.NamedResources = value
return b
}

View File

@ -0,0 +1,57 @@
/*
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
// ResourcePoolApplyConfiguration represents a declarative configuration of the ResourcePool type for use
// with apply.
type ResourcePoolApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Generation *int64 `json:"generation,omitempty"`
ResourceSliceCount *int64 `json:"resourceSliceCount,omitempty"`
}
// ResourcePoolApplyConfiguration constructs a declarative configuration of the ResourcePool type for use with
// apply.
func ResourcePool() *ResourcePoolApplyConfiguration {
return &ResourcePoolApplyConfiguration{}
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *ResourcePoolApplyConfiguration) WithName(value string) *ResourcePoolApplyConfiguration {
b.Name = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *ResourcePoolApplyConfiguration) WithGeneration(value int64) *ResourcePoolApplyConfiguration {
b.Generation = &value
return b
}
// WithResourceSliceCount sets the ResourceSliceCount 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 ResourceSliceCount field is set to the value of the last call.
func (b *ResourcePoolApplyConfiguration) WithResourceSliceCount(value int64) *ResourcePoolApplyConfiguration {
b.ResourceSliceCount = &value
return b
}

View File

@ -1,52 +0,0 @@
/*
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"
)
// ResourceRequestApplyConfiguration represents a declarative configuration of the ResourceRequest type for use
// with apply.
type ResourceRequestApplyConfiguration struct {
VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"`
ResourceRequestModelApplyConfiguration `json:",inline"`
}
// ResourceRequestApplyConfiguration constructs a declarative configuration of the ResourceRequest type for use with
// apply.
func ResourceRequest() *ResourceRequestApplyConfiguration {
return &ResourceRequestApplyConfiguration{}
}
// WithVendorParameters sets the VendorParameters 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 VendorParameters field is set to the value of the last call.
func (b *ResourceRequestApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *ResourceRequestApplyConfiguration {
b.VendorParameters = &value
return b
}
// WithNamedResources sets the NamedResources 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 NamedResources field is set to the value of the last call.
func (b *ResourceRequestApplyConfiguration) WithNamedResources(value *NamedResourcesRequestApplyConfiguration) *ResourceRequestApplyConfiguration {
b.NamedResources = value
return b
}

View File

@ -1,39 +0,0 @@
/*
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
// ResourceRequestModelApplyConfiguration represents a declarative configuration of the ResourceRequestModel type for use
// with apply.
type ResourceRequestModelApplyConfiguration struct {
NamedResources *NamedResourcesRequestApplyConfiguration `json:"namedResources,omitempty"`
}
// ResourceRequestModelApplyConfiguration constructs a declarative configuration of the ResourceRequestModel type for use with
// apply.
func ResourceRequestModel() *ResourceRequestModelApplyConfiguration {
return &ResourceRequestModelApplyConfiguration{}
}
// WithNamedResources sets the NamedResources 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 NamedResources field is set to the value of the last call.
func (b *ResourceRequestModelApplyConfiguration) WithNamedResources(value *NamedResourcesRequestApplyConfiguration) *ResourceRequestModelApplyConfiguration {
b.NamedResources = value
return b
}

View File

@ -32,9 +32,7 @@ import (
type ResourceSliceApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
NodeName *string `json:"nodeName,omitempty"`
DriverName *string `json:"driverName,omitempty"`
ResourceModelApplyConfiguration `json:",inline"`
Spec *ResourceSliceSpecApplyConfiguration `json:"spec,omitempty"`
}
// ResourceSlice constructs a declarative configuration of the ResourceSlice type for use with
@ -240,27 +238,11 @@ func (b *ResourceSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExis
}
}
// WithNodeName sets the NodeName field in the declarative configuration to the given value
// WithSpec sets the Spec 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 NodeName field is set to the value of the last call.
func (b *ResourceSliceApplyConfiguration) WithNodeName(value string) *ResourceSliceApplyConfiguration {
b.NodeName = &value
return b
}
// WithDriverName sets the DriverName 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 DriverName field is set to the value of the last call.
func (b *ResourceSliceApplyConfiguration) WithDriverName(value string) *ResourceSliceApplyConfiguration {
b.DriverName = &value
return b
}
// WithNamedResources sets the NamedResources 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 NamedResources field is set to the value of the last call.
func (b *ResourceSliceApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceSliceApplyConfiguration {
b.NamedResources = value
// If called multiple times, the Spec field is set to the value of the last call.
func (b *ResourceSliceApplyConfiguration) WithSpec(value *ResourceSliceSpecApplyConfiguration) *ResourceSliceApplyConfiguration {
b.Spec = value
return b
}

View File

@ -0,0 +1,93 @@
/*
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 (
v1 "k8s.io/client-go/applyconfigurations/core/v1"
)
// ResourceSliceSpecApplyConfiguration represents a declarative configuration of the ResourceSliceSpec type for use
// with apply.
type ResourceSliceSpecApplyConfiguration struct {
Driver *string `json:"driver,omitempty"`
Pool *ResourcePoolApplyConfiguration `json:"pool,omitempty"`
NodeName *string `json:"nodeName,omitempty"`
NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"`
AllNodes *bool `json:"allNodes,omitempty"`
Devices []DeviceApplyConfiguration `json:"devices,omitempty"`
}
// ResourceSliceSpecApplyConfiguration constructs a declarative configuration of the ResourceSliceSpec type for use with
// apply.
func ResourceSliceSpec() *ResourceSliceSpecApplyConfiguration {
return &ResourceSliceSpecApplyConfiguration{}
}
// 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 *ResourceSliceSpecApplyConfiguration) WithDriver(value string) *ResourceSliceSpecApplyConfiguration {
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 *ResourceSliceSpecApplyConfiguration) WithPool(value *ResourcePoolApplyConfiguration) *ResourceSliceSpecApplyConfiguration {
b.Pool = value
return b
}
// WithNodeName sets the NodeName 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 NodeName field is set to the value of the last call.
func (b *ResourceSliceSpecApplyConfiguration) WithNodeName(value string) *ResourceSliceSpecApplyConfiguration {
b.NodeName = &value
return b
}
// WithNodeSelector sets the NodeSelector 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 NodeSelector field is set to the value of the last call.
func (b *ResourceSliceSpecApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *ResourceSliceSpecApplyConfiguration {
b.NodeSelector = value
return b
}
// WithAllNodes sets the AllNodes 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 AllNodes field is set to the value of the last call.
func (b *ResourceSliceSpecApplyConfiguration) WithAllNodes(value bool) *ResourceSliceSpecApplyConfiguration {
b.AllNodes = &value
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 *ResourceSliceSpecApplyConfiguration) WithDevices(values ...*DeviceApplyConfiguration) *ResourceSliceSpecApplyConfiguration {
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

@ -1,75 +0,0 @@
/*
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"
)
// StructuredResourceHandleApplyConfiguration represents a declarative configuration of the StructuredResourceHandle type for use
// with apply.
type StructuredResourceHandleApplyConfiguration struct {
VendorClassParameters *runtime.RawExtension `json:"vendorClassParameters,omitempty"`
VendorClaimParameters *runtime.RawExtension `json:"vendorClaimParameters,omitempty"`
NodeName *string `json:"nodeName,omitempty"`
Results []DriverAllocationResultApplyConfiguration `json:"results,omitempty"`
}
// StructuredResourceHandleApplyConfiguration constructs a declarative configuration of the StructuredResourceHandle type for use with
// apply.
func StructuredResourceHandle() *StructuredResourceHandleApplyConfiguration {
return &StructuredResourceHandleApplyConfiguration{}
}
// WithVendorClassParameters sets the VendorClassParameters 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 VendorClassParameters field is set to the value of the last call.
func (b *StructuredResourceHandleApplyConfiguration) WithVendorClassParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration {
b.VendorClassParameters = &value
return b
}
// WithVendorClaimParameters sets the VendorClaimParameters 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 VendorClaimParameters field is set to the value of the last call.
func (b *StructuredResourceHandleApplyConfiguration) WithVendorClaimParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration {
b.VendorClaimParameters = &value
return b
}
// WithNodeName sets the NodeName 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 NodeName field is set to the value of the last call.
func (b *StructuredResourceHandleApplyConfiguration) WithNodeName(value string) *StructuredResourceHandleApplyConfiguration {
b.NodeName = &value
return b
}
// WithResults adds the given value to the Results 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 Results field.
func (b *StructuredResourceHandleApplyConfiguration) WithResults(values ...*DriverAllocationResultApplyConfiguration) *StructuredResourceHandleApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResults")
}
b.Results = append(b.Results, *values[i])
}
return b
}

View File

@ -1556,30 +1556,40 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
// Group=resource.k8s.io, Version=v1alpha3
case v1alpha3.SchemeGroupVersion.WithKind("AllocationResult"):
return &resourcev1alpha3.AllocationResultApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("AllocationResultModel"):
return &resourcev1alpha3.AllocationResultModelApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DriverAllocationResult"):
return &resourcev1alpha3.DriverAllocationResultApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DriverRequests"):
return &resourcev1alpha3.DriverRequestsApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesAllocationResult"):
return &resourcev1alpha3.NamedResourcesAllocationResultApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesAttribute"):
return &resourcev1alpha3.NamedResourcesAttributeApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesAttributeValue"):
return &resourcev1alpha3.NamedResourcesAttributeValueApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesFilter"):
return &resourcev1alpha3.NamedResourcesFilterApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesInstance"):
return &resourcev1alpha3.NamedResourcesInstanceApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesIntSlice"):
return &resourcev1alpha3.NamedResourcesIntSliceApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesRequest"):
return &resourcev1alpha3.NamedResourcesRequestApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesResources"):
return &resourcev1alpha3.NamedResourcesResourcesApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesStringSlice"):
return &resourcev1alpha3.NamedResourcesStringSliceApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("BasicDevice"):
return &resourcev1alpha3.BasicDeviceApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("CELDeviceSelector"):
return &resourcev1alpha3.CELDeviceSelectorApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("Device"):
return &resourcev1alpha3.DeviceApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceAllocationConfiguration"):
return &resourcev1alpha3.DeviceAllocationConfigurationApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceAllocationResult"):
return &resourcev1alpha3.DeviceAllocationResultApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceAttribute"):
return &resourcev1alpha3.DeviceAttributeApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceClaim"):
return &resourcev1alpha3.DeviceClaimApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceClaimConfiguration"):
return &resourcev1alpha3.DeviceClaimConfigurationApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceClass"):
return &resourcev1alpha3.DeviceClassApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceClassConfiguration"):
return &resourcev1alpha3.DeviceClassConfigurationApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceClassSpec"):
return &resourcev1alpha3.DeviceClassSpecApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceConfiguration"):
return &resourcev1alpha3.DeviceConfigurationApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceConstraint"):
return &resourcev1alpha3.DeviceConstraintApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceRequest"):
return &resourcev1alpha3.DeviceRequestApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceRequestAllocationResult"):
return &resourcev1alpha3.DeviceRequestAllocationResultApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSelector"):
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
return &resourcev1alpha3.OpaqueDeviceConfigurationApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContext"):
return &resourcev1alpha3.PodSchedulingContextApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContextSpec"):
@ -1590,10 +1600,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &resourcev1alpha3.ResourceClaimApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"):
return &resourcev1alpha3.ResourceClaimConsumerReferenceApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimParameters"):
return &resourcev1alpha3.ResourceClaimParametersApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"):
return &resourcev1alpha3.ResourceClaimParametersReferenceApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"):
return &resourcev1alpha3.ResourceClaimSchedulingStatusApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimSpec"):
@ -1604,30 +1610,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &resourcev1alpha3.ResourceClaimTemplateApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"):
return &resourcev1alpha3.ResourceClaimTemplateSpecApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClass"):
return &resourcev1alpha3.ResourceClassApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClassParameters"):
return &resourcev1alpha3.ResourceClassParametersApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClassParametersReference"):
return &resourcev1alpha3.ResourceClassParametersReferenceApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceFilter"):
return &resourcev1alpha3.ResourceFilterApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceFilterModel"):
return &resourcev1alpha3.ResourceFilterModelApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceHandle"):
return &resourcev1alpha3.ResourceHandleApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceModel"):
return &resourcev1alpha3.ResourceModelApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceRequest"):
return &resourcev1alpha3.ResourceRequestApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceRequestModel"):
return &resourcev1alpha3.ResourceRequestModelApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourcePool"):
return &resourcev1alpha3.ResourcePoolApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceSlice"):
return &resourcev1alpha3.ResourceSliceApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("StructuredResourceHandle"):
return &resourcev1alpha3.StructuredResourceHandleApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("VendorParameters"):
return &resourcev1alpha3.VendorParametersApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourceSliceSpec"):
return &resourcev1alpha3.ResourceSliceSpecApplyConfiguration{}
// Group=scheduling.k8s.io, Version=v1
case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"):

View File

@ -367,18 +367,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
// Group=resource.k8s.io, Version=v1alpha3
case v1alpha3.SchemeGroupVersion.WithResource("deviceclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().DeviceClasses().Informer()}, nil
case v1alpha3.SchemeGroupVersion.WithResource("podschedulingcontexts"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().PodSchedulingContexts().Informer()}, nil
case v1alpha3.SchemeGroupVersion.WithResource("resourceclaims"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaims().Informer()}, nil
case v1alpha3.SchemeGroupVersion.WithResource("resourceclaimparameters"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaimParameters().Informer()}, nil
case v1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaimTemplates().Informer()}, nil
case v1alpha3.SchemeGroupVersion.WithResource("resourceclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClasses().Informer()}, nil
case v1alpha3.SchemeGroupVersion.WithResource("resourceclassparameters"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClassParameters().Informer()}, nil
case v1alpha3.SchemeGroupVersion.WithResource("resourceslices"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceSlices().Informer()}, nil

View File

@ -32,58 +32,58 @@ import (
cache "k8s.io/client-go/tools/cache"
)
// ResourceClassInformer provides access to a shared informer and lister for
// ResourceClasses.
type ResourceClassInformer interface {
// DeviceClassInformer provides access to a shared informer and lister for
// DeviceClasses.
type DeviceClassInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha3.ResourceClassLister
Lister() v1alpha3.DeviceClassLister
}
type resourceClassInformer struct {
type deviceClassInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewResourceClassInformer constructs a new informer for ResourceClass type.
// NewDeviceClassInformer constructs a new informer for DeviceClass type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewResourceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredResourceClassInformer(client, resyncPeriod, indexers, nil)
func NewDeviceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredDeviceClassInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredResourceClassInformer constructs a new informer for ResourceClass type.
// NewFilteredDeviceClassInformer constructs a new informer for DeviceClass type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredResourceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
func NewFilteredDeviceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha3().ResourceClasses().List(context.TODO(), options)
return client.ResourceV1alpha3().DeviceClasses().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha3().ResourceClasses().Watch(context.TODO(), options)
return client.ResourceV1alpha3().DeviceClasses().Watch(context.TODO(), options)
},
},
&resourcev1alpha3.ResourceClass{},
&resourcev1alpha3.DeviceClass{},
resyncPeriod,
indexers,
)
}
func (f *resourceClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredResourceClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
func (f *deviceClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredDeviceClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *resourceClassInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha3.ResourceClass{}, f.defaultInformer)
func (f *deviceClassInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha3.DeviceClass{}, f.defaultInformer)
}
func (f *resourceClassInformer) Lister() v1alpha3.ResourceClassLister {
return v1alpha3.NewResourceClassLister(f.Informer().GetIndexer())
func (f *deviceClassInformer) Lister() v1alpha3.DeviceClassLister {
return v1alpha3.NewDeviceClassLister(f.Informer().GetIndexer())
}

View File

@ -24,18 +24,14 @@ import (
// Interface provides access to all the informers in this group version.
type Interface interface {
// DeviceClasses returns a DeviceClassInformer.
DeviceClasses() DeviceClassInformer
// PodSchedulingContexts returns a PodSchedulingContextInformer.
PodSchedulingContexts() PodSchedulingContextInformer
// ResourceClaims returns a ResourceClaimInformer.
ResourceClaims() ResourceClaimInformer
// ResourceClaimParameters returns a ResourceClaimParametersInformer.
ResourceClaimParameters() ResourceClaimParametersInformer
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
ResourceClaimTemplates() ResourceClaimTemplateInformer
// ResourceClasses returns a ResourceClassInformer.
ResourceClasses() ResourceClassInformer
// ResourceClassParameters returns a ResourceClassParametersInformer.
ResourceClassParameters() ResourceClassParametersInformer
// ResourceSlices returns a ResourceSliceInformer.
ResourceSlices() ResourceSliceInformer
}
@ -51,6 +47,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// DeviceClasses returns a DeviceClassInformer.
func (v *version) DeviceClasses() DeviceClassInformer {
return &deviceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// PodSchedulingContexts returns a PodSchedulingContextInformer.
func (v *version) PodSchedulingContexts() PodSchedulingContextInformer {
return &podSchedulingContextInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
@ -61,26 +62,11 @@ func (v *version) ResourceClaims() ResourceClaimInformer {
return &resourceClaimInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// ResourceClaimParameters returns a ResourceClaimParametersInformer.
func (v *version) ResourceClaimParameters() ResourceClaimParametersInformer {
return &resourceClaimParametersInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
func (v *version) ResourceClaimTemplates() ResourceClaimTemplateInformer {
return &resourceClaimTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// ResourceClasses returns a ResourceClassInformer.
func (v *version) ResourceClasses() ResourceClassInformer {
return &resourceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// ResourceClassParameters returns a ResourceClassParametersInformer.
func (v *version) ResourceClassParameters() ResourceClassParametersInformer {
return &resourceClassParametersInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// ResourceSlices returns a ResourceSliceInformer.
func (v *version) ResourceSlices() ResourceSliceInformer {
return &resourceSliceInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}

View File

@ -1,90 +0,0 @@
/*
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 informer-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
time "time"
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3"
cache "k8s.io/client-go/tools/cache"
)
// ResourceClaimParametersInformer provides access to a shared informer and lister for
// ResourceClaimParameters.
type ResourceClaimParametersInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha3.ResourceClaimParametersLister
}
type resourceClaimParametersInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewResourceClaimParametersInformer constructs a new informer for ResourceClaimParameters type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewResourceClaimParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredResourceClaimParametersInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredResourceClaimParametersInformer constructs a new informer for ResourceClaimParameters type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredResourceClaimParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha3().ResourceClaimParameters(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha3().ResourceClaimParameters(namespace).Watch(context.TODO(), options)
},
},
&resourcev1alpha3.ResourceClaimParameters{},
resyncPeriod,
indexers,
)
}
func (f *resourceClaimParametersInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredResourceClaimParametersInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *resourceClaimParametersInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha3.ResourceClaimParameters{}, f.defaultInformer)
}
func (f *resourceClaimParametersInformer) Lister() v1alpha3.ResourceClaimParametersLister {
return v1alpha3.NewResourceClaimParametersLister(f.Informer().GetIndexer())
}

View File

@ -1,90 +0,0 @@
/*
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 informer-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
time "time"
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3"
cache "k8s.io/client-go/tools/cache"
)
// ResourceClassParametersInformer provides access to a shared informer and lister for
// ResourceClassParameters.
type ResourceClassParametersInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha3.ResourceClassParametersLister
}
type resourceClassParametersInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewResourceClassParametersInformer constructs a new informer for ResourceClassParameters type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewResourceClassParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredResourceClassParametersInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredResourceClassParametersInformer constructs a new informer for ResourceClassParameters type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredResourceClassParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha3().ResourceClassParameters(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha3().ResourceClassParameters(namespace).Watch(context.TODO(), options)
},
},
&resourcev1alpha3.ResourceClassParameters{},
resyncPeriod,
indexers,
)
}
func (f *resourceClassParametersInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredResourceClassParametersInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *resourceClassParametersInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha3.ResourceClassParameters{}, f.defaultInformer)
}
func (f *resourceClassParametersInformer) Lister() v1alpha3.ResourceClassParametersLister {
return v1alpha3.NewResourceClassParametersLister(f.Informer().GetIndexer())
}

View File

@ -0,0 +1,69 @@
/*
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 client-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
v1alpha3 "k8s.io/api/resource/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// DeviceClassesGetter has a method to return a DeviceClassInterface.
// A group's client should implement this interface.
type DeviceClassesGetter interface {
DeviceClasses() DeviceClassInterface
}
// DeviceClassInterface has methods to work with DeviceClass resources.
type DeviceClassInterface interface {
Create(ctx context.Context, deviceClass *v1alpha3.DeviceClass, opts v1.CreateOptions) (*v1alpha3.DeviceClass, error)
Update(ctx context.Context, deviceClass *v1alpha3.DeviceClass, opts v1.UpdateOptions) (*v1alpha3.DeviceClass, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.DeviceClass, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.DeviceClassList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.DeviceClass, err error)
Apply(ctx context.Context, deviceClass *resourcev1alpha3.DeviceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.DeviceClass, err error)
DeviceClassExpansion
}
// deviceClasses implements DeviceClassInterface
type deviceClasses struct {
*gentype.ClientWithListAndApply[*v1alpha3.DeviceClass, *v1alpha3.DeviceClassList, *resourcev1alpha3.DeviceClassApplyConfiguration]
}
// newDeviceClasses returns a DeviceClasses
func newDeviceClasses(c *ResourceV1alpha3Client) *deviceClasses {
return &deviceClasses{
gentype.NewClientWithListAndApply[*v1alpha3.DeviceClass, *v1alpha3.DeviceClassList, *resourcev1alpha3.DeviceClassApplyConfiguration](
"deviceclasses",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *v1alpha3.DeviceClass { return &v1alpha3.DeviceClass{} },
func() *v1alpha3.DeviceClassList { return &v1alpha3.DeviceClassList{} }),
}
}

View File

@ -0,0 +1,151 @@
/*
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 client-gen. DO NOT EDIT.
package fake
import (
"context"
json "encoding/json"
"fmt"
v1alpha3 "k8s.io/api/resource/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
testing "k8s.io/client-go/testing"
)
// FakeDeviceClasses implements DeviceClassInterface
type FakeDeviceClasses struct {
Fake *FakeResourceV1alpha3
}
var deviceclassesResource = v1alpha3.SchemeGroupVersion.WithResource("deviceclasses")
var deviceclassesKind = v1alpha3.SchemeGroupVersion.WithKind("DeviceClass")
// Get takes name of the deviceClass, and returns the corresponding deviceClass object, and an error if there is any.
func (c *FakeDeviceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.DeviceClass, err error) {
emptyResult := &v1alpha3.DeviceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootGetActionWithOptions(deviceclassesResource, name, options), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.DeviceClass), err
}
// List takes label and field selectors, and returns the list of DeviceClasses that match those selectors.
func (c *FakeDeviceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.DeviceClassList, err error) {
emptyResult := &v1alpha3.DeviceClassList{}
obj, err := c.Fake.
Invokes(testing.NewRootListActionWithOptions(deviceclassesResource, deviceclassesKind, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.DeviceClassList{ListMeta: obj.(*v1alpha3.DeviceClassList).ListMeta}
for _, item := range obj.(*v1alpha3.DeviceClassList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested deviceClasses.
func (c *FakeDeviceClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchActionWithOptions(deviceclassesResource, opts))
}
// Create takes the representation of a deviceClass and creates it. Returns the server's representation of the deviceClass, and an error, if there is any.
func (c *FakeDeviceClasses) Create(ctx context.Context, deviceClass *v1alpha3.DeviceClass, opts v1.CreateOptions) (result *v1alpha3.DeviceClass, err error) {
emptyResult := &v1alpha3.DeviceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootCreateActionWithOptions(deviceclassesResource, deviceClass, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.DeviceClass), err
}
// Update takes the representation of a deviceClass and updates it. Returns the server's representation of the deviceClass, and an error, if there is any.
func (c *FakeDeviceClasses) Update(ctx context.Context, deviceClass *v1alpha3.DeviceClass, opts v1.UpdateOptions) (result *v1alpha3.DeviceClass, err error) {
emptyResult := &v1alpha3.DeviceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootUpdateActionWithOptions(deviceclassesResource, deviceClass, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.DeviceClass), err
}
// Delete takes name of the deviceClass and deletes it. Returns an error if one occurs.
func (c *FakeDeviceClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteActionWithOptions(deviceclassesResource, name, opts), &v1alpha3.DeviceClass{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeDeviceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionActionWithOptions(deviceclassesResource, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.DeviceClassList{})
return err
}
// Patch applies the patch and returns the patched deviceClass.
func (c *FakeDeviceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.DeviceClass, err error) {
emptyResult := &v1alpha3.DeviceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceActionWithOptions(deviceclassesResource, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.DeviceClass), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied deviceClass.
func (c *FakeDeviceClasses) Apply(ctx context.Context, deviceClass *resourcev1alpha3.DeviceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.DeviceClass, err error) {
if deviceClass == nil {
return nil, fmt.Errorf("deviceClass provided to Apply must not be nil")
}
data, err := json.Marshal(deviceClass)
if err != nil {
return nil, err
}
name := deviceClass.Name
if name == nil {
return nil, fmt.Errorf("deviceClass.Name must be provided to Apply")
}
emptyResult := &v1alpha3.DeviceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceActionWithOptions(deviceclassesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.DeviceClass), err
}

View File

@ -28,6 +28,10 @@ type FakeResourceV1alpha3 struct {
*testing.Fake
}
func (c *FakeResourceV1alpha3) DeviceClasses() v1alpha3.DeviceClassInterface {
return &FakeDeviceClasses{c}
}
func (c *FakeResourceV1alpha3) PodSchedulingContexts(namespace string) v1alpha3.PodSchedulingContextInterface {
return &FakePodSchedulingContexts{c, namespace}
}
@ -36,22 +40,10 @@ func (c *FakeResourceV1alpha3) ResourceClaims(namespace string) v1alpha3.Resourc
return &FakeResourceClaims{c, namespace}
}
func (c *FakeResourceV1alpha3) ResourceClaimParameters(namespace string) v1alpha3.ResourceClaimParametersInterface {
return &FakeResourceClaimParameters{c, namespace}
}
func (c *FakeResourceV1alpha3) ResourceClaimTemplates(namespace string) v1alpha3.ResourceClaimTemplateInterface {
return &FakeResourceClaimTemplates{c, namespace}
}
func (c *FakeResourceV1alpha3) ResourceClasses() v1alpha3.ResourceClassInterface {
return &FakeResourceClasses{c}
}
func (c *FakeResourceV1alpha3) ResourceClassParameters(namespace string) v1alpha3.ResourceClassParametersInterface {
return &FakeResourceClassParameters{c, namespace}
}
func (c *FakeResourceV1alpha3) ResourceSlices() v1alpha3.ResourceSliceInterface {
return &FakeResourceSlices{c}
}

View File

@ -1,160 +0,0 @@
/*
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 client-gen. DO NOT EDIT.
package fake
import (
"context"
json "encoding/json"
"fmt"
v1alpha3 "k8s.io/api/resource/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
testing "k8s.io/client-go/testing"
)
// FakeResourceClaimParameters implements ResourceClaimParametersInterface
type FakeResourceClaimParameters struct {
Fake *FakeResourceV1alpha3
ns string
}
var resourceclaimparametersResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclaimparameters")
var resourceclaimparametersKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimParameters")
// Get takes name of the resourceClaimParameters, and returns the corresponding resourceClaimParameters object, and an error if there is any.
func (c *FakeResourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClaimParameters, err error) {
emptyResult := &v1alpha3.ResourceClaimParameters{}
obj, err := c.Fake.
Invokes(testing.NewGetActionWithOptions(resourceclaimparametersResource, c.ns, name, options), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClaimParameters), err
}
// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors.
func (c *FakeResourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClaimParametersList, err error) {
emptyResult := &v1alpha3.ResourceClaimParametersList{}
obj, err := c.Fake.
Invokes(testing.NewListActionWithOptions(resourceclaimparametersResource, resourceclaimparametersKind, c.ns, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.ResourceClaimParametersList{ListMeta: obj.(*v1alpha3.ResourceClaimParametersList).ListMeta}
for _, item := range obj.(*v1alpha3.ResourceClaimParametersList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested resourceClaimParameters.
func (c *FakeResourceClaimParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchActionWithOptions(resourceclaimparametersResource, c.ns, opts))
}
// Create takes the representation of a resourceClaimParameters and creates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any.
func (c *FakeResourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha3.ResourceClaimParameters, err error) {
emptyResult := &v1alpha3.ResourceClaimParameters{}
obj, err := c.Fake.
Invokes(testing.NewCreateActionWithOptions(resourceclaimparametersResource, c.ns, resourceClaimParameters, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClaimParameters), err
}
// Update takes the representation of a resourceClaimParameters and updates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any.
func (c *FakeResourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha3.ResourceClaimParameters, err error) {
emptyResult := &v1alpha3.ResourceClaimParameters{}
obj, err := c.Fake.
Invokes(testing.NewUpdateActionWithOptions(resourceclaimparametersResource, c.ns, resourceClaimParameters, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClaimParameters), err
}
// Delete takes name of the resourceClaimParameters and deletes it. Returns an error if one occurs.
func (c *FakeResourceClaimParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(resourceclaimparametersResource, c.ns, name, opts), &v1alpha3.ResourceClaimParameters{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceClaimParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionActionWithOptions(resourceclaimparametersResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.ResourceClaimParametersList{})
return err
}
// Patch applies the patch and returns the patched resourceClaimParameters.
func (c *FakeResourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaimParameters, err error) {
emptyResult := &v1alpha3.ResourceClaimParameters{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimparametersResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClaimParameters), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimParameters.
func (c *FakeResourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha3.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaimParameters, err error) {
if resourceClaimParameters == nil {
return nil, fmt.Errorf("resourceClaimParameters provided to Apply must not be nil")
}
data, err := json.Marshal(resourceClaimParameters)
if err != nil {
return nil, err
}
name := resourceClaimParameters.Name
if name == nil {
return nil, fmt.Errorf("resourceClaimParameters.Name must be provided to Apply")
}
emptyResult := &v1alpha3.ResourceClaimParameters{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimparametersResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClaimParameters), err
}

View File

@ -1,151 +0,0 @@
/*
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 client-gen. DO NOT EDIT.
package fake
import (
"context"
json "encoding/json"
"fmt"
v1alpha3 "k8s.io/api/resource/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
testing "k8s.io/client-go/testing"
)
// FakeResourceClasses implements ResourceClassInterface
type FakeResourceClasses struct {
Fake *FakeResourceV1alpha3
}
var resourceclassesResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclasses")
var resourceclassesKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClass")
// Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any.
func (c *FakeResourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClass, err error) {
emptyResult := &v1alpha3.ResourceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootGetActionWithOptions(resourceclassesResource, name, options), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClass), err
}
// List takes label and field selectors, and returns the list of ResourceClasses that match those selectors.
func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClassList, err error) {
emptyResult := &v1alpha3.ResourceClassList{}
obj, err := c.Fake.
Invokes(testing.NewRootListActionWithOptions(resourceclassesResource, resourceclassesKind, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.ResourceClassList{ListMeta: obj.(*v1alpha3.ResourceClassList).ListMeta}
for _, item := range obj.(*v1alpha3.ResourceClassList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested resourceClasses.
func (c *FakeResourceClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchActionWithOptions(resourceclassesResource, opts))
}
// Create takes the representation of a resourceClass and creates it. Returns the server's representation of the resourceClass, and an error, if there is any.
func (c *FakeResourceClasses) Create(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.CreateOptions) (result *v1alpha3.ResourceClass, err error) {
emptyResult := &v1alpha3.ResourceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootCreateActionWithOptions(resourceclassesResource, resourceClass, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClass), err
}
// Update takes the representation of a resourceClass and updates it. Returns the server's representation of the resourceClass, and an error, if there is any.
func (c *FakeResourceClasses) Update(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.UpdateOptions) (result *v1alpha3.ResourceClass, err error) {
emptyResult := &v1alpha3.ResourceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootUpdateActionWithOptions(resourceclassesResource, resourceClass, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClass), err
}
// Delete takes name of the resourceClass and deletes it. Returns an error if one occurs.
func (c *FakeResourceClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteActionWithOptions(resourceclassesResource, name, opts), &v1alpha3.ResourceClass{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionActionWithOptions(resourceclassesResource, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.ResourceClassList{})
return err
}
// Patch applies the patch and returns the patched resourceClass.
func (c *FakeResourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClass, err error) {
emptyResult := &v1alpha3.ResourceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceActionWithOptions(resourceclassesResource, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClass), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass.
func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha3.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClass, err error) {
if resourceClass == nil {
return nil, fmt.Errorf("resourceClass provided to Apply must not be nil")
}
data, err := json.Marshal(resourceClass)
if err != nil {
return nil, err
}
name := resourceClass.Name
if name == nil {
return nil, fmt.Errorf("resourceClass.Name must be provided to Apply")
}
emptyResult := &v1alpha3.ResourceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceActionWithOptions(resourceclassesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClass), err
}

View File

@ -1,160 +0,0 @@
/*
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 client-gen. DO NOT EDIT.
package fake
import (
"context"
json "encoding/json"
"fmt"
v1alpha3 "k8s.io/api/resource/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
testing "k8s.io/client-go/testing"
)
// FakeResourceClassParameters implements ResourceClassParametersInterface
type FakeResourceClassParameters struct {
Fake *FakeResourceV1alpha3
ns string
}
var resourceclassparametersResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclassparameters")
var resourceclassparametersKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClassParameters")
// Get takes name of the resourceClassParameters, and returns the corresponding resourceClassParameters object, and an error if there is any.
func (c *FakeResourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClassParameters, err error) {
emptyResult := &v1alpha3.ResourceClassParameters{}
obj, err := c.Fake.
Invokes(testing.NewGetActionWithOptions(resourceclassparametersResource, c.ns, name, options), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClassParameters), err
}
// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors.
func (c *FakeResourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClassParametersList, err error) {
emptyResult := &v1alpha3.ResourceClassParametersList{}
obj, err := c.Fake.
Invokes(testing.NewListActionWithOptions(resourceclassparametersResource, resourceclassparametersKind, c.ns, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha3.ResourceClassParametersList{ListMeta: obj.(*v1alpha3.ResourceClassParametersList).ListMeta}
for _, item := range obj.(*v1alpha3.ResourceClassParametersList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested resourceClassParameters.
func (c *FakeResourceClassParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchActionWithOptions(resourceclassparametersResource, c.ns, opts))
}
// Create takes the representation of a resourceClassParameters and creates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any.
func (c *FakeResourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha3.ResourceClassParameters, err error) {
emptyResult := &v1alpha3.ResourceClassParameters{}
obj, err := c.Fake.
Invokes(testing.NewCreateActionWithOptions(resourceclassparametersResource, c.ns, resourceClassParameters, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClassParameters), err
}
// Update takes the representation of a resourceClassParameters and updates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any.
func (c *FakeResourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha3.ResourceClassParameters, err error) {
emptyResult := &v1alpha3.ResourceClassParameters{}
obj, err := c.Fake.
Invokes(testing.NewUpdateActionWithOptions(resourceclassparametersResource, c.ns, resourceClassParameters, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClassParameters), err
}
// Delete takes name of the resourceClassParameters and deletes it. Returns an error if one occurs.
func (c *FakeResourceClassParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(resourceclassparametersResource, c.ns, name, opts), &v1alpha3.ResourceClassParameters{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceClassParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionActionWithOptions(resourceclassparametersResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.ResourceClassParametersList{})
return err
}
// Patch applies the patch and returns the patched resourceClassParameters.
func (c *FakeResourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClassParameters, err error) {
emptyResult := &v1alpha3.ResourceClassParameters{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclassparametersResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClassParameters), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClassParameters.
func (c *FakeResourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha3.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClassParameters, err error) {
if resourceClassParameters == nil {
return nil, fmt.Errorf("resourceClassParameters provided to Apply must not be nil")
}
data, err := json.Marshal(resourceClassParameters)
if err != nil {
return nil, err
}
name := resourceClassParameters.Name
if name == nil {
return nil, fmt.Errorf("resourceClassParameters.Name must be provided to Apply")
}
emptyResult := &v1alpha3.ResourceClassParameters{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclassparametersResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1alpha3.ResourceClassParameters), err
}

View File

@ -18,16 +18,12 @@ limitations under the License.
package v1alpha3
type DeviceClassExpansion interface{}
type PodSchedulingContextExpansion interface{}
type ResourceClaimExpansion interface{}
type ResourceClaimParametersExpansion interface{}
type ResourceClaimTemplateExpansion interface{}
type ResourceClassExpansion interface{}
type ResourceClassParametersExpansion interface{}
type ResourceSliceExpansion interface{}

View File

@ -28,12 +28,10 @@ import (
type ResourceV1alpha3Interface interface {
RESTClient() rest.Interface
DeviceClassesGetter
PodSchedulingContextsGetter
ResourceClaimsGetter
ResourceClaimParametersGetter
ResourceClaimTemplatesGetter
ResourceClassesGetter
ResourceClassParametersGetter
ResourceSlicesGetter
}
@ -42,6 +40,10 @@ type ResourceV1alpha3Client struct {
restClient rest.Interface
}
func (c *ResourceV1alpha3Client) DeviceClasses() DeviceClassInterface {
return newDeviceClasses(c)
}
func (c *ResourceV1alpha3Client) PodSchedulingContexts(namespace string) PodSchedulingContextInterface {
return newPodSchedulingContexts(c, namespace)
}
@ -50,22 +52,10 @@ func (c *ResourceV1alpha3Client) ResourceClaims(namespace string) ResourceClaimI
return newResourceClaims(c, namespace)
}
func (c *ResourceV1alpha3Client) ResourceClaimParameters(namespace string) ResourceClaimParametersInterface {
return newResourceClaimParameters(c, namespace)
}
func (c *ResourceV1alpha3Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface {
return newResourceClaimTemplates(c, namespace)
}
func (c *ResourceV1alpha3Client) ResourceClasses() ResourceClassInterface {
return newResourceClasses(c)
}
func (c *ResourceV1alpha3Client) ResourceClassParameters(namespace string) ResourceClassParametersInterface {
return newResourceClassParameters(c, namespace)
}
func (c *ResourceV1alpha3Client) ResourceSlices() ResourceSliceInterface {
return newResourceSlices(c)
}

View File

@ -1,69 +0,0 @@
/*
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 client-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
v1alpha3 "k8s.io/api/resource/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// ResourceClaimParametersGetter has a method to return a ResourceClaimParametersInterface.
// A group's client should implement this interface.
type ResourceClaimParametersGetter interface {
ResourceClaimParameters(namespace string) ResourceClaimParametersInterface
}
// ResourceClaimParametersInterface has methods to work with ResourceClaimParameters resources.
type ResourceClaimParametersInterface interface {
Create(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.CreateOptions) (*v1alpha3.ResourceClaimParameters, error)
Update(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.UpdateOptions) (*v1alpha3.ResourceClaimParameters, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClaimParameters, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClaimParametersList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaimParameters, err error)
Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha3.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaimParameters, err error)
ResourceClaimParametersExpansion
}
// resourceClaimParameters implements ResourceClaimParametersInterface
type resourceClaimParameters struct {
*gentype.ClientWithListAndApply[*v1alpha3.ResourceClaimParameters, *v1alpha3.ResourceClaimParametersList, *resourcev1alpha3.ResourceClaimParametersApplyConfiguration]
}
// newResourceClaimParameters returns a ResourceClaimParameters
func newResourceClaimParameters(c *ResourceV1alpha3Client, namespace string) *resourceClaimParameters {
return &resourceClaimParameters{
gentype.NewClientWithListAndApply[*v1alpha3.ResourceClaimParameters, *v1alpha3.ResourceClaimParametersList, *resourcev1alpha3.ResourceClaimParametersApplyConfiguration](
"resourceclaimparameters",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1alpha3.ResourceClaimParameters { return &v1alpha3.ResourceClaimParameters{} },
func() *v1alpha3.ResourceClaimParametersList { return &v1alpha3.ResourceClaimParametersList{} }),
}
}

View File

@ -1,69 +0,0 @@
/*
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 client-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
v1alpha3 "k8s.io/api/resource/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// ResourceClassesGetter has a method to return a ResourceClassInterface.
// A group's client should implement this interface.
type ResourceClassesGetter interface {
ResourceClasses() ResourceClassInterface
}
// ResourceClassInterface has methods to work with ResourceClass resources.
type ResourceClassInterface interface {
Create(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.CreateOptions) (*v1alpha3.ResourceClass, error)
Update(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.UpdateOptions) (*v1alpha3.ResourceClass, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClass, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClassList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClass, err error)
Apply(ctx context.Context, resourceClass *resourcev1alpha3.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClass, err error)
ResourceClassExpansion
}
// resourceClasses implements ResourceClassInterface
type resourceClasses struct {
*gentype.ClientWithListAndApply[*v1alpha3.ResourceClass, *v1alpha3.ResourceClassList, *resourcev1alpha3.ResourceClassApplyConfiguration]
}
// newResourceClasses returns a ResourceClasses
func newResourceClasses(c *ResourceV1alpha3Client) *resourceClasses {
return &resourceClasses{
gentype.NewClientWithListAndApply[*v1alpha3.ResourceClass, *v1alpha3.ResourceClassList, *resourcev1alpha3.ResourceClassApplyConfiguration](
"resourceclasses",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *v1alpha3.ResourceClass { return &v1alpha3.ResourceClass{} },
func() *v1alpha3.ResourceClassList { return &v1alpha3.ResourceClassList{} }),
}
}

View File

@ -1,69 +0,0 @@
/*
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 client-gen. DO NOT EDIT.
package v1alpha3
import (
"context"
v1alpha3 "k8s.io/api/resource/v1alpha3"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// ResourceClassParametersGetter has a method to return a ResourceClassParametersInterface.
// A group's client should implement this interface.
type ResourceClassParametersGetter interface {
ResourceClassParameters(namespace string) ResourceClassParametersInterface
}
// ResourceClassParametersInterface has methods to work with ResourceClassParameters resources.
type ResourceClassParametersInterface interface {
Create(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.CreateOptions) (*v1alpha3.ResourceClassParameters, error)
Update(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.UpdateOptions) (*v1alpha3.ResourceClassParameters, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClassParameters, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClassParametersList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClassParameters, err error)
Apply(ctx context.Context, resourceClassParameters *resourcev1alpha3.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClassParameters, err error)
ResourceClassParametersExpansion
}
// resourceClassParameters implements ResourceClassParametersInterface
type resourceClassParameters struct {
*gentype.ClientWithListAndApply[*v1alpha3.ResourceClassParameters, *v1alpha3.ResourceClassParametersList, *resourcev1alpha3.ResourceClassParametersApplyConfiguration]
}
// newResourceClassParameters returns a ResourceClassParameters
func newResourceClassParameters(c *ResourceV1alpha3Client, namespace string) *resourceClassParameters {
return &resourceClassParameters{
gentype.NewClientWithListAndApply[*v1alpha3.ResourceClassParameters, *v1alpha3.ResourceClassParametersList, *resourcev1alpha3.ResourceClassParametersApplyConfiguration](
"resourceclassparameters",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1alpha3.ResourceClassParameters { return &v1alpha3.ResourceClassParameters{} },
func() *v1alpha3.ResourceClassParametersList { return &v1alpha3.ResourceClassParametersList{} }),
}
}

View File

@ -25,24 +25,24 @@ import (
"k8s.io/client-go/tools/cache"
)
// ResourceClassLister helps list ResourceClasses.
// DeviceClassLister helps list DeviceClasses.
// All objects returned here must be treated as read-only.
type ResourceClassLister interface {
// List lists all ResourceClasses in the indexer.
type DeviceClassLister interface {
// List lists all DeviceClasses in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha3.ResourceClass, err error)
// Get retrieves the ResourceClass from the index for a given name.
List(selector labels.Selector) (ret []*v1alpha3.DeviceClass, err error)
// Get retrieves the DeviceClass from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha3.ResourceClass, error)
ResourceClassListerExpansion
Get(name string) (*v1alpha3.DeviceClass, error)
DeviceClassListerExpansion
}
// resourceClassLister implements the ResourceClassLister interface.
type resourceClassLister struct {
listers.ResourceIndexer[*v1alpha3.ResourceClass]
// deviceClassLister implements the DeviceClassLister interface.
type deviceClassLister struct {
listers.ResourceIndexer[*v1alpha3.DeviceClass]
}
// NewResourceClassLister returns a new ResourceClassLister.
func NewResourceClassLister(indexer cache.Indexer) ResourceClassLister {
return &resourceClassLister{listers.New[*v1alpha3.ResourceClass](indexer, v1alpha3.Resource("resourceclass"))}
// NewDeviceClassLister returns a new DeviceClassLister.
func NewDeviceClassLister(indexer cache.Indexer) DeviceClassLister {
return &deviceClassLister{listers.New[*v1alpha3.DeviceClass](indexer, v1alpha3.Resource("deviceclass"))}
}

View File

@ -18,6 +18,10 @@ limitations under the License.
package v1alpha3
// DeviceClassListerExpansion allows custom methods to be added to
// DeviceClassLister.
type DeviceClassListerExpansion interface{}
// PodSchedulingContextListerExpansion allows custom methods to be added to
// PodSchedulingContextLister.
type PodSchedulingContextListerExpansion interface{}
@ -34,14 +38,6 @@ type ResourceClaimListerExpansion interface{}
// ResourceClaimNamespaceLister.
type ResourceClaimNamespaceListerExpansion interface{}
// ResourceClaimParametersListerExpansion allows custom methods to be added to
// ResourceClaimParametersLister.
type ResourceClaimParametersListerExpansion interface{}
// ResourceClaimParametersNamespaceListerExpansion allows custom methods to be added to
// ResourceClaimParametersNamespaceLister.
type ResourceClaimParametersNamespaceListerExpansion interface{}
// ResourceClaimTemplateListerExpansion allows custom methods to be added to
// ResourceClaimTemplateLister.
type ResourceClaimTemplateListerExpansion interface{}
@ -50,18 +46,6 @@ type ResourceClaimTemplateListerExpansion interface{}
// ResourceClaimTemplateNamespaceLister.
type ResourceClaimTemplateNamespaceListerExpansion interface{}
// ResourceClassListerExpansion allows custom methods to be added to
// ResourceClassLister.
type ResourceClassListerExpansion interface{}
// ResourceClassParametersListerExpansion allows custom methods to be added to
// ResourceClassParametersLister.
type ResourceClassParametersListerExpansion interface{}
// ResourceClassParametersNamespaceListerExpansion allows custom methods to be added to
// ResourceClassParametersNamespaceLister.
type ResourceClassParametersNamespaceListerExpansion interface{}
// ResourceSliceListerExpansion allows custom methods to be added to
// ResourceSliceLister.
type ResourceSliceListerExpansion interface{}

View File

@ -1,70 +0,0 @@
/*
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 lister-gen. DO NOT EDIT.
package v1alpha3
import (
v1alpha3 "k8s.io/api/resource/v1alpha3"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
// ResourceClaimParametersLister helps list ResourceClaimParameters.
// All objects returned here must be treated as read-only.
type ResourceClaimParametersLister interface {
// List lists all ResourceClaimParameters in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha3.ResourceClaimParameters, err error)
// ResourceClaimParameters returns an object that can list and get ResourceClaimParameters.
ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister
ResourceClaimParametersListerExpansion
}
// resourceClaimParametersLister implements the ResourceClaimParametersLister interface.
type resourceClaimParametersLister struct {
listers.ResourceIndexer[*v1alpha3.ResourceClaimParameters]
}
// NewResourceClaimParametersLister returns a new ResourceClaimParametersLister.
func NewResourceClaimParametersLister(indexer cache.Indexer) ResourceClaimParametersLister {
return &resourceClaimParametersLister{listers.New[*v1alpha3.ResourceClaimParameters](indexer, v1alpha3.Resource("resourceclaimparameters"))}
}
// ResourceClaimParameters returns an object that can list and get ResourceClaimParameters.
func (s *resourceClaimParametersLister) ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister {
return resourceClaimParametersNamespaceLister{listers.NewNamespaced[*v1alpha3.ResourceClaimParameters](s.ResourceIndexer, namespace)}
}
// ResourceClaimParametersNamespaceLister helps list and get ResourceClaimParameters.
// All objects returned here must be treated as read-only.
type ResourceClaimParametersNamespaceLister interface {
// List lists all ResourceClaimParameters in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha3.ResourceClaimParameters, err error)
// Get retrieves the ResourceClaimParameters from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha3.ResourceClaimParameters, error)
ResourceClaimParametersNamespaceListerExpansion
}
// resourceClaimParametersNamespaceLister implements the ResourceClaimParametersNamespaceLister
// interface.
type resourceClaimParametersNamespaceLister struct {
listers.ResourceIndexer[*v1alpha3.ResourceClaimParameters]
}

View File

@ -1,70 +0,0 @@
/*
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 lister-gen. DO NOT EDIT.
package v1alpha3
import (
v1alpha3 "k8s.io/api/resource/v1alpha3"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
// ResourceClassParametersLister helps list ResourceClassParameters.
// All objects returned here must be treated as read-only.
type ResourceClassParametersLister interface {
// List lists all ResourceClassParameters in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha3.ResourceClassParameters, err error)
// ResourceClassParameters returns an object that can list and get ResourceClassParameters.
ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister
ResourceClassParametersListerExpansion
}
// resourceClassParametersLister implements the ResourceClassParametersLister interface.
type resourceClassParametersLister struct {
listers.ResourceIndexer[*v1alpha3.ResourceClassParameters]
}
// NewResourceClassParametersLister returns a new ResourceClassParametersLister.
func NewResourceClassParametersLister(indexer cache.Indexer) ResourceClassParametersLister {
return &resourceClassParametersLister{listers.New[*v1alpha3.ResourceClassParameters](indexer, v1alpha3.Resource("resourceclassparameters"))}
}
// ResourceClassParameters returns an object that can list and get ResourceClassParameters.
func (s *resourceClassParametersLister) ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister {
return resourceClassParametersNamespaceLister{listers.NewNamespaced[*v1alpha3.ResourceClassParameters](s.ResourceIndexer, namespace)}
}
// ResourceClassParametersNamespaceLister helps list and get ResourceClassParameters.
// All objects returned here must be treated as read-only.
type ResourceClassParametersNamespaceLister interface {
// List lists all ResourceClassParameters in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha3.ResourceClassParameters, err error)
// Get retrieves the ResourceClassParameters from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha3.ResourceClassParameters, error)
ResourceClassParametersNamespaceListerExpansion
}
// resourceClassParametersNamespaceLister implements the ResourceClassParametersNamespaceLister
// interface.
type resourceClassParametersNamespaceLister struct {
listers.ResourceIndexer[*v1alpha3.ResourceClassParameters]
}