mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-01 01:12:01 +00:00
DRA: generated files for device taints API
Kubernetes-commit: 99dbd85c45f77a4fd719ff9271128e8a4ed46082
This commit is contained in:
parent
169f1af1bf
commit
71c858c5f4
@ -12590,6 +12590,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: taints
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaint
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.CELDeviceSelector
|
||||
map:
|
||||
fields:
|
||||
@ -12768,6 +12774,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult
|
||||
map:
|
||||
fields:
|
||||
@ -12790,6 +12802,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
map:
|
||||
fields:
|
||||
@ -12819,6 +12837,96 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaint
|
||||
map:
|
||||
fields:
|
||||
- name: effect
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: key
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: timeAdded
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: value
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaintRule
|
||||
map:
|
||||
fields:
|
||||
- name: apiVersion
|
||||
type:
|
||||
scalar: string
|
||||
- name: kind
|
||||
type:
|
||||
scalar: string
|
||||
- name: metadata
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
||||
default: {}
|
||||
- name: spec
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaintRuleSpec
|
||||
default: {}
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaintRuleSpec
|
||||
map:
|
||||
fields:
|
||||
- name: deviceSelector
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaintSelector
|
||||
- name: taint
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaint
|
||||
default: {}
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaintSelector
|
||||
map:
|
||||
fields:
|
||||
- name: device
|
||||
type:
|
||||
scalar: string
|
||||
- name: deviceClassName
|
||||
type:
|
||||
scalar: string
|
||||
- name: driver
|
||||
type:
|
||||
scalar: string
|
||||
- name: pool
|
||||
type:
|
||||
scalar: string
|
||||
- name: selectors
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceToleration
|
||||
map:
|
||||
fields:
|
||||
- name: effect
|
||||
type:
|
||||
scalar: string
|
||||
- name: key
|
||||
type:
|
||||
scalar: string
|
||||
- name: operator
|
||||
type:
|
||||
scalar: string
|
||||
default: Equal
|
||||
- name: tolerationSeconds
|
||||
type:
|
||||
scalar: numeric
|
||||
- name: value
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1alpha3.NetworkDeviceData
|
||||
map:
|
||||
fields:
|
||||
@ -13052,6 +13160,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceCapacity
|
||||
- name: taints
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceTaint
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta1.CELDeviceSelector
|
||||
map:
|
||||
fields:
|
||||
@ -13236,6 +13350,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult
|
||||
map:
|
||||
fields:
|
||||
@ -13258,6 +13378,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta1.DeviceSelector
|
||||
map:
|
||||
fields:
|
||||
@ -13287,6 +13413,48 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceSelector
|
||||
elementRelationship: atomic
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.api.resource.v1beta1.DeviceToleration
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta1.DeviceTaint
|
||||
map:
|
||||
fields:
|
||||
- name: effect
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: key
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: timeAdded
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time
|
||||
- name: value
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1beta1.DeviceToleration
|
||||
map:
|
||||
fields:
|
||||
- name: effect
|
||||
type:
|
||||
scalar: string
|
||||
- name: key
|
||||
type:
|
||||
scalar: string
|
||||
- name: operator
|
||||
type:
|
||||
scalar: string
|
||||
default: Equal
|
||||
- name: tolerationSeconds
|
||||
type:
|
||||
scalar: numeric
|
||||
- name: value
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1beta1.NetworkDeviceData
|
||||
map:
|
||||
fields:
|
||||
|
@ -28,6 +28,7 @@ import (
|
||||
type BasicDeviceApplyConfiguration struct {
|
||||
Attributes map[resourcev1alpha3.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"`
|
||||
Capacity map[resourcev1alpha3.QualifiedName]resource.Quantity `json:"capacity,omitempty"`
|
||||
Taints []DeviceTaintApplyConfiguration `json:"taints,omitempty"`
|
||||
}
|
||||
|
||||
// BasicDeviceApplyConfiguration constructs a declarative configuration of the BasicDevice type for use with
|
||||
@ -63,3 +64,16 @@ func (b *BasicDeviceApplyConfiguration) WithCapacity(entries map[resourcev1alpha
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTaints adds the given value to the Taints 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 Taints field.
|
||||
func (b *BasicDeviceApplyConfiguration) WithTaints(values ...*DeviceTaintApplyConfiguration) *BasicDeviceApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTaints")
|
||||
}
|
||||
b.Taints = append(b.Taints, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ type DeviceRequestApplyConfiguration struct {
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
FirstAvailable []DeviceSubRequestApplyConfiguration `json:"firstAvailable,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestApplyConfiguration constructs a declarative configuration of the DeviceRequest type for use with
|
||||
@ -105,3 +106,16 @@ func (b *DeviceRequestApplyConfiguration) WithFirstAvailable(values ...*DeviceSu
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations 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 Tolerations field.
|
||||
func (b *DeviceRequestApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceRequestApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -21,11 +21,12 @@ package v1alpha3
|
||||
// DeviceRequestAllocationResultApplyConfiguration represents a declarative configuration of the DeviceRequestAllocationResult type for use
|
||||
// with apply.
|
||||
type DeviceRequestAllocationResultApplyConfiguration struct {
|
||||
Request *string `json:"request,omitempty"`
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
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"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with
|
||||
@ -73,3 +74,16 @@ func (b *DeviceRequestAllocationResultApplyConfiguration) WithAdminAccess(value
|
||||
b.AdminAccess = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations 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 Tolerations field.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ type DeviceSubRequestApplyConfiguration struct {
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1alpha3.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceSubRequestApplyConfiguration constructs a declarative configuration of the DeviceSubRequest type for use with
|
||||
@ -82,3 +83,16 @@ func (b *DeviceSubRequestApplyConfiguration) WithCount(value int64) *DeviceSubRe
|
||||
b.Count = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations 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 Tolerations field.
|
||||
func (b *DeviceSubRequestApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceSubRequestApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
71
applyconfigurations/resource/v1alpha3/devicetaint.go
Normal file
71
applyconfigurations/resource/v1alpha3/devicetaint.go
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// DeviceTaintApplyConfiguration represents a declarative configuration of the DeviceTaint type for use
|
||||
// with apply.
|
||||
type DeviceTaintApplyConfiguration struct {
|
||||
Key *string `json:"key,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
Effect *resourcev1alpha3.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
TimeAdded *v1.Time `json:"timeAdded,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintApplyConfiguration constructs a declarative configuration of the DeviceTaint type for use with
|
||||
// apply.
|
||||
func DeviceTaint() *DeviceTaintApplyConfiguration {
|
||||
return &DeviceTaintApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKey sets the Key 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 Key field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithKey(value string) *DeviceTaintApplyConfiguration {
|
||||
b.Key = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value 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 Value field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithValue(value string) *DeviceTaintApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEffect sets the Effect 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 Effect field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithEffect(value resourcev1alpha3.DeviceTaintEffect) *DeviceTaintApplyConfiguration {
|
||||
b.Effect = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTimeAdded sets the TimeAdded 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 TimeAdded field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithTimeAdded(value v1.Time) *DeviceTaintApplyConfiguration {
|
||||
b.TimeAdded = &value
|
||||
return b
|
||||
}
|
253
applyconfigurations/resource/v1alpha3/devicetaintrule.go
Normal file
253
applyconfigurations/resource/v1alpha3/devicetaintrule.go
Normal 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 v1alpha3
|
||||
|
||||
import (
|
||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// DeviceTaintRuleApplyConfiguration represents a declarative configuration of the DeviceTaintRule type for use
|
||||
// with apply.
|
||||
type DeviceTaintRuleApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
||||
Spec *DeviceTaintRuleSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintRule constructs a declarative configuration of the DeviceTaintRule type for use with
|
||||
// apply.
|
||||
func DeviceTaintRule(name string) *DeviceTaintRuleApplyConfiguration {
|
||||
b := &DeviceTaintRuleApplyConfiguration{}
|
||||
b.WithName(name)
|
||||
b.WithKind("DeviceTaintRule")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha3")
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractDeviceTaintRule extracts the applied configuration owned by fieldManager from
|
||||
// deviceTaintRule. If no managedFields are found in deviceTaintRule for fieldManager, a
|
||||
// DeviceTaintRuleApplyConfiguration 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.
|
||||
// deviceTaintRule must be a unmodified DeviceTaintRule API object that was retrieved from the Kubernetes API.
|
||||
// ExtractDeviceTaintRule 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 ExtractDeviceTaintRule(deviceTaintRule *resourcev1alpha3.DeviceTaintRule, fieldManager string) (*DeviceTaintRuleApplyConfiguration, error) {
|
||||
return extractDeviceTaintRule(deviceTaintRule, fieldManager, "")
|
||||
}
|
||||
|
||||
// ExtractDeviceTaintRuleStatus is the same as ExtractDeviceTaintRule except
|
||||
// that it extracts the status subresource applied configuration.
|
||||
// Experimental!
|
||||
func ExtractDeviceTaintRuleStatus(deviceTaintRule *resourcev1alpha3.DeviceTaintRule, fieldManager string) (*DeviceTaintRuleApplyConfiguration, error) {
|
||||
return extractDeviceTaintRule(deviceTaintRule, fieldManager, "status")
|
||||
}
|
||||
|
||||
func extractDeviceTaintRule(deviceTaintRule *resourcev1alpha3.DeviceTaintRule, fieldManager string, subresource string) (*DeviceTaintRuleApplyConfiguration, error) {
|
||||
b := &DeviceTaintRuleApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(deviceTaintRule, internal.Parser().Type("io.k8s.api.resource.v1alpha3.DeviceTaintRule"), fieldManager, b, subresource)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(deviceTaintRule.Name)
|
||||
|
||||
b.WithKind("DeviceTaintRule")
|
||||
b.WithAPIVersion("resource.k8s.io/v1alpha3")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) WithKind(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithAPIVersion(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithName(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithGenerateName(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithNamespace(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithUID(value types.UID) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithResourceVersion(value string) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithGeneration(value int64) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithLabels(entries map[string]string) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithAnnotations(entries map[string]string) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DeviceTaintRuleApplyConfiguration {
|
||||
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 *DeviceTaintRuleApplyConfiguration) WithFinalizers(values ...string) *DeviceTaintRuleApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func (b *DeviceTaintRuleApplyConfiguration) 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 *DeviceTaintRuleApplyConfiguration) WithSpec(value *DeviceTaintRuleSpecApplyConfiguration) *DeviceTaintRuleApplyConfiguration {
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *DeviceTaintRuleApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
48
applyconfigurations/resource/v1alpha3/devicetaintrulespec.go
Normal file
48
applyconfigurations/resource/v1alpha3/devicetaintrulespec.go
Normal 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 v1alpha3
|
||||
|
||||
// DeviceTaintRuleSpecApplyConfiguration represents a declarative configuration of the DeviceTaintRuleSpec type for use
|
||||
// with apply.
|
||||
type DeviceTaintRuleSpecApplyConfiguration struct {
|
||||
DeviceSelector *DeviceTaintSelectorApplyConfiguration `json:"deviceSelector,omitempty"`
|
||||
Taint *DeviceTaintApplyConfiguration `json:"taint,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintRuleSpecApplyConfiguration constructs a declarative configuration of the DeviceTaintRuleSpec type for use with
|
||||
// apply.
|
||||
func DeviceTaintRuleSpec() *DeviceTaintRuleSpecApplyConfiguration {
|
||||
return &DeviceTaintRuleSpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithDeviceSelector sets the DeviceSelector 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 DeviceSelector field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleSpecApplyConfiguration) WithDeviceSelector(value *DeviceTaintSelectorApplyConfiguration) *DeviceTaintRuleSpecApplyConfiguration {
|
||||
b.DeviceSelector = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTaint sets the Taint 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 Taint field is set to the value of the last call.
|
||||
func (b *DeviceTaintRuleSpecApplyConfiguration) WithTaint(value *DeviceTaintApplyConfiguration) *DeviceTaintRuleSpecApplyConfiguration {
|
||||
b.Taint = value
|
||||
return b
|
||||
}
|
80
applyconfigurations/resource/v1alpha3/devicetaintselector.go
Normal file
80
applyconfigurations/resource/v1alpha3/devicetaintselector.go
Normal file
@ -0,0 +1,80 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
// DeviceTaintSelectorApplyConfiguration represents a declarative configuration of the DeviceTaintSelector type for use
|
||||
// with apply.
|
||||
type DeviceTaintSelectorApplyConfiguration struct {
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintSelectorApplyConfiguration constructs a declarative configuration of the DeviceTaintSelector type for use with
|
||||
// apply.
|
||||
func DeviceTaintSelector() *DeviceTaintSelectorApplyConfiguration {
|
||||
return &DeviceTaintSelectorApplyConfiguration{}
|
||||
}
|
||||
|
||||
// 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 *DeviceTaintSelectorApplyConfiguration) WithDeviceClassName(value string) *DeviceTaintSelectorApplyConfiguration {
|
||||
b.DeviceClassName = &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 *DeviceTaintSelectorApplyConfiguration) WithDriver(value string) *DeviceTaintSelectorApplyConfiguration {
|
||||
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 *DeviceTaintSelectorApplyConfiguration) WithPool(value string) *DeviceTaintSelectorApplyConfiguration {
|
||||
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 *DeviceTaintSelectorApplyConfiguration) WithDevice(value string) *DeviceTaintSelectorApplyConfiguration {
|
||||
b.Device = &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 *DeviceTaintSelectorApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceTaintSelectorApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithSelectors")
|
||||
}
|
||||
b.Selectors = append(b.Selectors, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
79
applyconfigurations/resource/v1alpha3/devicetoleration.go
Normal file
79
applyconfigurations/resource/v1alpha3/devicetoleration.go
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
)
|
||||
|
||||
// DeviceTolerationApplyConfiguration represents a declarative configuration of the DeviceToleration type for use
|
||||
// with apply.
|
||||
type DeviceTolerationApplyConfiguration struct {
|
||||
Key *string `json:"key,omitempty"`
|
||||
Operator *resourcev1alpha3.DeviceTolerationOperator `json:"operator,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
Effect *resourcev1alpha3.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTolerationApplyConfiguration constructs a declarative configuration of the DeviceToleration type for use with
|
||||
// apply.
|
||||
func DeviceToleration() *DeviceTolerationApplyConfiguration {
|
||||
return &DeviceTolerationApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKey sets the Key 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 Key field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithKey(value string) *DeviceTolerationApplyConfiguration {
|
||||
b.Key = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOperator sets the Operator 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 Operator field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithOperator(value resourcev1alpha3.DeviceTolerationOperator) *DeviceTolerationApplyConfiguration {
|
||||
b.Operator = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value 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 Value field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithValue(value string) *DeviceTolerationApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEffect sets the Effect 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 Effect field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithEffect(value resourcev1alpha3.DeviceTaintEffect) *DeviceTolerationApplyConfiguration {
|
||||
b.Effect = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerationSeconds sets the TolerationSeconds 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 TolerationSeconds field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithTolerationSeconds(value int64) *DeviceTolerationApplyConfiguration {
|
||||
b.TolerationSeconds = &value
|
||||
return b
|
||||
}
|
@ -27,6 +27,7 @@ import (
|
||||
type BasicDeviceApplyConfiguration struct {
|
||||
Attributes map[resourcev1beta1.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"`
|
||||
Capacity map[resourcev1beta1.QualifiedName]DeviceCapacityApplyConfiguration `json:"capacity,omitempty"`
|
||||
Taints []DeviceTaintApplyConfiguration `json:"taints,omitempty"`
|
||||
}
|
||||
|
||||
// BasicDeviceApplyConfiguration constructs a declarative configuration of the BasicDevice type for use with
|
||||
@ -62,3 +63,16 @@ func (b *BasicDeviceApplyConfiguration) WithCapacity(entries map[resourcev1beta1
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTaints adds the given value to the Taints 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 Taints field.
|
||||
func (b *BasicDeviceApplyConfiguration) WithTaints(values ...*DeviceTaintApplyConfiguration) *BasicDeviceApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTaints")
|
||||
}
|
||||
b.Taints = append(b.Taints, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ type DeviceRequestApplyConfiguration struct {
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
FirstAvailable []DeviceSubRequestApplyConfiguration `json:"firstAvailable,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestApplyConfiguration constructs a declarative configuration of the DeviceRequest type for use with
|
||||
@ -105,3 +106,16 @@ func (b *DeviceRequestApplyConfiguration) WithFirstAvailable(values ...*DeviceSu
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations 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 Tolerations field.
|
||||
func (b *DeviceRequestApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceRequestApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -21,11 +21,12 @@ 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"`
|
||||
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"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with
|
||||
@ -73,3 +74,16 @@ func (b *DeviceRequestAllocationResultApplyConfiguration) WithAdminAccess(value
|
||||
b.AdminAccess = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations 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 Tolerations field.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ type DeviceSubRequestApplyConfiguration struct {
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1beta1.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceSubRequestApplyConfiguration constructs a declarative configuration of the DeviceSubRequest type for use with
|
||||
@ -82,3 +83,16 @@ func (b *DeviceSubRequestApplyConfiguration) WithCount(value int64) *DeviceSubRe
|
||||
b.Count = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerations adds the given value to the Tolerations 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 Tolerations field.
|
||||
func (b *DeviceSubRequestApplyConfiguration) WithTolerations(values ...*DeviceTolerationApplyConfiguration) *DeviceSubRequestApplyConfiguration {
|
||||
for i := range values {
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithTolerations")
|
||||
}
|
||||
b.Tolerations = append(b.Tolerations, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
71
applyconfigurations/resource/v1beta1/devicetaint.go
Normal file
71
applyconfigurations/resource/v1beta1/devicetaint.go
Normal file
@ -0,0 +1,71 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
resourcev1beta1 "k8s.io/api/resource/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// DeviceTaintApplyConfiguration represents a declarative configuration of the DeviceTaint type for use
|
||||
// with apply.
|
||||
type DeviceTaintApplyConfiguration struct {
|
||||
Key *string `json:"key,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
Effect *resourcev1beta1.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
TimeAdded *v1.Time `json:"timeAdded,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTaintApplyConfiguration constructs a declarative configuration of the DeviceTaint type for use with
|
||||
// apply.
|
||||
func DeviceTaint() *DeviceTaintApplyConfiguration {
|
||||
return &DeviceTaintApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKey sets the Key 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 Key field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithKey(value string) *DeviceTaintApplyConfiguration {
|
||||
b.Key = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value 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 Value field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithValue(value string) *DeviceTaintApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEffect sets the Effect 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 Effect field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithEffect(value resourcev1beta1.DeviceTaintEffect) *DeviceTaintApplyConfiguration {
|
||||
b.Effect = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTimeAdded sets the TimeAdded 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 TimeAdded field is set to the value of the last call.
|
||||
func (b *DeviceTaintApplyConfiguration) WithTimeAdded(value v1.Time) *DeviceTaintApplyConfiguration {
|
||||
b.TimeAdded = &value
|
||||
return b
|
||||
}
|
79
applyconfigurations/resource/v1beta1/devicetoleration.go
Normal file
79
applyconfigurations/resource/v1beta1/devicetoleration.go
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
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"
|
||||
)
|
||||
|
||||
// DeviceTolerationApplyConfiguration represents a declarative configuration of the DeviceToleration type for use
|
||||
// with apply.
|
||||
type DeviceTolerationApplyConfiguration struct {
|
||||
Key *string `json:"key,omitempty"`
|
||||
Operator *resourcev1beta1.DeviceTolerationOperator `json:"operator,omitempty"`
|
||||
Value *string `json:"value,omitempty"`
|
||||
Effect *resourcev1beta1.DeviceTaintEffect `json:"effect,omitempty"`
|
||||
TolerationSeconds *int64 `json:"tolerationSeconds,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceTolerationApplyConfiguration constructs a declarative configuration of the DeviceToleration type for use with
|
||||
// apply.
|
||||
func DeviceToleration() *DeviceTolerationApplyConfiguration {
|
||||
return &DeviceTolerationApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithKey sets the Key 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 Key field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithKey(value string) *DeviceTolerationApplyConfiguration {
|
||||
b.Key = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithOperator sets the Operator 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 Operator field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithOperator(value resourcev1beta1.DeviceTolerationOperator) *DeviceTolerationApplyConfiguration {
|
||||
b.Operator = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValue sets the Value 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 Value field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithValue(value string) *DeviceTolerationApplyConfiguration {
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithEffect sets the Effect 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 Effect field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithEffect(value resourcev1beta1.DeviceTaintEffect) *DeviceTolerationApplyConfiguration {
|
||||
b.Effect = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithTolerationSeconds sets the TolerationSeconds 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 TolerationSeconds field is set to the value of the last call.
|
||||
func (b *DeviceTolerationApplyConfiguration) WithTolerationSeconds(value int64) *DeviceTolerationApplyConfiguration {
|
||||
b.TolerationSeconds = &value
|
||||
return b
|
||||
}
|
@ -1642,6 +1642,16 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSubRequest"):
|
||||
return &resourcev1alpha3.DeviceSubRequestApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaint"):
|
||||
return &resourcev1alpha3.DeviceTaintApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRule"):
|
||||
return &resourcev1alpha3.DeviceTaintRuleApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRuleSpec"):
|
||||
return &resourcev1alpha3.DeviceTaintRuleSpecApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintSelector"):
|
||||
return &resourcev1alpha3.DeviceTaintSelectorApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceToleration"):
|
||||
return &resourcev1alpha3.DeviceTolerationApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("NetworkDeviceData"):
|
||||
return &resourcev1alpha3.NetworkDeviceDataApplyConfiguration{}
|
||||
case v1alpha3.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
|
||||
@ -1706,6 +1716,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationsresourcev1beta1.DeviceSelectorApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceSubRequest"):
|
||||
return &applyconfigurationsresourcev1beta1.DeviceSubRequestApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceTaint"):
|
||||
return &applyconfigurationsresourcev1beta1.DeviceTaintApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("DeviceToleration"):
|
||||
return &applyconfigurationsresourcev1beta1.DeviceTolerationApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("NetworkDeviceData"):
|
||||
return &applyconfigurationsresourcev1beta1.NetworkDeviceDataApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
|
||||
|
@ -387,6 +387,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
// Group=resource.k8s.io, Version=v1alpha3
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("deviceclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().DeviceClasses().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("devicetaintrules"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().DeviceTaintRules().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("resourceclaims"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaims().Informer()}, nil
|
||||
case v1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
|
||||
|
101
informers/resource/v1alpha3/devicetaintrule.go
Normal file
101
informers/resource/v1alpha3/devicetaintrule.go
Normal file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
apiresourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
resourcev1alpha3 "k8s.io/client-go/listers/resource/v1alpha3"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// DeviceTaintRuleInformer provides access to a shared informer and lister for
|
||||
// DeviceTaintRules.
|
||||
type DeviceTaintRuleInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() resourcev1alpha3.DeviceTaintRuleLister
|
||||
}
|
||||
|
||||
type deviceTaintRuleInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewDeviceTaintRuleInformer constructs a new informer for DeviceTaintRule 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 NewDeviceTaintRuleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredDeviceTaintRuleInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredDeviceTaintRuleInformer constructs a new informer for DeviceTaintRule 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 NewFilteredDeviceTaintRuleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha3().DeviceTaintRules().List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha3().DeviceTaintRules().Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha3().DeviceTaintRules().List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha3().DeviceTaintRules().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&apiresourcev1alpha3.DeviceTaintRule{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *deviceTaintRuleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredDeviceTaintRuleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *deviceTaintRuleInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&apiresourcev1alpha3.DeviceTaintRule{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *deviceTaintRuleInformer) Lister() resourcev1alpha3.DeviceTaintRuleLister {
|
||||
return resourcev1alpha3.NewDeviceTaintRuleLister(f.Informer().GetIndexer())
|
||||
}
|
@ -26,6 +26,8 @@ import (
|
||||
type Interface interface {
|
||||
// DeviceClasses returns a DeviceClassInformer.
|
||||
DeviceClasses() DeviceClassInformer
|
||||
// DeviceTaintRules returns a DeviceTaintRuleInformer.
|
||||
DeviceTaintRules() DeviceTaintRuleInformer
|
||||
// ResourceClaims returns a ResourceClaimInformer.
|
||||
ResourceClaims() ResourceClaimInformer
|
||||
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
|
||||
@ -50,6 +52,11 @@ func (v *version) DeviceClasses() DeviceClassInformer {
|
||||
return &deviceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// DeviceTaintRules returns a DeviceTaintRuleInformer.
|
||||
func (v *version) DeviceTaintRules() DeviceTaintRuleInformer {
|
||||
return &deviceTaintRuleInformer{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}
|
||||
|
71
kubernetes/typed/resource/v1alpha3/devicetaintrule.go
Normal file
71
kubernetes/typed/resource/v1alpha3/devicetaintrule.go
Normal 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 v1alpha3
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
applyconfigurationsresourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
)
|
||||
|
||||
// DeviceTaintRulesGetter has a method to return a DeviceTaintRuleInterface.
|
||||
// A group's client should implement this interface.
|
||||
type DeviceTaintRulesGetter interface {
|
||||
DeviceTaintRules() DeviceTaintRuleInterface
|
||||
}
|
||||
|
||||
// DeviceTaintRuleInterface has methods to work with DeviceTaintRule resources.
|
||||
type DeviceTaintRuleInterface interface {
|
||||
Create(ctx context.Context, deviceTaintRule *resourcev1alpha3.DeviceTaintRule, opts v1.CreateOptions) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
Update(ctx context.Context, deviceTaintRule *resourcev1alpha3.DeviceTaintRule, opts v1.UpdateOptions) (*resourcev1alpha3.DeviceTaintRule, 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) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.DeviceTaintRuleList, 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 *resourcev1alpha3.DeviceTaintRule, err error)
|
||||
Apply(ctx context.Context, deviceTaintRule *applyconfigurationsresourcev1alpha3.DeviceTaintRuleApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.DeviceTaintRule, err error)
|
||||
DeviceTaintRuleExpansion
|
||||
}
|
||||
|
||||
// deviceTaintRules implements DeviceTaintRuleInterface
|
||||
type deviceTaintRules struct {
|
||||
*gentype.ClientWithListAndApply[*resourcev1alpha3.DeviceTaintRule, *resourcev1alpha3.DeviceTaintRuleList, *applyconfigurationsresourcev1alpha3.DeviceTaintRuleApplyConfiguration]
|
||||
}
|
||||
|
||||
// newDeviceTaintRules returns a DeviceTaintRules
|
||||
func newDeviceTaintRules(c *ResourceV1alpha3Client) *deviceTaintRules {
|
||||
return &deviceTaintRules{
|
||||
gentype.NewClientWithListAndApply[*resourcev1alpha3.DeviceTaintRule, *resourcev1alpha3.DeviceTaintRuleList, *applyconfigurationsresourcev1alpha3.DeviceTaintRuleApplyConfiguration](
|
||||
"devicetaintrules",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
"",
|
||||
func() *resourcev1alpha3.DeviceTaintRule { return &resourcev1alpha3.DeviceTaintRule{} },
|
||||
func() *resourcev1alpha3.DeviceTaintRuleList { return &resourcev1alpha3.DeviceTaintRuleList{} },
|
||||
gentype.PrefersProtobuf[*resourcev1alpha3.DeviceTaintRule](),
|
||||
),
|
||||
}
|
||||
}
|
@ -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 client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3"
|
||||
)
|
||||
|
||||
// fakeDeviceTaintRules implements DeviceTaintRuleInterface
|
||||
type fakeDeviceTaintRules struct {
|
||||
*gentype.FakeClientWithListAndApply[*v1alpha3.DeviceTaintRule, *v1alpha3.DeviceTaintRuleList, *resourcev1alpha3.DeviceTaintRuleApplyConfiguration]
|
||||
Fake *FakeResourceV1alpha3
|
||||
}
|
||||
|
||||
func newFakeDeviceTaintRules(fake *FakeResourceV1alpha3) typedresourcev1alpha3.DeviceTaintRuleInterface {
|
||||
return &fakeDeviceTaintRules{
|
||||
gentype.NewFakeClientWithListAndApply[*v1alpha3.DeviceTaintRule, *v1alpha3.DeviceTaintRuleList, *resourcev1alpha3.DeviceTaintRuleApplyConfiguration](
|
||||
fake.Fake,
|
||||
"",
|
||||
v1alpha3.SchemeGroupVersion.WithResource("devicetaintrules"),
|
||||
v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRule"),
|
||||
func() *v1alpha3.DeviceTaintRule { return &v1alpha3.DeviceTaintRule{} },
|
||||
func() *v1alpha3.DeviceTaintRuleList { return &v1alpha3.DeviceTaintRuleList{} },
|
||||
func(dst, src *v1alpha3.DeviceTaintRuleList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha3.DeviceTaintRuleList) []*v1alpha3.DeviceTaintRule {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1alpha3.DeviceTaintRuleList, items []*v1alpha3.DeviceTaintRule) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
}
|
@ -32,6 +32,10 @@ func (c *FakeResourceV1alpha3) DeviceClasses() v1alpha3.DeviceClassInterface {
|
||||
return newFakeDeviceClasses(c)
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha3) DeviceTaintRules() v1alpha3.DeviceTaintRuleInterface {
|
||||
return newFakeDeviceTaintRules(c)
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha3) ResourceClaims(namespace string) v1alpha3.ResourceClaimInterface {
|
||||
return newFakeResourceClaims(c, namespace)
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ package v1alpha3
|
||||
|
||||
type DeviceClassExpansion interface{}
|
||||
|
||||
type DeviceTaintRuleExpansion interface{}
|
||||
|
||||
type ResourceClaimExpansion interface{}
|
||||
|
||||
type ResourceClaimTemplateExpansion interface{}
|
||||
|
@ -29,6 +29,7 @@ import (
|
||||
type ResourceV1alpha3Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
DeviceClassesGetter
|
||||
DeviceTaintRulesGetter
|
||||
ResourceClaimsGetter
|
||||
ResourceClaimTemplatesGetter
|
||||
ResourceSlicesGetter
|
||||
@ -43,6 +44,10 @@ func (c *ResourceV1alpha3Client) DeviceClasses() DeviceClassInterface {
|
||||
return newDeviceClasses(c)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha3Client) DeviceTaintRules() DeviceTaintRuleInterface {
|
||||
return newDeviceTaintRules(c)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha3Client) ResourceClaims(namespace string) ResourceClaimInterface {
|
||||
return newResourceClaims(c, namespace)
|
||||
}
|
||||
|
48
listers/resource/v1alpha3/devicetaintrule.go
Normal file
48
listers/resource/v1alpha3/devicetaintrule.go
Normal 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 v1alpha3
|
||||
|
||||
import (
|
||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
listers "k8s.io/client-go/listers"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// DeviceTaintRuleLister helps list DeviceTaintRules.
|
||||
// All objects returned here must be treated as read-only.
|
||||
type DeviceTaintRuleLister interface {
|
||||
// List lists all DeviceTaintRules in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*resourcev1alpha3.DeviceTaintRule, err error)
|
||||
// Get retrieves the DeviceTaintRule from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*resourcev1alpha3.DeviceTaintRule, error)
|
||||
DeviceTaintRuleListerExpansion
|
||||
}
|
||||
|
||||
// deviceTaintRuleLister implements the DeviceTaintRuleLister interface.
|
||||
type deviceTaintRuleLister struct {
|
||||
listers.ResourceIndexer[*resourcev1alpha3.DeviceTaintRule]
|
||||
}
|
||||
|
||||
// NewDeviceTaintRuleLister returns a new DeviceTaintRuleLister.
|
||||
func NewDeviceTaintRuleLister(indexer cache.Indexer) DeviceTaintRuleLister {
|
||||
return &deviceTaintRuleLister{listers.New[*resourcev1alpha3.DeviceTaintRule](indexer, resourcev1alpha3.Resource("devicetaintrule"))}
|
||||
}
|
@ -22,6 +22,10 @@ package v1alpha3
|
||||
// DeviceClassLister.
|
||||
type DeviceClassListerExpansion interface{}
|
||||
|
||||
// DeviceTaintRuleListerExpansion allows custom methods to be added to
|
||||
// DeviceTaintRuleLister.
|
||||
type DeviceTaintRuleListerExpansion interface{}
|
||||
|
||||
// ResourceClaimListerExpansion allows custom methods to be added to
|
||||
// ResourceClaimLister.
|
||||
type ResourceClaimListerExpansion interface{}
|
||||
|
Loading…
Reference in New Issue
Block a user