DRA API: generated files

Kubernetes-commit: 0ee52b23cd56aa4a8e33cc366c2d150286ad041e
This commit is contained in:
Patrick Ohly 2024-09-26 12:07:39 +02:00 committed by Kubernetes Publisher
parent e6df85f02b
commit 98e4506ad9
58 changed files with 4864 additions and 0 deletions

View File

@ -12732,6 +12732,385 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.api.resource.v1alpha3.ResourcePool
default: {}
- name: io.k8s.api.resource.v1beta1.AllocationResult
map:
fields:
- name: devices
type:
namedType: io.k8s.api.resource.v1beta1.DeviceAllocationResult
default: {}
- name: nodeSelector
type:
namedType: io.k8s.api.core.v1.NodeSelector
- name: io.k8s.api.resource.v1beta1.BasicDevice
map:
fields:
- name: attributes
type:
map:
elementType:
namedType: io.k8s.api.resource.v1beta1.DeviceAttribute
- name: capacity
type:
map:
elementType:
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
- name: io.k8s.api.resource.v1beta1.CELDeviceSelector
map:
fields:
- name: expression
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1beta1.Device
map:
fields:
- name: basic
type:
namedType: io.k8s.api.resource.v1beta1.BasicDevice
- name: name
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1beta1.DeviceAllocationConfiguration
map:
fields:
- name: opaque
type:
namedType: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration
- name: requests
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: source
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1beta1.DeviceAllocationResult
map:
fields:
- name: config
type:
list:
elementType:
namedType: io.k8s.api.resource.v1beta1.DeviceAllocationConfiguration
elementRelationship: atomic
- name: results
type:
list:
elementType:
namedType: io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta1.DeviceAttribute
map:
fields:
- name: bool
type:
scalar: boolean
- name: int
type:
scalar: numeric
- name: string
type:
scalar: string
- name: version
type:
scalar: string
- name: io.k8s.api.resource.v1beta1.DeviceClaim
map:
fields:
- name: config
type:
list:
elementType:
namedType: io.k8s.api.resource.v1beta1.DeviceClaimConfiguration
elementRelationship: atomic
- name: constraints
type:
list:
elementType:
namedType: io.k8s.api.resource.v1beta1.DeviceConstraint
elementRelationship: atomic
- name: requests
type:
list:
elementType:
namedType: io.k8s.api.resource.v1beta1.DeviceRequest
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta1.DeviceClaimConfiguration
map:
fields:
- name: opaque
type:
namedType: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration
- name: requests
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta1.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.v1beta1.DeviceClassSpec
default: {}
- name: io.k8s.api.resource.v1beta1.DeviceClassConfiguration
map:
fields:
- name: opaque
type:
namedType: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration
- name: io.k8s.api.resource.v1beta1.DeviceClassSpec
map:
fields:
- name: config
type:
list:
elementType:
namedType: io.k8s.api.resource.v1beta1.DeviceClassConfiguration
elementRelationship: atomic
- name: selectors
type:
list:
elementType:
namedType: io.k8s.api.resource.v1beta1.DeviceSelector
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta1.DeviceConstraint
map:
fields:
- name: matchAttribute
type:
scalar: string
- name: requests
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta1.DeviceRequest
map:
fields:
- name: adminAccess
type:
scalar: boolean
- 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.v1beta1.DeviceSelector
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult
map:
fields:
- name: adminAccess
type:
scalar: boolean
- 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.v1beta1.DeviceSelector
map:
fields:
- name: cel
type:
namedType: io.k8s.api.resource.v1beta1.CELDeviceSelector
- name: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration
map:
fields:
- name: driver
type:
scalar: string
default: ""
- name: parameters
type:
namedType: __untyped_atomic_
- name: io.k8s.api.resource.v1beta1.ResourceClaim
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.v1beta1.ResourceClaimSpec
default: {}
- name: status
type:
namedType: io.k8s.api.resource.v1beta1.ResourceClaimStatus
default: {}
- name: io.k8s.api.resource.v1beta1.ResourceClaimConsumerReference
map:
fields:
- name: apiGroup
type:
scalar: string
- name: name
type:
scalar: string
default: ""
- name: resource
type:
scalar: string
default: ""
- name: uid
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1beta1.ResourceClaimSpec
map:
fields:
- name: devices
type:
namedType: io.k8s.api.resource.v1beta1.DeviceClaim
default: {}
- name: io.k8s.api.resource.v1beta1.ResourceClaimStatus
map:
fields:
- name: allocation
type:
namedType: io.k8s.api.resource.v1beta1.AllocationResult
- name: reservedFor
type:
list:
elementType:
namedType: io.k8s.api.resource.v1beta1.ResourceClaimConsumerReference
elementRelationship: associative
keys:
- uid
- name: io.k8s.api.resource.v1beta1.ResourceClaimTemplate
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.v1beta1.ResourceClaimTemplateSpec
default: {}
- name: io.k8s.api.resource.v1beta1.ResourceClaimTemplateSpec
map:
fields:
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.resource.v1beta1.ResourceClaimSpec
default: {}
- name: io.k8s.api.resource.v1beta1.ResourcePool
map:
fields:
- name: generation
type:
scalar: numeric
default: 0
- name: name
type:
scalar: string
default: ""
- name: resourceSliceCount
type:
scalar: numeric
default: 0
- name: io.k8s.api.resource.v1beta1.ResourceSlice
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.v1beta1.ResourceSliceSpec
default: {}
- name: io.k8s.api.resource.v1beta1.ResourceSliceSpec
map:
fields:
- name: allNodes
type:
scalar: boolean
- name: devices
type:
list:
elementType:
namedType: io.k8s.api.resource.v1beta1.Device
elementRelationship: atomic
- name: driver
type:
scalar: string
default: ""
- name: nodeName
type:
scalar: string
- name: nodeSelector
type:
namedType: io.k8s.api.core.v1.NodeSelector
- name: pool
type:
namedType: io.k8s.api.resource.v1beta1.ResourcePool
default: {}
- name: io.k8s.api.scheduling.v1.PriorityClass
map:
fields:

View File

