mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-18 07:06:58 +00:00
KEP-5075: generated codes from make update
Signed-off-by: Sunyanan Choochotkaew <sunyanan.choochotkaew1@ibm.com> Kubernetes-commit: 59bba927178174041c5e72f60432e70c5db210bf
This commit is contained in:
parent
da11948805
commit
81902fe0fc
@ -12828,6 +12828,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: shareID
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1.AllocationResult
|
||||
map:
|
||||
fields:
|
||||
@ -12848,6 +12851,41 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.resource.v1.CapacityRequestPolicy
|
||||
map:
|
||||
fields:
|
||||
- name: default
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: validRange
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1.CapacityRequestPolicyRange
|
||||
- name: validValues
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1.CapacityRequestPolicyRange
|
||||
map:
|
||||
fields:
|
||||
- name: max
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: min
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: step
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: io.k8s.api.resource.v1.CapacityRequirements
|
||||
map:
|
||||
fields:
|
||||
- name: requests
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: io.k8s.api.resource.v1.Counter
|
||||
map:
|
||||
fields:
|
||||
@ -12872,6 +12910,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: allNodes
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: allowMultipleAllocations
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: attributes
|
||||
type:
|
||||
map:
|
||||
@ -12968,6 +13009,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: io.k8s.api.resource.v1.DeviceCapacity
|
||||
map:
|
||||
fields:
|
||||
- name: requestPolicy
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1.CapacityRequestPolicy
|
||||
- name: value
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
@ -13048,6 +13092,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: io.k8s.api.resource.v1.DeviceConstraint
|
||||
map:
|
||||
fields:
|
||||
- name: distinctAttribute
|
||||
type:
|
||||
scalar: string
|
||||
- name: matchAttribute
|
||||
type:
|
||||
scalar: string
|
||||
@ -13103,6 +13150,11 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
scalar: string
|
||||
elementRelationship: atomic
|
||||
- name: consumedCapacity
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: device
|
||||
type:
|
||||
scalar: string
|
||||
@ -13119,6 +13171,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: shareID
|
||||
type:
|
||||
scalar: string
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
@ -13137,6 +13192,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: allocationMode
|
||||
type:
|
||||
scalar: string
|
||||
- name: capacity
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1.CapacityRequirements
|
||||
- name: count
|
||||
type:
|
||||
scalar: numeric
|
||||
@ -13205,6 +13263,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: allocationMode
|
||||
type:
|
||||
scalar: string
|
||||
- name: capacity
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1.CapacityRequirements
|
||||
- name: count
|
||||
type:
|
||||
scalar: numeric
|
||||
@ -13311,6 +13372,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- driver
|
||||
- device
|
||||
- pool
|
||||
- shareID
|
||||
- name: reservedFor
|
||||
type:
|
||||
list:
|
||||
@ -13521,6 +13583,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: shareID
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1beta1.AllocationResult
|
||||
map:
|
||||
fields:
|
||||
@ -13540,6 +13605,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: allNodes
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: allowMultipleAllocations
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: attributes
|
||||
type:
|
||||
map:
|
||||
@ -13590,6 +13658,41 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.resource.v1beta1.CapacityRequestPolicy
|
||||
map:
|
||||
fields:
|
||||
- name: default
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: validRange
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1beta1.CapacityRequestPolicyRange
|
||||
- name: validValues
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta1.CapacityRequestPolicyRange
|
||||
map:
|
||||
fields:
|
||||
- name: max
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: min
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: step
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: io.k8s.api.resource.v1beta1.CapacityRequirements
|
||||
map:
|
||||
fields:
|
||||
- name: requests
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: io.k8s.api.resource.v1beta1.Counter
|
||||
map:
|
||||
fields:
|
||||
@ -13667,6 +13770,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: io.k8s.api.resource.v1beta1.DeviceCapacity
|
||||
map:
|
||||
fields:
|
||||
- name: requestPolicy
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1beta1.CapacityRequestPolicy
|
||||
- name: value
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
@ -13747,6 +13853,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: io.k8s.api.resource.v1beta1.DeviceConstraint
|
||||
map:
|
||||
fields:
|
||||
- name: distinctAttribute
|
||||
type:
|
||||
scalar: string
|
||||
- name: matchAttribute
|
||||
type:
|
||||
scalar: string
|
||||
@ -13777,6 +13886,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: allocationMode
|
||||
type:
|
||||
scalar: string
|
||||
- name: capacity
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1beta1.CapacityRequirements
|
||||
- name: count
|
||||
type:
|
||||
scalar: numeric
|
||||
@ -13824,6 +13936,11 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
scalar: string
|
||||
elementRelationship: atomic
|
||||
- name: consumedCapacity
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: device
|
||||
type:
|
||||
scalar: string
|
||||
@ -13840,6 +13957,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: shareID
|
||||
type:
|
||||
scalar: string
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
@ -13858,6 +13978,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: allocationMode
|
||||
type:
|
||||
scalar: string
|
||||
- name: capacity
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1beta1.CapacityRequirements
|
||||
- name: count
|
||||
type:
|
||||
scalar: numeric
|
||||
@ -14004,6 +14127,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- driver
|
||||
- device
|
||||
- pool
|
||||
- shareID
|
||||
- name: reservedFor
|
||||
type:
|
||||
list:
|
||||
@ -14136,6 +14260,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: shareID
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.resource.v1beta2.AllocationResult
|
||||
map:
|
||||
fields:
|
||||
@ -14156,6 +14283,41 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.resource.v1beta2.CapacityRequestPolicy
|
||||
map:
|
||||
fields:
|
||||
- name: default
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: validRange
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1beta2.CapacityRequestPolicyRange
|
||||
- name: validValues
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.resource.v1beta2.CapacityRequestPolicyRange
|
||||
map:
|
||||
fields:
|
||||
- name: max
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: min
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: step
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: io.k8s.api.resource.v1beta2.CapacityRequirements
|
||||
map:
|
||||
fields:
|
||||
- name: requests
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: io.k8s.api.resource.v1beta2.Counter
|
||||
map:
|
||||
fields:
|
||||
@ -14180,6 +14342,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: allNodes
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: allowMultipleAllocations
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: attributes
|
||||
type:
|
||||
map:
|
||||
@ -14276,6 +14441,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: io.k8s.api.resource.v1beta2.DeviceCapacity
|
||||
map:
|
||||
fields:
|
||||
- name: requestPolicy
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1beta2.CapacityRequestPolicy
|
||||
- name: value
|
||||
type:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
@ -14356,6 +14524,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: io.k8s.api.resource.v1beta2.DeviceConstraint
|
||||
map:
|
||||
fields:
|
||||
- name: distinctAttribute
|
||||
type:
|
||||
scalar: string
|
||||
- name: matchAttribute
|
||||
type:
|
||||
scalar: string
|
||||
@ -14411,6 +14582,11 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
scalar: string
|
||||
elementRelationship: atomic
|
||||
- name: consumedCapacity
|
||||
type:
|
||||
map:
|
||||
elementType:
|
||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
||||
- name: device
|
||||
type:
|
||||
scalar: string
|
||||
@ -14427,6 +14603,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: shareID
|
||||
type:
|
||||
scalar: string
|
||||
- name: tolerations
|
||||
type:
|
||||
list:
|
||||
@ -14445,6 +14624,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: allocationMode
|
||||
type:
|
||||
scalar: string
|
||||
- name: capacity
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1beta2.CapacityRequirements
|
||||
- name: count
|
||||
type:
|
||||
scalar: numeric
|
||||
@ -14513,6 +14695,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: allocationMode
|
||||
type:
|
||||
scalar: string
|
||||
- name: capacity
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1beta2.CapacityRequirements
|
||||
- name: count
|
||||
type:
|
||||
scalar: numeric
|
||||
@ -14619,6 +14804,7 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- driver
|
||||
- device
|
||||
- pool
|
||||
- shareID
|
||||
- name: reservedFor
|
||||
type:
|
||||
list:
|
||||
|
@ -29,6 +29,7 @@ type AllocatedDeviceStatusApplyConfiguration struct {
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
ShareID *string `json:"shareID,omitempty"`
|
||||
Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
Data *runtime.RawExtension `json:"data,omitempty"`
|
||||
NetworkData *NetworkDeviceDataApplyConfiguration `json:"networkData,omitempty"`
|
||||
@ -64,6 +65,14 @@ func (b *AllocatedDeviceStatusApplyConfiguration) WithDevice(value string) *Allo
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShareID sets the ShareID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ShareID field is set to the value of the last call.
|
||||
func (b *AllocatedDeviceStatusApplyConfiguration) WithShareID(value string) *AllocatedDeviceStatusApplyConfiguration {
|
||||
b.ShareID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConditions adds the given value to the Conditions field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Conditions field.
|
||||
|
63
applyconfigurations/resource/v1/capacityrequestpolicy.go
Normal file
63
applyconfigurations/resource/v1/capacityrequestpolicy.go
Normal 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 v1
|
||||
|
||||
import (
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// CapacityRequestPolicyApplyConfiguration represents a declarative configuration of the CapacityRequestPolicy type for use
|
||||
// with apply.
|
||||
type CapacityRequestPolicyApplyConfiguration struct {
|
||||
Default *resource.Quantity `json:"default,omitempty"`
|
||||
ValidValues []resource.Quantity `json:"validValues,omitempty"`
|
||||
ValidRange *CapacityRequestPolicyRangeApplyConfiguration `json:"validRange,omitempty"`
|
||||
}
|
||||
|
||||
// CapacityRequestPolicyApplyConfiguration constructs a declarative configuration of the CapacityRequestPolicy type for use with
|
||||
// apply.
|
||||
func CapacityRequestPolicy() *CapacityRequestPolicyApplyConfiguration {
|
||||
return &CapacityRequestPolicyApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithDefault sets the Default field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Default field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyApplyConfiguration) WithDefault(value resource.Quantity) *CapacityRequestPolicyApplyConfiguration {
|
||||
b.Default = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValidValues adds the given value to the ValidValues 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 ValidValues field.
|
||||
func (b *CapacityRequestPolicyApplyConfiguration) WithValidValues(values ...resource.Quantity) *CapacityRequestPolicyApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ValidValues = append(b.ValidValues, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValidRange sets the ValidRange field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ValidRange field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyApplyConfiguration) WithValidRange(value *CapacityRequestPolicyRangeApplyConfiguration) *CapacityRequestPolicyApplyConfiguration {
|
||||
b.ValidRange = value
|
||||
return b
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
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 v1
|
||||
|
||||
import (
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// CapacityRequestPolicyRangeApplyConfiguration represents a declarative configuration of the CapacityRequestPolicyRange type for use
|
||||
// with apply.
|
||||
type CapacityRequestPolicyRangeApplyConfiguration struct {
|
||||
Min *resource.Quantity `json:"min,omitempty"`
|
||||
Max *resource.Quantity `json:"max,omitempty"`
|
||||
Step *resource.Quantity `json:"step,omitempty"`
|
||||
}
|
||||
|
||||
// CapacityRequestPolicyRangeApplyConfiguration constructs a declarative configuration of the CapacityRequestPolicyRange type for use with
|
||||
// apply.
|
||||
func CapacityRequestPolicyRange() *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
return &CapacityRequestPolicyRangeApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithMin sets the Min field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Min field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyRangeApplyConfiguration) WithMin(value resource.Quantity) *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
b.Min = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMax sets the Max field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Max field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyRangeApplyConfiguration) WithMax(value resource.Quantity) *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
b.Max = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStep sets the Step field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Step field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyRangeApplyConfiguration) WithStep(value resource.Quantity) *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
b.Step = &value
|
||||
return b
|
||||
}
|
50
applyconfigurations/resource/v1/capacityrequirements.go
Normal file
50
applyconfigurations/resource/v1/capacityrequirements.go
Normal 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 v1
|
||||
|
||||
import (
|
||||
resourcev1 "k8s.io/api/resource/v1"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// CapacityRequirementsApplyConfiguration represents a declarative configuration of the CapacityRequirements type for use
|
||||
// with apply.
|
||||
type CapacityRequirementsApplyConfiguration struct {
|
||||
Requests map[resourcev1.QualifiedName]resource.Quantity `json:"requests,omitempty"`
|
||||
}
|
||||
|
||||
// CapacityRequirementsApplyConfiguration constructs a declarative configuration of the CapacityRequirements type for use with
|
||||
// apply.
|
||||
func CapacityRequirements() *CapacityRequirementsApplyConfiguration {
|
||||
return &CapacityRequirementsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithRequests puts the entries into 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, the entries provided by each call will be put on the Requests field,
|
||||
// overwriting an existing map entries in Requests field with the same key.
|
||||
func (b *CapacityRequirementsApplyConfiguration) WithRequests(entries map[resourcev1.QualifiedName]resource.Quantity) *CapacityRequirementsApplyConfiguration {
|
||||
if b.Requests == nil && len(entries) > 0 {
|
||||
b.Requests = make(map[resourcev1.QualifiedName]resource.Quantity, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Requests[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
@ -37,6 +37,7 @@ type DeviceApplyConfiguration struct {
|
||||
BindsToNode *bool `json:"bindsToNode,omitempty"`
|
||||
BindingConditions []string `json:"bindingConditions,omitempty"`
|
||||
BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"`
|
||||
AllowMultipleAllocations *bool `json:"allowMultipleAllocations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceApplyConfiguration constructs a declarative configuration of the Device type for use with
|
||||
@ -158,3 +159,11 @@ func (b *DeviceApplyConfiguration) WithBindingFailureConditions(values ...string
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAllowMultipleAllocations sets the AllowMultipleAllocations field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AllowMultipleAllocations field is set to the value of the last call.
|
||||
func (b *DeviceApplyConfiguration) WithAllowMultipleAllocations(value bool) *DeviceApplyConfiguration {
|
||||
b.AllowMultipleAllocations = &value
|
||||
return b
|
||||
}
|
||||
|
@ -25,7 +25,8 @@ import (
|
||||
// DeviceCapacityApplyConfiguration represents a declarative configuration of the DeviceCapacity type for use
|
||||
// with apply.
|
||||
type DeviceCapacityApplyConfiguration struct {
|
||||
Value *resource.Quantity `json:"value,omitempty"`
|
||||
Value *resource.Quantity `json:"value,omitempty"`
|
||||
RequestPolicy *CapacityRequestPolicyApplyConfiguration `json:"requestPolicy,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceCapacityApplyConfiguration constructs a declarative configuration of the DeviceCapacity type for use with
|
||||
@ -41,3 +42,11 @@ func (b *DeviceCapacityApplyConfiguration) WithValue(value resource.Quantity) *D
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRequestPolicy sets the RequestPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RequestPolicy field is set to the value of the last call.
|
||||
func (b *DeviceCapacityApplyConfiguration) WithRequestPolicy(value *CapacityRequestPolicyApplyConfiguration) *DeviceCapacityApplyConfiguration {
|
||||
b.RequestPolicy = value
|
||||
return b
|
||||
}
|
||||
|
@ -25,8 +25,9 @@ import (
|
||||
// DeviceConstraintApplyConfiguration represents a declarative configuration of the DeviceConstraint type for use
|
||||
// with apply.
|
||||
type DeviceConstraintApplyConfiguration struct {
|
||||
Requests []string `json:"requests,omitempty"`
|
||||
MatchAttribute *resourcev1.FullyQualifiedName `json:"matchAttribute,omitempty"`
|
||||
Requests []string `json:"requests,omitempty"`
|
||||
MatchAttribute *resourcev1.FullyQualifiedName `json:"matchAttribute,omitempty"`
|
||||
DistinctAttribute *resourcev1.FullyQualifiedName `json:"distinctAttribute,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceConstraintApplyConfiguration constructs a declarative configuration of the DeviceConstraint type for use with
|
||||
@ -52,3 +53,11 @@ func (b *DeviceConstraintApplyConfiguration) WithMatchAttribute(value resourcev1
|
||||
b.MatchAttribute = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDistinctAttribute sets the DistinctAttribute field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DistinctAttribute field is set to the value of the last call.
|
||||
func (b *DeviceConstraintApplyConfiguration) WithDistinctAttribute(value resourcev1.FullyQualifiedName) *DeviceConstraintApplyConfiguration {
|
||||
b.DistinctAttribute = &value
|
||||
return b
|
||||
}
|
||||
|
@ -18,17 +18,25 @@ limitations under the License.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
resourcev1 "k8s.io/api/resource/v1"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
// 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"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
BindingConditions []string `json:"bindingConditions,omitempty"`
|
||||
BindingFailureConditions []string `json:"bindingFailureConditions,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"`
|
||||
BindingConditions []string `json:"bindingConditions,omitempty"`
|
||||
BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"`
|
||||
ShareID *types.UID `json:"shareID,omitempty"`
|
||||
ConsumedCapacity map[resourcev1.QualifiedName]resource.Quantity `json:"consumedCapacity,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with
|
||||
@ -109,3 +117,25 @@ func (b *DeviceRequestAllocationResultApplyConfiguration) WithBindingFailureCond
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShareID sets the ShareID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ShareID field is set to the value of the last call.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithShareID(value types.UID) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
b.ShareID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConsumedCapacity puts the entries into the ConsumedCapacity 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 ConsumedCapacity field,
|
||||
// overwriting an existing map entries in ConsumedCapacity field with the same key.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithConsumedCapacity(entries map[resourcev1.QualifiedName]resource.Quantity) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
if b.ConsumedCapacity == nil && len(entries) > 0 {
|
||||
b.ConsumedCapacity = make(map[resourcev1.QualifiedName]resource.Quantity, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ConsumedCapacity[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -25,12 +25,13 @@ import (
|
||||
// DeviceSubRequestApplyConfiguration represents a declarative configuration of the DeviceSubRequest type for use
|
||||
// with apply.
|
||||
type DeviceSubRequestApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
Capacity *CapacityRequirementsApplyConfiguration `json:"capacity,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceSubRequestApplyConfiguration constructs a declarative configuration of the DeviceSubRequest type for use with
|
||||
@ -96,3 +97,11 @@ func (b *DeviceSubRequestApplyConfiguration) WithTolerations(values ...*DeviceTo
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCapacity sets the Capacity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Capacity field is set to the value of the last call.
|
||||
func (b *DeviceSubRequestApplyConfiguration) WithCapacity(value *CapacityRequirementsApplyConfiguration) *DeviceSubRequestApplyConfiguration {
|
||||
b.Capacity = value
|
||||
return b
|
||||
}
|
||||
|
@ -25,12 +25,13 @@ import (
|
||||
// ExactDeviceRequestApplyConfiguration represents a declarative configuration of the ExactDeviceRequest type for use
|
||||
// with apply.
|
||||
type ExactDeviceRequestApplyConfiguration struct {
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
Capacity *CapacityRequirementsApplyConfiguration `json:"capacity,omitempty"`
|
||||
}
|
||||
|
||||
// ExactDeviceRequestApplyConfiguration constructs a declarative configuration of the ExactDeviceRequest type for use with
|
||||
@ -96,3 +97,11 @@ func (b *ExactDeviceRequestApplyConfiguration) WithTolerations(values ...*Device
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCapacity sets the Capacity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Capacity field is set to the value of the last call.
|
||||
func (b *ExactDeviceRequestApplyConfiguration) WithCapacity(value *CapacityRequirementsApplyConfiguration) *ExactDeviceRequestApplyConfiguration {
|
||||
b.Capacity = value
|
||||
return b
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ type AllocatedDeviceStatusApplyConfiguration struct {
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
ShareID *string `json:"shareID,omitempty"`
|
||||
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
Data *runtime.RawExtension `json:"data,omitempty"`
|
||||
NetworkData *NetworkDeviceDataApplyConfiguration `json:"networkData,omitempty"`
|
||||
@ -64,6 +65,14 @@ func (b *AllocatedDeviceStatusApplyConfiguration) WithDevice(value string) *Allo
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShareID sets the ShareID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ShareID field is set to the value of the last call.
|
||||
func (b *AllocatedDeviceStatusApplyConfiguration) WithShareID(value string) *AllocatedDeviceStatusApplyConfiguration {
|
||||
b.ShareID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConditions adds the given value to the Conditions field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Conditions field.
|
||||
|
@ -36,6 +36,7 @@ type BasicDeviceApplyConfiguration struct {
|
||||
BindsToNode *bool `json:"bindsToNode,omitempty"`
|
||||
BindingConditions []string `json:"bindingConditions,omitempty"`
|
||||
BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"`
|
||||
AllowMultipleAllocations *bool `json:"allowMultipleAllocations,omitempty"`
|
||||
}
|
||||
|
||||
// BasicDeviceApplyConfiguration constructs a declarative configuration of the BasicDevice type for use with
|
||||
@ -149,3 +150,11 @@ func (b *BasicDeviceApplyConfiguration) WithBindingFailureConditions(values ...s
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAllowMultipleAllocations sets the AllowMultipleAllocations field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AllowMultipleAllocations field is set to the value of the last call.
|
||||
func (b *BasicDeviceApplyConfiguration) WithAllowMultipleAllocations(value bool) *BasicDeviceApplyConfiguration {
|
||||
b.AllowMultipleAllocations = &value
|
||||
return b
|
||||
}
|
||||
|
@ -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 (
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// CapacityRequestPolicyApplyConfiguration represents a declarative configuration of the CapacityRequestPolicy type for use
|
||||
// with apply.
|
||||
type CapacityRequestPolicyApplyConfiguration struct {
|
||||
Default *resource.Quantity `json:"default,omitempty"`
|
||||
ValidValues []resource.Quantity `json:"validValues,omitempty"`
|
||||
ValidRange *CapacityRequestPolicyRangeApplyConfiguration `json:"validRange,omitempty"`
|
||||
}
|
||||
|
||||
// CapacityRequestPolicyApplyConfiguration constructs a declarative configuration of the CapacityRequestPolicy type for use with
|
||||
// apply.
|
||||
func CapacityRequestPolicy() *CapacityRequestPolicyApplyConfiguration {
|
||||
return &CapacityRequestPolicyApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithDefault sets the Default field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Default field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyApplyConfiguration) WithDefault(value resource.Quantity) *CapacityRequestPolicyApplyConfiguration {
|
||||
b.Default = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValidValues adds the given value to the ValidValues 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 ValidValues field.
|
||||
func (b *CapacityRequestPolicyApplyConfiguration) WithValidValues(values ...resource.Quantity) *CapacityRequestPolicyApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ValidValues = append(b.ValidValues, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValidRange sets the ValidRange field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ValidRange field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyApplyConfiguration) WithValidRange(value *CapacityRequestPolicyRangeApplyConfiguration) *CapacityRequestPolicyApplyConfiguration {
|
||||
b.ValidRange = value
|
||||
return b
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
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 (
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// CapacityRequestPolicyRangeApplyConfiguration represents a declarative configuration of the CapacityRequestPolicyRange type for use
|
||||
// with apply.
|
||||
type CapacityRequestPolicyRangeApplyConfiguration struct {
|
||||
Min *resource.Quantity `json:"min,omitempty"`
|
||||
Max *resource.Quantity `json:"max,omitempty"`
|
||||
Step *resource.Quantity `json:"step,omitempty"`
|
||||
}
|
||||
|
||||
// CapacityRequestPolicyRangeApplyConfiguration constructs a declarative configuration of the CapacityRequestPolicyRange type for use with
|
||||
// apply.
|
||||
func CapacityRequestPolicyRange() *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
return &CapacityRequestPolicyRangeApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithMin sets the Min field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Min field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyRangeApplyConfiguration) WithMin(value resource.Quantity) *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
b.Min = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMax sets the Max field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Max field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyRangeApplyConfiguration) WithMax(value resource.Quantity) *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
b.Max = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStep sets the Step field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Step field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyRangeApplyConfiguration) WithStep(value resource.Quantity) *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
b.Step = &value
|
||||
return b
|
||||
}
|
50
applyconfigurations/resource/v1beta1/capacityrequirements.go
Normal file
50
applyconfigurations/resource/v1beta1/capacityrequirements.go
Normal 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
|
||||
|
||||
import (
|
||||
resourcev1beta1 "k8s.io/api/resource/v1beta1"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// CapacityRequirementsApplyConfiguration represents a declarative configuration of the CapacityRequirements type for use
|
||||
// with apply.
|
||||
type CapacityRequirementsApplyConfiguration struct {
|
||||
Requests map[resourcev1beta1.QualifiedName]resource.Quantity `json:"requests,omitempty"`
|
||||
}
|
||||
|
||||
// CapacityRequirementsApplyConfiguration constructs a declarative configuration of the CapacityRequirements type for use with
|
||||
// apply.
|
||||
func CapacityRequirements() *CapacityRequirementsApplyConfiguration {
|
||||
return &CapacityRequirementsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithRequests puts the entries into 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, the entries provided by each call will be put on the Requests field,
|
||||
// overwriting an existing map entries in Requests field with the same key.
|
||||
func (b *CapacityRequirementsApplyConfiguration) WithRequests(entries map[resourcev1beta1.QualifiedName]resource.Quantity) *CapacityRequirementsApplyConfiguration {
|
||||
if b.Requests == nil && len(entries) > 0 {
|
||||
b.Requests = make(map[resourcev1beta1.QualifiedName]resource.Quantity, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Requests[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
@ -25,7 +25,8 @@ import (
|
||||
// DeviceCapacityApplyConfiguration represents a declarative configuration of the DeviceCapacity type for use
|
||||
// with apply.
|
||||
type DeviceCapacityApplyConfiguration struct {
|
||||
Value *resource.Quantity `json:"value,omitempty"`
|
||||
Value *resource.Quantity `json:"value,omitempty"`
|
||||
RequestPolicy *CapacityRequestPolicyApplyConfiguration `json:"requestPolicy,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceCapacityApplyConfiguration constructs a declarative configuration of the DeviceCapacity type for use with
|
||||
@ -41,3 +42,11 @@ func (b *DeviceCapacityApplyConfiguration) WithValue(value resource.Quantity) *D
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRequestPolicy sets the RequestPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RequestPolicy field is set to the value of the last call.
|
||||
func (b *DeviceCapacityApplyConfiguration) WithRequestPolicy(value *CapacityRequestPolicyApplyConfiguration) *DeviceCapacityApplyConfiguration {
|
||||
b.RequestPolicy = value
|
||||
return b
|
||||
}
|
||||
|
@ -25,8 +25,9 @@ import (
|
||||
// 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"`
|
||||
Requests []string `json:"requests,omitempty"`
|
||||
MatchAttribute *resourcev1beta1.FullyQualifiedName `json:"matchAttribute,omitempty"`
|
||||
DistinctAttribute *resourcev1beta1.FullyQualifiedName `json:"distinctAttribute,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceConstraintApplyConfiguration constructs a declarative configuration of the DeviceConstraint type for use with
|
||||
@ -52,3 +53,11 @@ func (b *DeviceConstraintApplyConfiguration) WithMatchAttribute(value resourcev1
|
||||
b.MatchAttribute = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDistinctAttribute sets the DistinctAttribute field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DistinctAttribute field is set to the value of the last call.
|
||||
func (b *DeviceConstraintApplyConfiguration) WithDistinctAttribute(value resourcev1beta1.FullyQualifiedName) *DeviceConstraintApplyConfiguration {
|
||||
b.DistinctAttribute = &value
|
||||
return b
|
||||
}
|
||||
|
@ -25,14 +25,15 @@ import (
|
||||
// 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"`
|
||||
FirstAvailable []DeviceSubRequestApplyConfiguration `json:"firstAvailable,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
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"`
|
||||
FirstAvailable []DeviceSubRequestApplyConfiguration `json:"firstAvailable,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
Capacity *CapacityRequirementsApplyConfiguration `json:"capacity,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestApplyConfiguration constructs a declarative configuration of the DeviceRequest type for use with
|
||||
@ -119,3 +120,11 @@ func (b *DeviceRequestApplyConfiguration) WithTolerations(values ...*DeviceToler
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCapacity sets the Capacity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Capacity field is set to the value of the last call.
|
||||
func (b *DeviceRequestApplyConfiguration) WithCapacity(value *CapacityRequirementsApplyConfiguration) *DeviceRequestApplyConfiguration {
|
||||
b.Capacity = value
|
||||
return b
|
||||
}
|
||||
|
@ -18,17 +18,25 @@ limitations under the License.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
resourcev1beta1 "k8s.io/api/resource/v1beta1"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
// 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"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
BindingConditions []string `json:"bindingConditions,omitempty"`
|
||||
BindingFailureConditions []string `json:"bindingFailureConditions,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"`
|
||||
BindingConditions []string `json:"bindingConditions,omitempty"`
|
||||
BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"`
|
||||
ShareID *types.UID `json:"shareID,omitempty"`
|
||||
ConsumedCapacity map[resourcev1beta1.QualifiedName]resource.Quantity `json:"consumedCapacity,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with
|
||||
@ -109,3 +117,25 @@ func (b *DeviceRequestAllocationResultApplyConfiguration) WithBindingFailureCond
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShareID sets the ShareID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ShareID field is set to the value of the last call.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithShareID(value types.UID) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
b.ShareID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConsumedCapacity puts the entries into the ConsumedCapacity 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 ConsumedCapacity field,
|
||||
// overwriting an existing map entries in ConsumedCapacity field with the same key.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithConsumedCapacity(entries map[resourcev1beta1.QualifiedName]resource.Quantity) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
if b.ConsumedCapacity == nil && len(entries) > 0 {
|
||||
b.ConsumedCapacity = make(map[resourcev1beta1.QualifiedName]resource.Quantity, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ConsumedCapacity[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -25,12 +25,13 @@ import (
|
||||
// DeviceSubRequestApplyConfiguration represents a declarative configuration of the DeviceSubRequest type for use
|
||||
// with apply.
|
||||
type DeviceSubRequestApplyConfiguration 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"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
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"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
Capacity *CapacityRequirementsApplyConfiguration `json:"capacity,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceSubRequestApplyConfiguration constructs a declarative configuration of the DeviceSubRequest type for use with
|
||||
@ -96,3 +97,11 @@ func (b *DeviceSubRequestApplyConfiguration) WithTolerations(values ...*DeviceTo
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCapacity sets the Capacity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Capacity field is set to the value of the last call.
|
||||
func (b *DeviceSubRequestApplyConfiguration) WithCapacity(value *CapacityRequirementsApplyConfiguration) *DeviceSubRequestApplyConfiguration {
|
||||
b.Capacity = value
|
||||
return b
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ type AllocatedDeviceStatusApplyConfiguration struct {
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
ShareID *string `json:"shareID,omitempty"`
|
||||
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
||||
Data *runtime.RawExtension `json:"data,omitempty"`
|
||||
NetworkData *NetworkDeviceDataApplyConfiguration `json:"networkData,omitempty"`
|
||||
@ -64,6 +65,14 @@ func (b *AllocatedDeviceStatusApplyConfiguration) WithDevice(value string) *Allo
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShareID sets the ShareID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ShareID field is set to the value of the last call.
|
||||
func (b *AllocatedDeviceStatusApplyConfiguration) WithShareID(value string) *AllocatedDeviceStatusApplyConfiguration {
|
||||
b.ShareID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConditions adds the given value to the Conditions field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the Conditions field.
|
||||
|
@ -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 v1beta2
|
||||
|
||||
import (
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// CapacityRequestPolicyApplyConfiguration represents a declarative configuration of the CapacityRequestPolicy type for use
|
||||
// with apply.
|
||||
type CapacityRequestPolicyApplyConfiguration struct {
|
||||
Default *resource.Quantity `json:"default,omitempty"`
|
||||
ValidValues []resource.Quantity `json:"validValues,omitempty"`
|
||||
ValidRange *CapacityRequestPolicyRangeApplyConfiguration `json:"validRange,omitempty"`
|
||||
}
|
||||
|
||||
// CapacityRequestPolicyApplyConfiguration constructs a declarative configuration of the CapacityRequestPolicy type for use with
|
||||
// apply.
|
||||
func CapacityRequestPolicy() *CapacityRequestPolicyApplyConfiguration {
|
||||
return &CapacityRequestPolicyApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithDefault sets the Default field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Default field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyApplyConfiguration) WithDefault(value resource.Quantity) *CapacityRequestPolicyApplyConfiguration {
|
||||
b.Default = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValidValues adds the given value to the ValidValues 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 ValidValues field.
|
||||
func (b *CapacityRequestPolicyApplyConfiguration) WithValidValues(values ...resource.Quantity) *CapacityRequestPolicyApplyConfiguration {
|
||||
for i := range values {
|
||||
b.ValidValues = append(b.ValidValues, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithValidRange sets the ValidRange field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ValidRange field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyApplyConfiguration) WithValidRange(value *CapacityRequestPolicyRangeApplyConfiguration) *CapacityRequestPolicyApplyConfiguration {
|
||||
b.ValidRange = value
|
||||
return b
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
/*
|
||||
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 v1beta2
|
||||
|
||||
import (
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// CapacityRequestPolicyRangeApplyConfiguration represents a declarative configuration of the CapacityRequestPolicyRange type for use
|
||||
// with apply.
|
||||
type CapacityRequestPolicyRangeApplyConfiguration struct {
|
||||
Min *resource.Quantity `json:"min,omitempty"`
|
||||
Max *resource.Quantity `json:"max,omitempty"`
|
||||
Step *resource.Quantity `json:"step,omitempty"`
|
||||
}
|
||||
|
||||
// CapacityRequestPolicyRangeApplyConfiguration constructs a declarative configuration of the CapacityRequestPolicyRange type for use with
|
||||
// apply.
|
||||
func CapacityRequestPolicyRange() *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
return &CapacityRequestPolicyRangeApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithMin sets the Min field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Min field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyRangeApplyConfiguration) WithMin(value resource.Quantity) *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
b.Min = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMax sets the Max field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Max field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyRangeApplyConfiguration) WithMax(value resource.Quantity) *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
b.Max = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithStep sets the Step field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Step field is set to the value of the last call.
|
||||
func (b *CapacityRequestPolicyRangeApplyConfiguration) WithStep(value resource.Quantity) *CapacityRequestPolicyRangeApplyConfiguration {
|
||||
b.Step = &value
|
||||
return b
|
||||
}
|
50
applyconfigurations/resource/v1beta2/capacityrequirements.go
Normal file
50
applyconfigurations/resource/v1beta2/capacityrequirements.go
Normal 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 v1beta2
|
||||
|
||||
import (
|
||||
resourcev1beta2 "k8s.io/api/resource/v1beta2"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
// CapacityRequirementsApplyConfiguration represents a declarative configuration of the CapacityRequirements type for use
|
||||
// with apply.
|
||||
type CapacityRequirementsApplyConfiguration struct {
|
||||
Requests map[resourcev1beta2.QualifiedName]resource.Quantity `json:"requests,omitempty"`
|
||||
}
|
||||
|
||||
// CapacityRequirementsApplyConfiguration constructs a declarative configuration of the CapacityRequirements type for use with
|
||||
// apply.
|
||||
func CapacityRequirements() *CapacityRequirementsApplyConfiguration {
|
||||
return &CapacityRequirementsApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithRequests puts the entries into 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, the entries provided by each call will be put on the Requests field,
|
||||
// overwriting an existing map entries in Requests field with the same key.
|
||||
func (b *CapacityRequirementsApplyConfiguration) WithRequests(entries map[resourcev1beta2.QualifiedName]resource.Quantity) *CapacityRequirementsApplyConfiguration {
|
||||
if b.Requests == nil && len(entries) > 0 {
|
||||
b.Requests = make(map[resourcev1beta2.QualifiedName]resource.Quantity, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Requests[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
@ -37,6 +37,7 @@ type DeviceApplyConfiguration struct {
|
||||
BindsToNode *bool `json:"bindsToNode,omitempty"`
|
||||
BindingConditions []string `json:"bindingConditions,omitempty"`
|
||||
BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"`
|
||||
AllowMultipleAllocations *bool `json:"allowMultipleAllocations,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceApplyConfiguration constructs a declarative configuration of the Device type for use with
|
||||
@ -158,3 +159,11 @@ func (b *DeviceApplyConfiguration) WithBindingFailureConditions(values ...string
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAllowMultipleAllocations sets the AllowMultipleAllocations field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AllowMultipleAllocations field is set to the value of the last call.
|
||||
func (b *DeviceApplyConfiguration) WithAllowMultipleAllocations(value bool) *DeviceApplyConfiguration {
|
||||
b.AllowMultipleAllocations = &value
|
||||
return b
|
||||
}
|
||||
|
@ -25,7 +25,8 @@ import (
|
||||
// DeviceCapacityApplyConfiguration represents a declarative configuration of the DeviceCapacity type for use
|
||||
// with apply.
|
||||
type DeviceCapacityApplyConfiguration struct {
|
||||
Value *resource.Quantity `json:"value,omitempty"`
|
||||
Value *resource.Quantity `json:"value,omitempty"`
|
||||
RequestPolicy *CapacityRequestPolicyApplyConfiguration `json:"requestPolicy,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceCapacityApplyConfiguration constructs a declarative configuration of the DeviceCapacity type for use with
|
||||
@ -41,3 +42,11 @@ func (b *DeviceCapacityApplyConfiguration) WithValue(value resource.Quantity) *D
|
||||
b.Value = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithRequestPolicy sets the RequestPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the RequestPolicy field is set to the value of the last call.
|
||||
func (b *DeviceCapacityApplyConfiguration) WithRequestPolicy(value *CapacityRequestPolicyApplyConfiguration) *DeviceCapacityApplyConfiguration {
|
||||
b.RequestPolicy = value
|
||||
return b
|
||||
}
|
||||
|
@ -25,8 +25,9 @@ import (
|
||||
// DeviceConstraintApplyConfiguration represents a declarative configuration of the DeviceConstraint type for use
|
||||
// with apply.
|
||||
type DeviceConstraintApplyConfiguration struct {
|
||||
Requests []string `json:"requests,omitempty"`
|
||||
MatchAttribute *resourcev1beta2.FullyQualifiedName `json:"matchAttribute,omitempty"`
|
||||
Requests []string `json:"requests,omitempty"`
|
||||
MatchAttribute *resourcev1beta2.FullyQualifiedName `json:"matchAttribute,omitempty"`
|
||||
DistinctAttribute *resourcev1beta2.FullyQualifiedName `json:"distinctAttribute,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceConstraintApplyConfiguration constructs a declarative configuration of the DeviceConstraint type for use with
|
||||
@ -52,3 +53,11 @@ func (b *DeviceConstraintApplyConfiguration) WithMatchAttribute(value resourcev1
|
||||
b.MatchAttribute = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDistinctAttribute sets the DistinctAttribute field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the DistinctAttribute field is set to the value of the last call.
|
||||
func (b *DeviceConstraintApplyConfiguration) WithDistinctAttribute(value resourcev1beta2.FullyQualifiedName) *DeviceConstraintApplyConfiguration {
|
||||
b.DistinctAttribute = &value
|
||||
return b
|
||||
}
|
||||
|
@ -18,17 +18,25 @@ limitations under the License.
|
||||
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
resourcev1beta2 "k8s.io/api/resource/v1beta2"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
)
|
||||
|
||||
// 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"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
BindingConditions []string `json:"bindingConditions,omitempty"`
|
||||
BindingFailureConditions []string `json:"bindingFailureConditions,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"`
|
||||
BindingConditions []string `json:"bindingConditions,omitempty"`
|
||||
BindingFailureConditions []string `json:"bindingFailureConditions,omitempty"`
|
||||
ShareID *types.UID `json:"shareID,omitempty"`
|
||||
ConsumedCapacity map[resourcev1beta2.QualifiedName]resource.Quantity `json:"consumedCapacity,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with
|
||||
@ -109,3 +117,25 @@ func (b *DeviceRequestAllocationResultApplyConfiguration) WithBindingFailureCond
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithShareID sets the ShareID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the ShareID field is set to the value of the last call.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithShareID(value types.UID) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
b.ShareID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithConsumedCapacity puts the entries into the ConsumedCapacity 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 ConsumedCapacity field,
|
||||
// overwriting an existing map entries in ConsumedCapacity field with the same key.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithConsumedCapacity(entries map[resourcev1beta2.QualifiedName]resource.Quantity) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
if b.ConsumedCapacity == nil && len(entries) > 0 {
|
||||
b.ConsumedCapacity = make(map[resourcev1beta2.QualifiedName]resource.Quantity, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.ConsumedCapacity[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
@ -25,12 +25,13 @@ import (
|
||||
// DeviceSubRequestApplyConfiguration represents a declarative configuration of the DeviceSubRequest type for use
|
||||
// with apply.
|
||||
type DeviceSubRequestApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1beta2.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1beta2.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
Capacity *CapacityRequirementsApplyConfiguration `json:"capacity,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceSubRequestApplyConfiguration constructs a declarative configuration of the DeviceSubRequest type for use with
|
||||
@ -96,3 +97,11 @@ func (b *DeviceSubRequestApplyConfiguration) WithTolerations(values ...*DeviceTo
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCapacity sets the Capacity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Capacity field is set to the value of the last call.
|
||||
func (b *DeviceSubRequestApplyConfiguration) WithCapacity(value *CapacityRequirementsApplyConfiguration) *DeviceSubRequestApplyConfiguration {
|
||||
b.Capacity = value
|
||||
return b
|
||||
}
|
||||
|
@ -25,12 +25,13 @@ import (
|
||||
// ExactDeviceRequestApplyConfiguration represents a declarative configuration of the ExactDeviceRequest type for use
|
||||
// with apply.
|
||||
type ExactDeviceRequestApplyConfiguration struct {
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1beta2.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
||||
AllocationMode *resourcev1beta2.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
||||
Count *int64 `json:"count,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
||||
Capacity *CapacityRequirementsApplyConfiguration `json:"capacity,omitempty"`
|
||||
}
|
||||
|
||||
// ExactDeviceRequestApplyConfiguration constructs a declarative configuration of the ExactDeviceRequest type for use with
|
||||
@ -96,3 +97,11 @@ func (b *ExactDeviceRequestApplyConfiguration) WithTolerations(values ...*Device
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithCapacity sets the Capacity field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Capacity field is set to the value of the last call.
|
||||
func (b *ExactDeviceRequestApplyConfiguration) WithCapacity(value *CapacityRequirementsApplyConfiguration) *ExactDeviceRequestApplyConfiguration {
|
||||
b.Capacity = value
|
||||
return b
|
||||
}
|
||||
|
@ -1632,6 +1632,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationsresourcev1.AllocatedDeviceStatusApplyConfiguration{}
|
||||
case resourcev1.SchemeGroupVersion.WithKind("AllocationResult"):
|
||||
return &applyconfigurationsresourcev1.AllocationResultApplyConfiguration{}
|
||||
case resourcev1.SchemeGroupVersion.WithKind("CapacityRequestPolicy"):
|
||||
return &applyconfigurationsresourcev1.CapacityRequestPolicyApplyConfiguration{}
|
||||
case resourcev1.SchemeGroupVersion.WithKind("CapacityRequestPolicyRange"):
|
||||
return &applyconfigurationsresourcev1.CapacityRequestPolicyRangeApplyConfiguration{}
|
||||
case resourcev1.SchemeGroupVersion.WithKind("CapacityRequirements"):
|
||||
return &applyconfigurationsresourcev1.CapacityRequirementsApplyConfiguration{}
|
||||
case resourcev1.SchemeGroupVersion.WithKind("CELDeviceSelector"):
|
||||
return &applyconfigurationsresourcev1.CELDeviceSelectorApplyConfiguration{}
|
||||
case resourcev1.SchemeGroupVersion.WithKind("Counter"):
|
||||
@ -1722,6 +1728,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationsresourcev1beta1.AllocationResultApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("BasicDevice"):
|
||||
return &applyconfigurationsresourcev1beta1.BasicDeviceApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("CapacityRequestPolicy"):
|
||||
return &applyconfigurationsresourcev1beta1.CapacityRequestPolicyApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("CapacityRequestPolicyRange"):
|
||||
return &applyconfigurationsresourcev1beta1.CapacityRequestPolicyRangeApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("CapacityRequirements"):
|
||||
return &applyconfigurationsresourcev1beta1.CapacityRequirementsApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("CELDeviceSelector"):
|
||||
return &applyconfigurationsresourcev1beta1.CELDeviceSelectorApplyConfiguration{}
|
||||
case resourcev1beta1.SchemeGroupVersion.WithKind("Counter"):
|
||||
@ -1794,6 +1806,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationsresourcev1beta2.AllocatedDeviceStatusApplyConfiguration{}
|
||||
case resourcev1beta2.SchemeGroupVersion.WithKind("AllocationResult"):
|
||||
return &applyconfigurationsresourcev1beta2.AllocationResultApplyConfiguration{}
|
||||
case resourcev1beta2.SchemeGroupVersion.WithKind("CapacityRequestPolicy"):
|
||||
return &applyconfigurationsresourcev1beta2.CapacityRequestPolicyApplyConfiguration{}
|
||||
case resourcev1beta2.SchemeGroupVersion.WithKind("CapacityRequestPolicyRange"):
|
||||
return &applyconfigurationsresourcev1beta2.CapacityRequestPolicyRangeApplyConfiguration{}
|
||||
case resourcev1beta2.SchemeGroupVersion.WithKind("CapacityRequirements"):
|
||||
return &applyconfigurationsresourcev1beta2.CapacityRequirementsApplyConfiguration{}
|
||||
case resourcev1beta2.SchemeGroupVersion.WithKind("CELDeviceSelector"):
|
||||
return &applyconfigurationsresourcev1beta2.CELDeviceSelectorApplyConfiguration{}
|
||||
case resourcev1beta2.SchemeGroupVersion.WithKind("Counter"):
|
||||
|
Loading…
Reference in New Issue
Block a user