@ -0,0 +1,52 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
v1 "k8s.io/client-go/applyconfigurations/core/v1"
)
// AllocationResultApplyConfiguration represents a declarative configuration of the AllocationResult type for use
// with apply.
type AllocationResultApplyConfiguration struct {
Devices *DeviceAllocationResultApplyConfiguration `json:"devices,omitempty"`
NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"`
}
// AllocationResultApplyConfiguration constructs a declarative configuration of the AllocationResult type for use with
// apply.
func AllocationResult() *AllocationResultApplyConfiguration {
return &AllocationResultApplyConfiguration{}
}
// 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
}
// 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 *AllocationResultApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *AllocationResultApplyConfiguration {
b.NodeSelector = 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 v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
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[resourcev1beta1.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"`
Capacity map[resourcev1beta1.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[resourcev1beta1.QualifiedName]DeviceAttributeApplyConfiguration) *BasicDeviceApplyConfiguration {
if b.Attributes == nil && len(entries) > 0 {
b.Attributes = make(map[resourcev1beta1.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[resourcev1beta1.QualifiedName]resource.Quantity) *BasicDeviceApplyConfiguration {
if b.Capacity == nil && len(entries) > 0 {
b.Capacity = make(map[resourcev1beta1.QualifiedName]resource.Quantity, len(entries))
}
for k, v := range entries {
b.Capacity[k] = v
}
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 v1beta1
// CELDeviceSelectorApplyConfiguration represents a declarative configuration of the CELDeviceSelector type for use
// with apply.
type CELDeviceSelectorApplyConfiguration struct {
Expression *string `json:"expression,omitempty"`
}
// CELDeviceSelectorApplyConfiguration constructs a declarative configuration of the CELDeviceSelector type for use with
// apply.
func CELDeviceSelector() *CELDeviceSelectorApplyConfiguration {
return &CELDeviceSelectorApplyConfiguration{}
}
// 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 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

@ -0,0 +1,48 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
// DeviceApplyConfiguration represents a declarative configuration of the Device type for use
// with apply.
type DeviceApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Basic *BasicDeviceApplyConfiguration `json:"basic,omitempty"`
}
// DeviceApplyConfiguration constructs a declarative configuration of the Device type for use with
// apply.
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 *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 v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
)
// DeviceAllocationConfigurationApplyConfiguration represents a declarative configuration of the DeviceAllocationConfiguration type for use
// with apply.
type DeviceAllocationConfigurationApplyConfiguration struct {
Source *resourcev1beta1.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 resourcev1beta1.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.DeviceConfigurationApplyConfiguration.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 v1beta1
// 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 v1beta1
// 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 v1beta1
// 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 v1beta1
// 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.DeviceConfigurationApplyConfiguration.Opaque = value
return b
}

View File

@ -0,0 +1,253 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
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"
)
// DeviceClassApplyConfiguration represents a declarative configuration of the DeviceClass type for use
// with apply.
type DeviceClassApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *DeviceClassSpecApplyConfiguration `json:"spec,omitempty"`
}
// DeviceClass constructs a declarative configuration of the DeviceClass type for use with
// apply.
func DeviceClass(name string) *DeviceClassApplyConfiguration {
b := &DeviceClassApplyConfiguration{}
b.WithName(name)
b.WithKind("DeviceClass")
b.WithAPIVersion("resource.k8s.io/v1beta1")
return b
}
// 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.
// 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 ExtractDeviceClass(deviceClass *resourcev1beta1.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) {
return extractDeviceClass(deviceClass, fieldManager, "")
}
// ExtractDeviceClassStatus is the same as ExtractDeviceClass except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractDeviceClassStatus(deviceClass *resourcev1beta1.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) {
return extractDeviceClass(deviceClass, fieldManager, "status")
}
func extractDeviceClass(deviceClass *resourcev1beta1.DeviceClass, fieldManager string, subresource string) (*DeviceClassApplyConfiguration, error) {
b := &DeviceClassApplyConfiguration{}
err := managedfields.ExtractInto(deviceClass, internal.Parser().Type("io.k8s.api.resource.v1beta1.DeviceClass"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(deviceClass.Name)
b.WithKind("DeviceClass")
b.WithAPIVersion("resource.k8s.io/v1beta1")
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 *DeviceClassApplyConfiguration) WithKind(value string) *DeviceClassApplyConfiguration {
b.TypeMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithAPIVersion(value string) *DeviceClassApplyConfiguration {
b.TypeMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithName(value string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithGenerateName(value string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithNamespace(value string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithUID(value types.UID) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithResourceVersion(value string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithGeneration(value int64) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithLabels(entries map[string]string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithAnnotations(entries map[string]string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.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 *DeviceClassApplyConfiguration) WithFinalizers(values ...string) *DeviceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *DeviceClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// 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 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 *DeviceClassApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.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 v1beta1
// 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.DeviceConfigurationApplyConfiguration.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 v1beta1
// 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"`
}
// 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
}

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 v1beta1
// 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 v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
)
// DeviceConstraintApplyConfiguration represents a declarative configuration of the DeviceConstraint type for use
// with apply.
type DeviceConstraintApplyConfiguration struct {
Requests []string `json:"requests,omitempty"`
MatchAttribute *resourcev1beta1.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 resourcev1beta1.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 v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
)
// 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 *resourcev1beta1.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 resourcev1beta1.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,75 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
// 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"`
AdminAccess *bool `json:"adminAccess,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
}
// 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 *DeviceRequestAllocationResultApplyConfiguration) WithAdminAccess(value bool) *DeviceRequestAllocationResultApplyConfiguration {
b.AdminAccess = &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 v1beta1
// 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

@ -0,0 +1,52 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// OpaqueDeviceConfigurationApplyConfiguration represents a declarative configuration of the OpaqueDeviceConfiguration type for use
// with apply.
type OpaqueDeviceConfigurationApplyConfiguration struct {
Driver *string `json:"driver,omitempty"`
Parameters *runtime.RawExtension `json:"parameters,omitempty"`
}
// OpaqueDeviceConfigurationApplyConfiguration constructs a declarative configuration of the OpaqueDeviceConfiguration type for use with
// apply.
func OpaqueDeviceConfiguration() *OpaqueDeviceConfigurationApplyConfiguration {
return &OpaqueDeviceConfigurationApplyConfiguration{}
}
// 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 *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 *OpaqueDeviceConfigurationApplyConfiguration) WithParameters(value runtime.RawExtension) *OpaqueDeviceConfigurationApplyConfiguration {
b.Parameters = &value
return b
}

View File

@ -0,0 +1,264 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
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"
)
// ResourceClaimApplyConfiguration represents a declarative configuration of the ResourceClaim type for use
// with apply.
type ResourceClaimApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ResourceClaimSpecApplyConfiguration `json:"spec,omitempty"`
Status *ResourceClaimStatusApplyConfiguration `json:"status,omitempty"`
}
// ResourceClaim constructs a declarative configuration of the ResourceClaim type for use with
// apply.
func ResourceClaim(name, namespace string) *ResourceClaimApplyConfiguration {
b := &ResourceClaimApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("ResourceClaim")
b.WithAPIVersion("resource.k8s.io/v1beta1")
return b
}
// ExtractResourceClaim extracts the applied configuration owned by fieldManager from
// resourceClaim. If no managedFields are found in resourceClaim for fieldManager, a
// ResourceClaimApplyConfiguration 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.
// resourceClaim must be a unmodified ResourceClaim API object that was retrieved from the Kubernetes API.
// ExtractResourceClaim 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 ExtractResourceClaim(resourceClaim *resourcev1beta1.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) {
return extractResourceClaim(resourceClaim, fieldManager, "")
}
// ExtractResourceClaimStatus is the same as ExtractResourceClaim except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractResourceClaimStatus(resourceClaim *resourcev1beta1.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) {
return extractResourceClaim(resourceClaim, fieldManager, "status")
}
func extractResourceClaim(resourceClaim *resourcev1beta1.ResourceClaim, fieldManager string, subresource string) (*ResourceClaimApplyConfiguration, error) {
b := &ResourceClaimApplyConfiguration{}
err := managedfields.ExtractInto(resourceClaim, internal.Parser().Type("io.k8s.api.resource.v1beta1.ResourceClaim"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(resourceClaim.Name)
b.WithNamespace(resourceClaim.Namespace)
b.WithKind("ResourceClaim")
b.WithAPIVersion("resource.k8s.io/v1beta1")
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 *ResourceClaimApplyConfiguration) WithKind(value string) *ResourceClaimApplyConfiguration {
b.TypeMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithAPIVersion(value string) *ResourceClaimApplyConfiguration {
b.TypeMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithName(value string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithGenerateName(value string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithNamespace(value string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithUID(value types.UID) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithResourceVersion(value string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithGeneration(value int64) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.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 *ResourceClaimApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *ResourceClaimApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// 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 Spec field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithSpec(value *ResourceClaimSpecApplyConfiguration) *ResourceClaimApplyConfiguration {
b.Spec = value
return b
}
// WithStatus sets the Status 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 Status field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithStatus(value *ResourceClaimStatusApplyConfiguration) *ResourceClaimApplyConfiguration {
b.Status = value
return b
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ResourceClaimApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}

View File

@ -0,0 +1,70 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
types "k8s.io/apimachinery/pkg/types"
)
// ResourceClaimConsumerReferenceApplyConfiguration represents a declarative configuration of the ResourceClaimConsumerReference type for use
// with apply.
type ResourceClaimConsumerReferenceApplyConfiguration struct {
APIGroup *string `json:"apiGroup,omitempty"`
Resource *string `json:"resource,omitempty"`
Name *string `json:"name,omitempty"`
UID *types.UID `json:"uid,omitempty"`
}
// ResourceClaimConsumerReferenceApplyConfiguration constructs a declarative configuration of the ResourceClaimConsumerReference type for use with
// apply.
func ResourceClaimConsumerReference() *ResourceClaimConsumerReferenceApplyConfiguration {
return &ResourceClaimConsumerReferenceApplyConfiguration{}
}
// 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 *ResourceClaimConsumerReferenceApplyConfiguration) WithAPIGroup(value string) *ResourceClaimConsumerReferenceApplyConfiguration {
b.APIGroup = &value
return b
}
// WithResource sets the Resource 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 Resource field is set to the value of the last call.
func (b *ResourceClaimConsumerReferenceApplyConfiguration) WithResource(value string) *ResourceClaimConsumerReferenceApplyConfiguration {
b.Resource = &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 *ResourceClaimConsumerReferenceApplyConfiguration) WithName(value string) *ResourceClaimConsumerReferenceApplyConfiguration {
b.Name = &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 *ResourceClaimConsumerReferenceApplyConfiguration) WithUID(value types.UID) *ResourceClaimConsumerReferenceApplyConfiguration {
b.UID = &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 v1beta1
// ResourceClaimSpecApplyConfiguration represents a declarative configuration of the ResourceClaimSpec type for use
// with apply.
type ResourceClaimSpecApplyConfiguration struct {
Devices *DeviceClaimApplyConfiguration `json:"devices,omitempty"`
}
// ResourceClaimSpecApplyConfiguration constructs a declarative configuration of the ResourceClaimSpec type for use with
// apply.
func ResourceClaimSpec() *ResourceClaimSpecApplyConfiguration {
return &ResourceClaimSpecApplyConfiguration{}
}
// 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 *ResourceClaimSpecApplyConfiguration) WithDevices(value *DeviceClaimApplyConfiguration) *ResourceClaimSpecApplyConfiguration {
b.Devices = value
return b
}

View File

@ -0,0 +1,53 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
// ResourceClaimStatusApplyConfiguration represents a declarative configuration of the ResourceClaimStatus type for use
// with apply.
type ResourceClaimStatusApplyConfiguration struct {
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
}
// ResourceClaimStatusApplyConfiguration constructs a declarative configuration of the ResourceClaimStatus type for use with
// apply.
func ResourceClaimStatus() *ResourceClaimStatusApplyConfiguration {
return &ResourceClaimStatusApplyConfiguration{}
}
// 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.
func (b *ResourceClaimStatusApplyConfiguration) WithAllocation(value *AllocationResultApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
b.Allocation = value
return b
}
// WithReservedFor adds the given value to the ReservedFor 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 ReservedFor field.
func (b *ResourceClaimStatusApplyConfiguration) WithReservedFor(values ...*ResourceClaimConsumerReferenceApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithReservedFor")
}
b.ReservedFor = append(b.ReservedFor, *values[i])
}
return b
}

View File

@ -0,0 +1,255 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
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"
)
// ResourceClaimTemplateApplyConfiguration represents a declarative configuration of the ResourceClaimTemplate type for use
// with apply.
type ResourceClaimTemplateApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ResourceClaimTemplateSpecApplyConfiguration `json:"spec,omitempty"`
}
// ResourceClaimTemplate constructs a declarative configuration of the ResourceClaimTemplate type for use with
// apply.
func ResourceClaimTemplate(name, namespace string) *ResourceClaimTemplateApplyConfiguration {
b := &ResourceClaimTemplateApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("ResourceClaimTemplate")
b.WithAPIVersion("resource.k8s.io/v1beta1")
return b
}
// ExtractResourceClaimTemplate extracts the applied configuration owned by fieldManager from
// resourceClaimTemplate. If no managedFields are found in resourceClaimTemplate for fieldManager, a
// ResourceClaimTemplateApplyConfiguration 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.
// resourceClaimTemplate must be a unmodified ResourceClaimTemplate API object that was retrieved from the Kubernetes API.
// ExtractResourceClaimTemplate 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 ExtractResourceClaimTemplate(resourceClaimTemplate *resourcev1beta1.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) {
return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "")
}
// ExtractResourceClaimTemplateStatus is the same as ExtractResourceClaimTemplate except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractResourceClaimTemplateStatus(resourceClaimTemplate *resourcev1beta1.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) {
return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "status")
}
func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1beta1.ResourceClaimTemplate, fieldManager string, subresource string) (*ResourceClaimTemplateApplyConfiguration, error) {
b := &ResourceClaimTemplateApplyConfiguration{}
err := managedfields.ExtractInto(resourceClaimTemplate, internal.Parser().Type("io.k8s.api.resource.v1beta1.ResourceClaimTemplate"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(resourceClaimTemplate.Name)
b.WithNamespace(resourceClaimTemplate.Namespace)
b.WithKind("ResourceClaimTemplate")
b.WithAPIVersion("resource.k8s.io/v1beta1")
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 *ResourceClaimTemplateApplyConfiguration) WithKind(value string) *ResourceClaimTemplateApplyConfiguration {
b.TypeMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithAPIVersion(value string) *ResourceClaimTemplateApplyConfiguration {
b.TypeMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithName(value string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithGenerateName(value string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithNamespace(value string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithUID(value types.UID) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithResourceVersion(value string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithGeneration(value int64) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *ResourceClaimTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// 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 Spec field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithSpec(value *ResourceClaimTemplateSpecApplyConfiguration) *ResourceClaimTemplateApplyConfiguration {
b.Spec = value
return b
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ResourceClaimTemplateApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}

View File

@ -0,0 +1,194 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ResourceClaimTemplateSpecApplyConfiguration represents a declarative configuration of the ResourceClaimTemplateSpec type for use
// with apply.
type ResourceClaimTemplateSpecApplyConfiguration struct {
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ResourceClaimSpecApplyConfiguration `json:"spec,omitempty"`
}
// ResourceClaimTemplateSpecApplyConfiguration constructs a declarative configuration of the ResourceClaimTemplateSpec type for use with
// apply.
func ResourceClaimTemplateSpec() *ResourceClaimTemplateSpecApplyConfiguration {
return &ResourceClaimTemplateSpecApplyConfiguration{}
}
// 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 *ResourceClaimTemplateSpecApplyConfiguration) WithName(value string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithGenerateName(value string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithNamespace(value string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithUID(value types.UID) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithResourceVersion(value string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithGeneration(value int64) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.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 *ResourceClaimTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *ResourceClaimTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// 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 Spec field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithSpec(value *ResourceClaimSpecApplyConfiguration) *ResourceClaimTemplateSpecApplyConfiguration {
b.Spec = value
return b
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ResourceClaimTemplateSpecApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}

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 v1beta1
// 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

@ -0,0 +1,253 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
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"
)
// ResourceSliceApplyConfiguration represents a declarative configuration of the ResourceSlice type for use
// with apply.
type ResourceSliceApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ResourceSliceSpecApplyConfiguration `json:"spec,omitempty"`
}
// ResourceSlice constructs a declarative configuration of the ResourceSlice type for use with
// apply.
func ResourceSlice(name string) *ResourceSliceApplyConfiguration {
b := &ResourceSliceApplyConfiguration{}
b.WithName(name)
b.WithKind("ResourceSlice")
b.WithAPIVersion("resource.k8s.io/v1beta1")
return b
}
// ExtractResourceSlice extracts the applied configuration owned by fieldManager from
// resourceSlice. If no managedFields are found in resourceSlice for fieldManager, a
// ResourceSliceApplyConfiguration 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.
// resourceSlice must be a unmodified ResourceSlice API object that was retrieved from the Kubernetes API.
// ExtractResourceSlice 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 ExtractResourceSlice(resourceSlice *resourcev1beta1.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) {
return extractResourceSlice(resourceSlice, fieldManager, "")
}
// ExtractResourceSliceStatus is the same as ExtractResourceSlice except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractResourceSliceStatus(resourceSlice *resourcev1beta1.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) {
return extractResourceSlice(resourceSlice, fieldManager, "status")
}
func extractResourceSlice(resourceSlice *resourcev1beta1.ResourceSlice, fieldManager string, subresource string) (*ResourceSliceApplyConfiguration, error) {
b := &ResourceSliceApplyConfiguration{}
err := managedfields.ExtractInto(resourceSlice, internal.Parser().Type("io.k8s.api.resource.v1beta1.ResourceSlice"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(resourceSlice.Name)
b.WithKind("ResourceSlice")
b.WithAPIVersion("resource.k8s.io/v1beta1")
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 *ResourceSliceApplyConfiguration) WithKind(value string) *ResourceSliceApplyConfiguration {
b.TypeMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithAPIVersion(value string) *ResourceSliceApplyConfiguration {
b.TypeMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithName(value string) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithGenerateName(value string) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithNamespace(value string) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithUID(value types.UID) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithResourceVersion(value string) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithGeneration(value int64) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithLabels(entries map[string]string) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.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 *ResourceSliceApplyConfiguration) WithFinalizers(values ...string) *ResourceSliceApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *ResourceSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// 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 Spec field is set to the value of the last call.
func (b *ResourceSliceApplyConfiguration) WithSpec(value *ResourceSliceSpecApplyConfiguration) *ResourceSliceApplyConfiguration {
b.Spec = value
return b
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ResourceSliceApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}

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 v1beta1
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

@ -61,6 +61,7 @@ import (
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
v1alpha3 "k8s.io/api/resource/v1alpha3"
resourcev1beta1 "k8s.io/api/resource/v1beta1"
schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -115,6 +116,7 @@ import (
applyconfigurationsrbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1"
applyconfigurationsrbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
applyconfigurationsresourcev1beta1 "k8s.io/client-go/applyconfigurations/resource/v1beta1"
applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1"
applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1"
applyconfigurationsschedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1"
@ -1635,6 +1637,62 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
case v1alpha3.SchemeGroupVersion.WithKind("ResourceSliceSpec"):
return &resourcev1alpha3.ResourceSliceSpecApplyConfiguration{}
// Group=resource.k8s.io, Version=v1beta1
case resourcev1beta1.SchemeGroupVersion.WithKind("AllocationResult"):
return &applyconfigurationsresourcev1beta1.AllocationResultApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("BasicDevice"):
return &applyconfigurationsresourcev1beta1.BasicDeviceApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("CELDeviceSelector"):
return &applyconfigurationsresourcev1beta1.CELDeviceSelectorApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("Device"):
return &applyconfigurationsresourcev1beta1.DeviceApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceAllocationConfiguration"):
return &applyconfigurationsresourcev1beta1.DeviceAllocationConfigurationApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceAllocationResult"):
return &applyconfigurationsresourcev1beta1.DeviceAllocationResultApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceAttribute"):
return &applyconfigurationsresourcev1beta1.DeviceAttributeApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceClaim"):
return &applyconfigurationsresourcev1beta1.DeviceClaimApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceClaimConfiguration"):
return &applyconfigurationsresourcev1beta1.DeviceClaimConfigurationApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceClass"):
return &applyconfigurationsresourcev1beta1.DeviceClassApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceClassConfiguration"):
return &applyconfigurationsresourcev1beta1.DeviceClassConfigurationApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceClassSpec"):
return &applyconfigurationsresourcev1beta1.DeviceClassSpecApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceConfiguration"):
return &applyconfigurationsresourcev1beta1.DeviceConfigurationApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceConstraint"):
return &applyconfigurationsresourcev1beta1.DeviceConstraintApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceRequest"):
return &applyconfigurationsresourcev1beta1.DeviceRequestApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceRequestAllocationResult"):
return &applyconfigurationsresourcev1beta1.DeviceRequestAllocationResultApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceSelector"):
return &applyconfigurationsresourcev1beta1.DeviceSelectorApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
return &applyconfigurationsresourcev1beta1.OpaqueDeviceConfigurationApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceClaim"):
return &applyconfigurationsresourcev1beta1.ResourceClaimApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"):
return &applyconfigurationsresourcev1beta1.ResourceClaimConsumerReferenceApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceClaimSpec"):
return &applyconfigurationsresourcev1beta1.ResourceClaimSpecApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceClaimStatus"):
return &applyconfigurationsresourcev1beta1.ResourceClaimStatusApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceClaimTemplate"):
return &applyconfigurationsresourcev1beta1.ResourceClaimTemplateApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"):
return &applyconfigurationsresourcev1beta1.ResourceClaimTemplateSpecApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourcePool"):
return &applyconfigurationsresourcev1beta1.ResourcePoolApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceSlice"):
return &applyconfigurationsresourcev1beta1.ResourceSliceApplyConfiguration{}
case resourcev1beta1.SchemeGroupVersion.WithKind("ResourceSliceSpec"):
return &applyconfigurationsresourcev1beta1.ResourceSliceSpecApplyConfiguration{}
// Group=scheduling.k8s.io, Version=v1
case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"):
return &applyconfigurationsschedulingv1.PriorityClassApplyConfiguration{}

View File

@ -62,6 +62,7 @@ import (
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
v1alpha3 "k8s.io/api/resource/v1alpha3"
resourcev1beta1 "k8s.io/api/resource/v1beta1"
schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -385,6 +386,16 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case v1alpha3.SchemeGroupVersion.WithResource("resourceslices"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceSlices().Informer()}, nil
// Group=resource.k8s.io, Version=v1beta1
case resourcev1beta1.SchemeGroupVersion.WithResource("deviceclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1beta1().DeviceClasses().Informer()}, nil
case resourcev1beta1.SchemeGroupVersion.WithResource("resourceclaims"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1beta1().ResourceClaims().Informer()}, nil
case resourcev1beta1.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1beta1().ResourceClaimTemplates().Informer()}, nil
case resourcev1beta1.SchemeGroupVersion.WithResource("resourceslices"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1beta1().ResourceSlices().Informer()}, nil
// Group=scheduling.k8s.io, Version=v1
case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1().PriorityClasses().Informer()}, nil

View File

@ -21,12 +21,15 @@ package resource
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
v1alpha3 "k8s.io/client-go/informers/resource/v1alpha3"
v1beta1 "k8s.io/client-go/informers/resource/v1beta1"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1alpha3 provides access to shared informers for resources in V1alpha3.
V1alpha3() v1alpha3.Interface
// V1beta1 provides access to shared informers for resources in V1beta1.
V1beta1() v1beta1.Interface
}
type group struct {
@ -44,3 +47,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
func (g *group) V1alpha3() v1alpha3.Interface {
return v1alpha3.New(g.factory, g.namespace, g.tweakListOptions)
}
// V1beta1 returns a new v1beta1.Interface.
func (g *group) V1beta1() v1beta1.Interface {
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
}

View File

@ -0,0 +1,89 @@
/*
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 v1beta1
import (
context "context"
time "time"
apiresourcev1beta1 "k8s.io/api/resource/v1beta1"
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"
resourcev1beta1 "k8s.io/client-go/listers/resource/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
// DeviceClassInformer provides access to a shared informer and lister for
// DeviceClasses.
type DeviceClassInformer interface {
Informer() cache.SharedIndexInformer
Lister() resourcev1beta1.DeviceClassLister
}
type deviceClassInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// 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 NewDeviceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredDeviceClassInformer(client, resyncPeriod, indexers, nil)
}
// 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 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.ResourceV1beta1().DeviceClasses().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1beta1().DeviceClasses().Watch(context.TODO(), options)
},
},
&apiresourcev1beta1.DeviceClass{},
resyncPeriod,
indexers,
)
}
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 *deviceClassInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apiresourcev1beta1.DeviceClass{}, f.defaultInformer)
}
func (f *deviceClassInformer) Lister() resourcev1beta1.DeviceClassLister {
return resourcev1beta1.NewDeviceClassLister(f.Informer().GetIndexer())
}

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 informer-gen. DO NOT EDIT.
package v1beta1
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// DeviceClasses returns a DeviceClassInformer.
DeviceClasses() DeviceClassInformer
// ResourceClaims returns a ResourceClaimInformer.
ResourceClaims() ResourceClaimInformer
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
ResourceClaimTemplates() ResourceClaimTemplateInformer
// ResourceSlices returns a ResourceSliceInformer.
ResourceSlices() ResourceSliceInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
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}
}
// ResourceClaims returns a ResourceClaimInformer.
func (v *version) ResourceClaims() ResourceClaimInformer {
return &resourceClaimInformer{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}
}
// ResourceSlices returns a ResourceSliceInformer.
func (v *version) ResourceSlices() ResourceSliceInformer {
return &resourceSliceInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}

View File

@ -0,0 +1,90 @@
/*
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 v1beta1
import (
context "context"
time "time"
apiresourcev1beta1 "k8s.io/api/resource/v1beta1"
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"
resourcev1beta1 "k8s.io/client-go/listers/resource/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
// ResourceClaimInformer provides access to a shared informer and lister for
// ResourceClaims.
type ResourceClaimInformer interface {
Informer() cache.SharedIndexInformer
Lister() resourcev1beta1.ResourceClaimLister
}
type resourceClaimInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewResourceClaimInformer constructs a new informer for ResourceClaim 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 NewResourceClaimInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredResourceClaimInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredResourceClaimInformer constructs a new informer for ResourceClaim 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 NewFilteredResourceClaimInformer(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.ResourceV1beta1().ResourceClaims(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1beta1().ResourceClaims(namespace).Watch(context.TODO(), options)
},
},
&apiresourcev1beta1.ResourceClaim{},
resyncPeriod,
indexers,
)
}
func (f *resourceClaimInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredResourceClaimInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *resourceClaimInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apiresourcev1beta1.ResourceClaim{}, f.defaultInformer)
}
func (f *resourceClaimInformer) Lister() resourcev1beta1.ResourceClaimLister {
return resourcev1beta1.NewResourceClaimLister(f.Informer().GetIndexer())
}

View File

@ -0,0 +1,90 @@
/*
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 v1beta1
import (
context "context"
time "time"
apiresourcev1beta1 "k8s.io/api/resource/v1beta1"
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"
resourcev1beta1 "k8s.io/client-go/listers/resource/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
// ResourceClaimTemplateInformer provides access to a shared informer and lister for
// ResourceClaimTemplates.
type ResourceClaimTemplateInformer interface {
Informer() cache.SharedIndexInformer
Lister() resourcev1beta1.ResourceClaimTemplateLister
}
type resourceClaimTemplateInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewResourceClaimTemplateInformer constructs a new informer for ResourceClaimTemplate 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 NewResourceClaimTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredResourceClaimTemplateInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredResourceClaimTemplateInformer constructs a new informer for ResourceClaimTemplate 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 NewFilteredResourceClaimTemplateInformer(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.ResourceV1beta1().ResourceClaimTemplates(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1beta1().ResourceClaimTemplates(namespace).Watch(context.TODO(), options)
},
},
&apiresourcev1beta1.ResourceClaimTemplate{},
resyncPeriod,
indexers,
)
}
func (f *resourceClaimTemplateInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredResourceClaimTemplateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apiresourcev1beta1.ResourceClaimTemplate{}, f.defaultInformer)
}
func (f *resourceClaimTemplateInformer) Lister() resourcev1beta1.ResourceClaimTemplateLister {
return resourcev1beta1.NewResourceClaimTemplateLister(f.Informer().GetIndexer())
}

View File

@ -0,0 +1,89 @@
/*
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 v1beta1
import (
context "context"
time "time"
apiresourcev1beta1 "k8s.io/api/resource/v1beta1"
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"
resourcev1beta1 "k8s.io/client-go/listers/resource/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
// ResourceSliceInformer provides access to a shared informer and lister for
// ResourceSlices.
type ResourceSliceInformer interface {
Informer() cache.SharedIndexInformer
Lister() resourcev1beta1.ResourceSliceLister
}
type resourceSliceInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewResourceSliceInformer constructs a new informer for ResourceSlice 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 NewResourceSliceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredResourceSliceInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredResourceSliceInformer constructs a new informer for ResourceSlice 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 NewFilteredResourceSliceInformer(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.ResourceV1beta1().ResourceSlices().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1beta1().ResourceSlices().Watch(context.TODO(), options)
},
},
&apiresourcev1beta1.ResourceSlice{},
resyncPeriod,
indexers,
)
}
func (f *resourceSliceInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredResourceSliceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *resourceSliceInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apiresourcev1beta1.ResourceSlice{}, f.defaultInformer)
}
func (f *resourceSliceInformer) Lister() resourcev1beta1.ResourceSliceLister {
return resourcev1beta1.NewResourceSliceLister(f.Informer().GetIndexer())
}

View File

@ -69,6 +69,7 @@ import (
rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
resourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3"
resourcev1beta1 "k8s.io/client-go/kubernetes/typed/resource/v1beta1"
schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1"
schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1"
@ -127,6 +128,7 @@ type Interface interface {
RbacV1() rbacv1.RbacV1Interface
RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
ResourceV1beta1() resourcev1beta1.ResourceV1beta1Interface
ResourceV1alpha3() resourcev1alpha3.ResourceV1alpha3Interface
SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface
SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface
@ -185,6 +187,7 @@ type Clientset struct {
rbacV1 *rbacv1.RbacV1Client
rbacV1beta1 *rbacv1beta1.RbacV1beta1Client
rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client
resourceV1beta1 *resourcev1beta1.ResourceV1beta1Client
resourceV1alpha3 *resourcev1alpha3.ResourceV1alpha3Client
schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client
schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client
@ -420,6 +423,11 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return c.rbacV1alpha1
}
// ResourceV1beta1 retrieves the ResourceV1beta1Client
func (c *Clientset) ResourceV1beta1() resourcev1beta1.ResourceV1beta1Interface {
return c.resourceV1beta1
}
// ResourceV1alpha3 retrieves the ResourceV1alpha3Client
func (c *Clientset) ResourceV1alpha3() resourcev1alpha3.ResourceV1alpha3Interface {
return c.resourceV1alpha3
@ -684,6 +692,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
if err != nil {
return nil, err
}
cs.resourceV1beta1, err = resourcev1beta1.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
return nil, err
}
cs.resourceV1alpha3, err = resourcev1alpha3.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
return nil, err
@ -782,6 +794,7 @@ func New(c rest.Interface) *Clientset {
cs.rbacV1 = rbacv1.New(c)
cs.rbacV1beta1 = rbacv1beta1.New(c)
cs.rbacV1alpha1 = rbacv1alpha1.New(c)
cs.resourceV1beta1 = resourcev1beta1.New(c)
cs.resourceV1alpha3 = resourcev1alpha3.New(c)
cs.schedulingV1alpha1 = schedulingv1alpha1.New(c)
cs.schedulingV1beta1 = schedulingv1beta1.New(c)

View File

@ -117,6 +117,8 @@ import (
fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake"
resourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3"
fakeresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake"
resourcev1beta1 "k8s.io/client-go/kubernetes/typed/resource/v1beta1"
fakeresourcev1beta1 "k8s.io/client-go/kubernetes/typed/resource/v1beta1/fake"
schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1"
fakeschedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1/fake"
schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
@ -445,6 +447,11 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake}
}
// ResourceV1beta1 retrieves the ResourceV1beta1Client
func (c *Clientset) ResourceV1beta1() resourcev1beta1.ResourceV1beta1Interface {
return &fakeresourcev1beta1.FakeResourceV1beta1{Fake: &c.Fake}
}
// ResourceV1alpha3 retrieves the ResourceV1alpha3Client
func (c *Clientset) ResourceV1alpha3() resourcev1alpha3.ResourceV1alpha3Interface {
return &fakeresourcev1alpha3.FakeResourceV1alpha3{Fake: &c.Fake}

View File

@ -65,6 +65,7 @@ import (
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
resourcev1beta1 "k8s.io/api/resource/v1beta1"
schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -128,6 +129,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
rbacv1.AddToScheme,
rbacv1beta1.AddToScheme,
rbacv1alpha1.AddToScheme,
resourcev1beta1.AddToScheme,
resourcev1alpha3.AddToScheme,
schedulingv1alpha1.AddToScheme,
schedulingv1beta1.AddToScheme,

View File

@ -65,6 +65,7 @@ import (
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
resourcev1beta1 "k8s.io/api/resource/v1beta1"
schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -128,6 +129,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
rbacv1.AddToScheme,
rbacv1beta1.AddToScheme,
rbacv1alpha1.AddToScheme,
resourcev1beta1.AddToScheme,
resourcev1alpha3.AddToScheme,
schedulingv1alpha1.AddToScheme,
schedulingv1beta1.AddToScheme,

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 client-gen. DO NOT EDIT.
package v1beta1
import (
context "context"
resourcev1beta1 "k8s.io/api/resource/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
applyconfigurationsresourcev1beta1 "k8s.io/client-go/applyconfigurations/resource/v1beta1"
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 *resourcev1beta1.DeviceClass, opts v1.CreateOptions) (*resourcev1beta1.DeviceClass, error)
Update(ctx context.Context, deviceClass *resourcev1beta1.DeviceClass, opts v1.UpdateOptions) (*resourcev1beta1.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) (*resourcev1beta1.DeviceClass, error)
List(ctx context.Context, opts v1.ListOptions) (*resourcev1beta1.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 *resourcev1beta1.DeviceClass, err error)
Apply(ctx context.Context, deviceClass *applyconfigurationsresourcev1beta1.DeviceClassApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1beta1.DeviceClass, err error)
DeviceClassExpansion
}
// deviceClasses implements DeviceClassInterface
type deviceClasses struct {
*gentype.ClientWithListAndApply[*resourcev1beta1.DeviceClass, *resourcev1beta1.DeviceClassList, *applyconfigurationsresourcev1beta1.DeviceClassApplyConfiguration]
}
// newDeviceClasses returns a DeviceClasses
func newDeviceClasses(c *ResourceV1beta1Client) *deviceClasses {
return &deviceClasses{
gentype.NewClientWithListAndApply[*resourcev1beta1.DeviceClass, *resourcev1beta1.DeviceClassList, *applyconfigurationsresourcev1beta1.DeviceClassApplyConfiguration](
"deviceclasses",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *resourcev1beta1.DeviceClass { return &resourcev1beta1.DeviceClass{} },
func() *resourcev1beta1.DeviceClassList { return &resourcev1beta1.DeviceClassList{} },
gentype.PrefersProtobuf[*resourcev1beta1.DeviceClass](),
),
}
}

View File

@ -0,0 +1,20 @@
/*
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.
// This package has the automatically generated typed clients.
package v1beta1

View File

@ -0,0 +1,20 @@
/*
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 has the automatically generated clients.
package fake

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 "context"
json "encoding/json"
fmt "fmt"
v1beta1 "k8s.io/api/resource/v1beta1"
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"
resourcev1beta1 "k8s.io/client-go/applyconfigurations/resource/v1beta1"
testing "k8s.io/client-go/testing"
)
// FakeDeviceClasses implements DeviceClassInterface
type FakeDeviceClasses struct {
Fake *FakeResourceV1beta1
}
var deviceclassesResource = v1beta1.SchemeGroupVersion.WithResource("deviceclasses")
var deviceclassesKind = v1beta1.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 *v1beta1.DeviceClass, err error) {
emptyResult := &v1beta1.DeviceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootGetActionWithOptions(deviceclassesResource, name, options), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.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 *v1beta1.DeviceClassList, err error) {
emptyResult := &v1beta1.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 := &v1beta1.DeviceClassList{ListMeta: obj.(*v1beta1.DeviceClassList).ListMeta}
for _, item := range obj.(*v1beta1.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 *v1beta1.DeviceClass, opts v1.CreateOptions) (result *v1beta1.DeviceClass, err error) {
emptyResult := &v1beta1.DeviceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootCreateActionWithOptions(deviceclassesResource, deviceClass, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.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 *v1beta1.DeviceClass, opts v1.UpdateOptions) (result *v1beta1.DeviceClass, err error) {
emptyResult := &v1beta1.DeviceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootUpdateActionWithOptions(deviceclassesResource, deviceClass, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.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), &v1beta1.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, &v1beta1.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 *v1beta1.DeviceClass, err error) {
emptyResult := &v1beta1.DeviceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceActionWithOptions(deviceclassesResource, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.DeviceClass), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied deviceClass.
func (c *FakeDeviceClasses) Apply(ctx context.Context, deviceClass *resourcev1beta1.DeviceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.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 := &v1beta1.DeviceClass{}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceActionWithOptions(deviceclassesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.DeviceClass), err
}

View File

@ -0,0 +1,52 @@
/*
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 (
v1beta1 "k8s.io/client-go/kubernetes/typed/resource/v1beta1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeResourceV1beta1 struct {
*testing.Fake
}
func (c *FakeResourceV1beta1) DeviceClasses() v1beta1.DeviceClassInterface {
return &FakeDeviceClasses{c}
}
func (c *FakeResourceV1beta1) ResourceClaims(namespace string) v1beta1.ResourceClaimInterface {
return &FakeResourceClaims{c, namespace}
}
func (c *FakeResourceV1beta1) ResourceClaimTemplates(namespace string) v1beta1.ResourceClaimTemplateInterface {
return &FakeResourceClaimTemplates{c, namespace}
}
func (c *FakeResourceV1beta1) ResourceSlices() v1beta1.ResourceSliceInterface {
return &FakeResourceSlices{c}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeResourceV1beta1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@ -0,0 +1,197 @@
/*
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 "context"
json "encoding/json"
fmt "fmt"
v1beta1 "k8s.io/api/resource/v1beta1"
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"
resourcev1beta1 "k8s.io/client-go/applyconfigurations/resource/v1beta1"
testing "k8s.io/client-go/testing"
)
// FakeResourceClaims implements ResourceClaimInterface
type FakeResourceClaims struct {
Fake *FakeResourceV1beta1
ns string
}
var resourceclaimsResource = v1beta1.SchemeGroupVersion.WithResource("resourceclaims")
var resourceclaimsKind = v1beta1.SchemeGroupVersion.WithKind("ResourceClaim")
// Get takes name of the resourceClaim, and returns the corresponding resourceClaim object, and an error if there is any.
func (c *FakeResourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ResourceClaim, err error) {
emptyResult := &v1beta1.ResourceClaim{}
obj, err := c.Fake.
Invokes(testing.NewGetActionWithOptions(resourceclaimsResource, c.ns, name, options), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaim), err
}
// List takes label and field selectors, and returns the list of ResourceClaims that match those selectors.
func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ResourceClaimList, err error) {
emptyResult := &v1beta1.ResourceClaimList{}
obj, err := c.Fake.
Invokes(testing.NewListActionWithOptions(resourceclaimsResource, resourceclaimsKind, c.ns, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.ResourceClaimList{ListMeta: obj.(*v1beta1.ResourceClaimList).ListMeta}
for _, item := range obj.(*v1beta1.ResourceClaimList).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 resourceClaims.
func (c *FakeResourceClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchActionWithOptions(resourceclaimsResource, c.ns, opts))
}
// Create takes the representation of a resourceClaim and creates it. Returns the server's representation of the resourceClaim, and an error, if there is any.
func (c *FakeResourceClaims) Create(ctx context.Context, resourceClaim *v1beta1.ResourceClaim, opts v1.CreateOptions) (result *v1beta1.ResourceClaim, err error) {
emptyResult := &v1beta1.ResourceClaim{}
obj, err := c.Fake.
Invokes(testing.NewCreateActionWithOptions(resourceclaimsResource, c.ns, resourceClaim, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaim), err
}
// Update takes the representation of a resourceClaim and updates it. Returns the server's representation of the resourceClaim, and an error, if there is any.
func (c *FakeResourceClaims) Update(ctx context.Context, resourceClaim *v1beta1.ResourceClaim, opts v1.UpdateOptions) (result *v1beta1.ResourceClaim, err error) {
emptyResult := &v1beta1.ResourceClaim{}
obj, err := c.Fake.
Invokes(testing.NewUpdateActionWithOptions(resourceclaimsResource, c.ns, resourceClaim, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaim), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeResourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1beta1.ResourceClaim, opts v1.UpdateOptions) (result *v1beta1.ResourceClaim, err error) {
emptyResult := &v1beta1.ResourceClaim{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceActionWithOptions(resourceclaimsResource, "status", c.ns, resourceClaim, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaim), err
}
// Delete takes name of the resourceClaim and deletes it. Returns an error if one occurs.
func (c *FakeResourceClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(resourceclaimsResource, c.ns, name, opts), &v1beta1.ResourceClaim{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionActionWithOptions(resourceclaimsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ResourceClaimList{})
return err
}
// Patch applies the patch and returns the patched resourceClaim.
func (c *FakeResourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ResourceClaim, err error) {
emptyResult := &v1beta1.ResourceClaim{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaim), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim.
func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1beta1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ResourceClaim, err error) {
if resourceClaim == nil {
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
}
data, err := json.Marshal(resourceClaim)
if err != nil {
return nil, err
}
name := resourceClaim.Name
if name == nil {
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
}
emptyResult := &v1beta1.ResourceClaim{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaim), err
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1beta1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ResourceClaim, err error) {
if resourceClaim == nil {
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
}
data, err := json.Marshal(resourceClaim)
if err != nil {
return nil, err
}
name := resourceClaim.Name
if name == nil {
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
}
emptyResult := &v1beta1.ResourceClaim{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaim), err
}

View File

@ -0,0 +1,160 @@
/*
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 "context"
json "encoding/json"
fmt "fmt"
v1beta1 "k8s.io/api/resource/v1beta1"
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"
resourcev1beta1 "k8s.io/client-go/applyconfigurations/resource/v1beta1"
testing "k8s.io/client-go/testing"
)
// FakeResourceClaimTemplates implements ResourceClaimTemplateInterface
type FakeResourceClaimTemplates struct {
Fake *FakeResourceV1beta1
ns string
}
var resourceclaimtemplatesResource = v1beta1.SchemeGroupVersion.WithResource("resourceclaimtemplates")
var resourceclaimtemplatesKind = v1beta1.SchemeGroupVersion.WithKind("ResourceClaimTemplate")
// Get takes name of the resourceClaimTemplate, and returns the corresponding resourceClaimTemplate object, and an error if there is any.
func (c *FakeResourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ResourceClaimTemplate, err error) {
emptyResult := &v1beta1.ResourceClaimTemplate{}
obj, err := c.Fake.
Invokes(testing.NewGetActionWithOptions(resourceclaimtemplatesResource, c.ns, name, options), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaimTemplate), err
}
// List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors.
func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ResourceClaimTemplateList, err error) {
emptyResult := &v1beta1.ResourceClaimTemplateList{}
obj, err := c.Fake.
Invokes(testing.NewListActionWithOptions(resourceclaimtemplatesResource, resourceclaimtemplatesKind, c.ns, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.ResourceClaimTemplateList{ListMeta: obj.(*v1beta1.ResourceClaimTemplateList).ListMeta}
for _, item := range obj.(*v1beta1.ResourceClaimTemplateList).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 resourceClaimTemplates.
func (c *FakeResourceClaimTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchActionWithOptions(resourceclaimtemplatesResource, c.ns, opts))
}
// Create takes the representation of a resourceClaimTemplate and creates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any.
func (c *FakeResourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1beta1.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1beta1.ResourceClaimTemplate, err error) {
emptyResult := &v1beta1.ResourceClaimTemplate{}
obj, err := c.Fake.
Invokes(testing.NewCreateActionWithOptions(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaimTemplate), err
}
// Update takes the representation of a resourceClaimTemplate and updates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any.
func (c *FakeResourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1beta1.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1beta1.ResourceClaimTemplate, err error) {
emptyResult := &v1beta1.ResourceClaimTemplate{}
obj, err := c.Fake.
Invokes(testing.NewUpdateActionWithOptions(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaimTemplate), err
}
// Delete takes name of the resourceClaimTemplate and deletes it. Returns an error if one occurs.
func (c *FakeResourceClaimTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(resourceclaimtemplatesResource, c.ns, name, opts), &v1beta1.ResourceClaimTemplate{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceClaimTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionActionWithOptions(resourceclaimtemplatesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ResourceClaimTemplateList{})
return err
}
// Patch applies the patch and returns the patched resourceClaimTemplate.
func (c *FakeResourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ResourceClaimTemplate, err error) {
emptyResult := &v1beta1.ResourceClaimTemplate{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimtemplatesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaimTemplate), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate.
func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1beta1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ResourceClaimTemplate, err error) {
if resourceClaimTemplate == nil {
return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil")
}
data, err := json.Marshal(resourceClaimTemplate)
if err != nil {
return nil, err
}
name := resourceClaimTemplate.Name
if name == nil {
return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply")
}
emptyResult := &v1beta1.ResourceClaimTemplate{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimtemplatesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceClaimTemplate), err
}

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 "context"
json "encoding/json"
fmt "fmt"
v1beta1 "k8s.io/api/resource/v1beta1"
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"
resourcev1beta1 "k8s.io/client-go/applyconfigurations/resource/v1beta1"
testing "k8s.io/client-go/testing"
)
// FakeResourceSlices implements ResourceSliceInterface
type FakeResourceSlices struct {
Fake *FakeResourceV1beta1
}
var resourceslicesResource = v1beta1.SchemeGroupVersion.WithResource("resourceslices")
var resourceslicesKind = v1beta1.SchemeGroupVersion.WithKind("ResourceSlice")
// Get takes name of the resourceSlice, and returns the corresponding resourceSlice object, and an error if there is any.
func (c *FakeResourceSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ResourceSlice, err error) {
emptyResult := &v1beta1.ResourceSlice{}
obj, err := c.Fake.
Invokes(testing.NewRootGetActionWithOptions(resourceslicesResource, name, options), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceSlice), err
}
// List takes label and field selectors, and returns the list of ResourceSlices that match those selectors.
func (c *FakeResourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ResourceSliceList, err error) {
emptyResult := &v1beta1.ResourceSliceList{}
obj, err := c.Fake.
Invokes(testing.NewRootListActionWithOptions(resourceslicesResource, resourceslicesKind, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.ResourceSliceList{ListMeta: obj.(*v1beta1.ResourceSliceList).ListMeta}
for _, item := range obj.(*v1beta1.ResourceSliceList).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 resourceSlices.
func (c *FakeResourceSlices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchActionWithOptions(resourceslicesResource, opts))
}
// Create takes the representation of a resourceSlice and creates it. Returns the server's representation of the resourceSlice, and an error, if there is any.
func (c *FakeResourceSlices) Create(ctx context.Context, resourceSlice *v1beta1.ResourceSlice, opts v1.CreateOptions) (result *v1beta1.ResourceSlice, err error) {
emptyResult := &v1beta1.ResourceSlice{}
obj, err := c.Fake.
Invokes(testing.NewRootCreateActionWithOptions(resourceslicesResource, resourceSlice, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceSlice), err
}
// Update takes the representation of a resourceSlice and updates it. Returns the server's representation of the resourceSlice, and an error, if there is any.
func (c *FakeResourceSlices) Update(ctx context.Context, resourceSlice *v1beta1.ResourceSlice, opts v1.UpdateOptions) (result *v1beta1.ResourceSlice, err error) {
emptyResult := &v1beta1.ResourceSlice{}
obj, err := c.Fake.
Invokes(testing.NewRootUpdateActionWithOptions(resourceslicesResource, resourceSlice, opts), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceSlice), err
}
// Delete takes name of the resourceSlice and deletes it. Returns an error if one occurs.
func (c *FakeResourceSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteActionWithOptions(resourceslicesResource, name, opts), &v1beta1.ResourceSlice{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionActionWithOptions(resourceslicesResource, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ResourceSliceList{})
return err
}
// Patch applies the patch and returns the patched resourceSlice.
func (c *FakeResourceSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ResourceSlice, err error) {
emptyResult := &v1beta1.ResourceSlice{}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceActionWithOptions(resourceslicesResource, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceSlice), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceSlice.
func (c *FakeResourceSlices) Apply(ctx context.Context, resourceSlice *resourcev1beta1.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ResourceSlice, err error) {
if resourceSlice == nil {
return nil, fmt.Errorf("resourceSlice provided to Apply must not be nil")
}
data, err := json.Marshal(resourceSlice)
if err != nil {
return nil, err
}
name := resourceSlice.Name
if name == nil {
return nil, fmt.Errorf("resourceSlice.Name must be provided to Apply")
}
emptyResult := &v1beta1.ResourceSlice{}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceActionWithOptions(resourceslicesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
return emptyResult, err
}
return obj.(*v1beta1.ResourceSlice), err
}

View File

@ -0,0 +1,27 @@
/*
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 v1beta1
type DeviceClassExpansion interface{}
type ResourceClaimExpansion interface{}
type ResourceClaimTemplateExpansion interface{}
type ResourceSliceExpansion interface{}

View File

@ -0,0 +1,122 @@
/*
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 v1beta1
import (
http "net/http"
resourcev1beta1 "k8s.io/api/resource/v1beta1"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type ResourceV1beta1Interface interface {
RESTClient() rest.Interface
DeviceClassesGetter
ResourceClaimsGetter
ResourceClaimTemplatesGetter
ResourceSlicesGetter
}
// ResourceV1beta1Client is used to interact with features provided by the resource.k8s.io group.
type ResourceV1beta1Client struct {
restClient rest.Interface
}
func (c *ResourceV1beta1Client) DeviceClasses() DeviceClassInterface {
return newDeviceClasses(c)
}
func (c *ResourceV1beta1Client) ResourceClaims(namespace string) ResourceClaimInterface {
return newResourceClaims(c, namespace)
}
func (c *ResourceV1beta1Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface {
return newResourceClaimTemplates(c, namespace)
}
func (c *ResourceV1beta1Client) ResourceSlices() ResourceSliceInterface {
return newResourceSlices(c)
}
// NewForConfig creates a new ResourceV1beta1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
func NewForConfig(c *rest.Config) (*ResourceV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
httpClient, err := rest.HTTPClientFor(&config)
if err != nil {
return nil, err
}
return NewForConfigAndClient(&config, httpClient)
}
// NewForConfigAndClient creates a new ResourceV1beta1Client for the given config and http client.
// Note the http client provided takes precedence over the configured transport values.
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientForConfigAndClient(&config, h)
if err != nil {
return nil, err
}
return &ResourceV1beta1Client{client}, nil
}
// NewForConfigOrDie creates a new ResourceV1beta1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *ResourceV1beta1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new ResourceV1beta1Client for the given RESTClient.
func New(c rest.Interface) *ResourceV1beta1Client {
return &ResourceV1beta1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := resourcev1beta1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *ResourceV1beta1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@ -0,0 +1,75 @@
/*
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 v1beta1
import (
context "context"
resourcev1beta1 "k8s.io/api/resource/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
applyconfigurationsresourcev1beta1 "k8s.io/client-go/applyconfigurations/resource/v1beta1"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// ResourceClaimsGetter has a method to return a ResourceClaimInterface.
// A group's client should implement this interface.
type ResourceClaimsGetter interface {
ResourceClaims(namespace string) ResourceClaimInterface
}
// ResourceClaimInterface has methods to work with ResourceClaim resources.
type ResourceClaimInterface interface {
Create(ctx context.Context, resourceClaim *resourcev1beta1.ResourceClaim, opts v1.CreateOptions) (*resourcev1beta1.ResourceClaim, error)
Update(ctx context.Context, resourceClaim *resourcev1beta1.ResourceClaim, opts v1.UpdateOptions) (*resourcev1beta1.ResourceClaim, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, resourceClaim *resourcev1beta1.ResourceClaim, opts v1.UpdateOptions) (*resourcev1beta1.ResourceClaim, 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) (*resourcev1beta1.ResourceClaim, error)
List(ctx context.Context, opts v1.ListOptions) (*resourcev1beta1.ResourceClaimList, 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 *resourcev1beta1.ResourceClaim, err error)
Apply(ctx context.Context, resourceClaim *applyconfigurationsresourcev1beta1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1beta1.ResourceClaim, err error)
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, resourceClaim *applyconfigurationsresourcev1beta1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1beta1.ResourceClaim, err error)
ResourceClaimExpansion
}
// resourceClaims implements ResourceClaimInterface
type resourceClaims struct {
*gentype.ClientWithListAndApply[*resourcev1beta1.ResourceClaim, *resourcev1beta1.ResourceClaimList, *applyconfigurationsresourcev1beta1.ResourceClaimApplyConfiguration]
}
// newResourceClaims returns a ResourceClaims
func newResourceClaims(c *ResourceV1beta1Client, namespace string) *resourceClaims {
return &resourceClaims{
gentype.NewClientWithListAndApply[*resourcev1beta1.ResourceClaim, *resourcev1beta1.ResourceClaimList, *applyconfigurationsresourcev1beta1.ResourceClaimApplyConfiguration](
"resourceclaims",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *resourcev1beta1.ResourceClaim { return &resourcev1beta1.ResourceClaim{} },
func() *resourcev1beta1.ResourceClaimList { return &resourcev1beta1.ResourceClaimList{} },
gentype.PrefersProtobuf[*resourcev1beta1.ResourceClaim](),
),
}
}

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 client-gen. DO NOT EDIT.
package v1beta1
import (
context "context"
resourcev1beta1 "k8s.io/api/resource/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
applyconfigurationsresourcev1beta1 "k8s.io/client-go/applyconfigurations/resource/v1beta1"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// ResourceClaimTemplatesGetter has a method to return a ResourceClaimTemplateInterface.
// A group's client should implement this interface.
type ResourceClaimTemplatesGetter interface {
ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface
}
// ResourceClaimTemplateInterface has methods to work with ResourceClaimTemplate resources.
type ResourceClaimTemplateInterface interface {
Create(ctx context.Context, resourceClaimTemplate *resourcev1beta1.ResourceClaimTemplate, opts v1.CreateOptions) (*resourcev1beta1.ResourceClaimTemplate, error)
Update(ctx context.Context, resourceClaimTemplate *resourcev1beta1.ResourceClaimTemplate, opts v1.UpdateOptions) (*resourcev1beta1.ResourceClaimTemplate, 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) (*resourcev1beta1.ResourceClaimTemplate, error)
List(ctx context.Context, opts v1.ListOptions) (*resourcev1beta1.ResourceClaimTemplateList, 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 *resourcev1beta1.ResourceClaimTemplate, err error)
Apply(ctx context.Context, resourceClaimTemplate *applyconfigurationsresourcev1beta1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1beta1.ResourceClaimTemplate, err error)
ResourceClaimTemplateExpansion
}
// resourceClaimTemplates implements ResourceClaimTemplateInterface
type resourceClaimTemplates struct {
*gentype.ClientWithListAndApply[*resourcev1beta1.ResourceClaimTemplate, *resourcev1beta1.ResourceClaimTemplateList, *applyconfigurationsresourcev1beta1.ResourceClaimTemplateApplyConfiguration]
}
// newResourceClaimTemplates returns a ResourceClaimTemplates
func newResourceClaimTemplates(c *ResourceV1beta1Client, namespace string) *resourceClaimTemplates {
return &resourceClaimTemplates{
gentype.NewClientWithListAndApply[*resourcev1beta1.ResourceClaimTemplate, *resourcev1beta1.ResourceClaimTemplateList, *applyconfigurationsresourcev1beta1.ResourceClaimTemplateApplyConfiguration](
"resourceclaimtemplates",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *resourcev1beta1.ResourceClaimTemplate { return &resourcev1beta1.ResourceClaimTemplate{} },
func() *resourcev1beta1.ResourceClaimTemplateList { return &resourcev1beta1.ResourceClaimTemplateList{} },
gentype.PrefersProtobuf[*resourcev1beta1.ResourceClaimTemplate](),
),
}
}

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 client-gen. DO NOT EDIT.
package v1beta1
import (
context "context"
resourcev1beta1 "k8s.io/api/resource/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
applyconfigurationsresourcev1beta1 "k8s.io/client-go/applyconfigurations/resource/v1beta1"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// ResourceSlicesGetter has a method to return a ResourceSliceInterface.
// A group's client should implement this interface.
type ResourceSlicesGetter interface {
ResourceSlices() ResourceSliceInterface
}
// ResourceSliceInterface has methods to work with ResourceSlice resources.
type ResourceSliceInterface interface {
Create(ctx context.Context, resourceSlice *resourcev1beta1.ResourceSlice, opts v1.CreateOptions) (*resourcev1beta1.ResourceSlice, error)
Update(ctx context.Context, resourceSlice *resourcev1beta1.ResourceSlice, opts v1.UpdateOptions) (*resourcev1beta1.ResourceSlice, 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) (*resourcev1beta1.ResourceSlice, error)
List(ctx context.Context, opts v1.ListOptions) (*resourcev1beta1.ResourceSliceList, 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 *resourcev1beta1.ResourceSlice, err error)
Apply(ctx context.Context, resourceSlice *applyconfigurationsresourcev1beta1.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1beta1.ResourceSlice, err error)
ResourceSliceExpansion
}
// resourceSlices implements ResourceSliceInterface
type resourceSlices struct {
*gentype.ClientWithListAndApply[*resourcev1beta1.ResourceSlice, *resourcev1beta1.ResourceSliceList, *applyconfigurationsresourcev1beta1.ResourceSliceApplyConfiguration]
}
// newResourceSlices returns a ResourceSlices
func newResourceSlices(c *ResourceV1beta1Client) *resourceSlices {
return &resourceSlices{
gentype.NewClientWithListAndApply[*resourcev1beta1.ResourceSlice, *resourcev1beta1.ResourceSliceList, *applyconfigurationsresourcev1beta1.ResourceSliceApplyConfiguration](
"resourceslices",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *resourcev1beta1.ResourceSlice { return &resourcev1beta1.ResourceSlice{} },
func() *resourcev1beta1.ResourceSliceList { return &resourcev1beta1.ResourceSliceList{} },
gentype.PrefersProtobuf[*resourcev1beta1.ResourceSlice](),
),
}
}

View File

@ -0,0 +1,48 @@
/*
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 v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
labels "k8s.io/apimachinery/pkg/labels"
listers "k8s.io/client-go/listers"
cache "k8s.io/client-go/tools/cache"
)
// DeviceClassLister helps list DeviceClasses.
// All objects returned here must be treated as read-only.
type DeviceClassLister interface {
// List lists all DeviceClasses in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*resourcev1beta1.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) (*resourcev1beta1.DeviceClass, error)
DeviceClassListerExpansion
}
// deviceClassLister implements the DeviceClassLister interface.
type deviceClassLister struct {
listers.ResourceIndexer[*resourcev1beta1.DeviceClass]
}
// NewDeviceClassLister returns a new DeviceClassLister.
func NewDeviceClassLister(indexer cache.Indexer) DeviceClassLister {
return &deviceClassLister{listers.New[*resourcev1beta1.DeviceClass](indexer, resourcev1beta1.Resource("deviceclass"))}
}

View File

@ -0,0 +1,43 @@
/*
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 v1beta1
// DeviceClassListerExpansion allows custom methods to be added to
// DeviceClassLister.
type DeviceClassListerExpansion interface{}
// ResourceClaimListerExpansion allows custom methods to be added to
// ResourceClaimLister.
type ResourceClaimListerExpansion interface{}
// ResourceClaimNamespaceListerExpansion allows custom methods to be added to
// ResourceClaimNamespaceLister.
type ResourceClaimNamespaceListerExpansion interface{}
// ResourceClaimTemplateListerExpansion allows custom methods to be added to
// ResourceClaimTemplateLister.
type ResourceClaimTemplateListerExpansion interface{}
// ResourceClaimTemplateNamespaceListerExpansion allows custom methods to be added to
// ResourceClaimTemplateNamespaceLister.
type ResourceClaimTemplateNamespaceListerExpansion interface{}
// ResourceSliceListerExpansion allows custom methods to be added to
// ResourceSliceLister.
type ResourceSliceListerExpansion interface{}

View File

@ -0,0 +1,70 @@
/*
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 v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
labels "k8s.io/apimachinery/pkg/labels"
listers "k8s.io/client-go/listers"
cache "k8s.io/client-go/tools/cache"
)
// ResourceClaimLister helps list ResourceClaims.
// All objects returned here must be treated as read-only.
type ResourceClaimLister interface {
// List lists all ResourceClaims in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*resourcev1beta1.ResourceClaim, err error)
// ResourceClaims returns an object that can list and get ResourceClaims.
ResourceClaims(namespace string) ResourceClaimNamespaceLister
ResourceClaimListerExpansion
}
// resourceClaimLister implements the ResourceClaimLister interface.
type resourceClaimLister struct {
listers.ResourceIndexer[*resourcev1beta1.ResourceClaim]
}
// NewResourceClaimLister returns a new ResourceClaimLister.
func NewResourceClaimLister(indexer cache.Indexer) ResourceClaimLister {
return &resourceClaimLister{listers.New[*resourcev1beta1.ResourceClaim](indexer, resourcev1beta1.Resource("resourceclaim"))}
}
// ResourceClaims returns an object that can list and get ResourceClaims.
func (s *resourceClaimLister) ResourceClaims(namespace string) ResourceClaimNamespaceLister {
return resourceClaimNamespaceLister{listers.NewNamespaced[*resourcev1beta1.ResourceClaim](s.ResourceIndexer, namespace)}
}
// ResourceClaimNamespaceLister helps list and get ResourceClaims.
// All objects returned here must be treated as read-only.
type ResourceClaimNamespaceLister interface {
// List lists all ResourceClaims in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*resourcev1beta1.ResourceClaim, err error)
// Get retrieves the ResourceClaim from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*resourcev1beta1.ResourceClaim, error)
ResourceClaimNamespaceListerExpansion
}
// resourceClaimNamespaceLister implements the ResourceClaimNamespaceLister
// interface.
type resourceClaimNamespaceLister struct {
listers.ResourceIndexer[*resourcev1beta1.ResourceClaim]
}

View File

@ -0,0 +1,70 @@
/*
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 v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
labels "k8s.io/apimachinery/pkg/labels"
listers "k8s.io/client-go/listers"
cache "k8s.io/client-go/tools/cache"
)
// ResourceClaimTemplateLister helps list ResourceClaimTemplates.
// All objects returned here must be treated as read-only.
type ResourceClaimTemplateLister interface {
// List lists all ResourceClaimTemplates in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*resourcev1beta1.ResourceClaimTemplate, err error)
// ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates.
ResourceClaimTemplates(namespace string) ResourceClaimTemplateNamespaceLister
ResourceClaimTemplateListerExpansion
}
// resourceClaimTemplateLister implements the ResourceClaimTemplateLister interface.
type resourceClaimTemplateLister struct {
listers.ResourceIndexer[*resourcev1beta1.ResourceClaimTemplate]
}
// NewResourceClaimTemplateLister returns a new ResourceClaimTemplateLister.
func NewResourceClaimTemplateLister(indexer cache.Indexer) ResourceClaimTemplateLister {
return &resourceClaimTemplateLister{listers.New[*resourcev1beta1.ResourceClaimTemplate](indexer, resourcev1beta1.Resource("resourceclaimtemplate"))}
}
// ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates.
func (s *resourceClaimTemplateLister) ResourceClaimTemplates(namespace string) ResourceClaimTemplateNamespaceLister {
return resourceClaimTemplateNamespaceLister{listers.NewNamespaced[*resourcev1beta1.ResourceClaimTemplate](s.ResourceIndexer, namespace)}
}
// ResourceClaimTemplateNamespaceLister helps list and get ResourceClaimTemplates.
// All objects returned here must be treated as read-only.
type ResourceClaimTemplateNamespaceLister interface {
// List lists all ResourceClaimTemplates in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*resourcev1beta1.ResourceClaimTemplate, err error)
// Get retrieves the ResourceClaimTemplate from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*resourcev1beta1.ResourceClaimTemplate, error)
ResourceClaimTemplateNamespaceListerExpansion
}
// resourceClaimTemplateNamespaceLister implements the ResourceClaimTemplateNamespaceLister
// interface.
type resourceClaimTemplateNamespaceLister struct {
listers.ResourceIndexer[*resourcev1beta1.ResourceClaimTemplate]
}

View File

@ -0,0 +1,48 @@
/*
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 v1beta1
import (
resourcev1beta1 "k8s.io/api/resource/v1beta1"
labels "k8s.io/apimachinery/pkg/labels"
listers "k8s.io/client-go/listers"
cache "k8s.io/client-go/tools/cache"
)
// ResourceSliceLister helps list ResourceSlices.
// All objects returned here must be treated as read-only.
type ResourceSliceLister interface {
// List lists all ResourceSlices in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*resourcev1beta1.ResourceSlice, err error)
// Get retrieves the ResourceSlice from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*resourcev1beta1.ResourceSlice, error)
ResourceSliceListerExpansion
}
// resourceSliceLister implements the ResourceSliceLister interface.
type resourceSliceLister struct {
listers.ResourceIndexer[*resourcev1beta1.ResourceSlice]
}
// NewResourceSliceLister returns a new ResourceSliceLister.
func NewResourceSliceLister(indexer cache.Indexer) ResourceSliceLister {
return &resourceSliceLister{listers.New[*resourcev1beta1.ResourceSlice](indexer, resourcev1beta1.Resource("resourceslice"))}
}