mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-26 15:17:05 +00:00
DRA API: remove obsolete types from v1alpha3
The v1alpha3 version is still needed for DeviceTaintRule, but the rest of the types and most structs became obsolete in v1.32 when we introduced v1beta1 and bumped the storage version to v1beta1. Removing them now simplifies adding new features because new fields don't need to be added to these obsolete types. This could have been done already in 1.33, but wasn't to minimize disrupting on-going work. Kubernetes-commit: 10de6780cf6b24d5115e508606334b81d6634ba6
This commit is contained in:
committed by
Kubernetes Publisher
parent
d33a6ba860
commit
d267bacbd5
@@ -12494,79 +12494,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
- name: namespace
|
- name: namespace
|
||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
- name: io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: conditions
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
|
|
||||||
elementRelationship: associative
|
|
||||||
keys:
|
|
||||||
- type
|
|
||||||
- name: data
|
|
||||||
type:
|
|
||||||
namedType: __untyped_atomic_
|
|
||||||
- name: device
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: driver
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: networkData
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.NetworkDeviceData
|
|
||||||
- name: pool
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.AllocationResult
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: devices
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceAllocationResult
|
|
||||||
default: {}
|
|
||||||
- name: nodeSelector
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.core.v1.NodeSelector
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.BasicDevice
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: allNodes
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: attributes
|
|
||||||
type:
|
|
||||||
map:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceAttribute
|
|
||||||
- name: capacity
|
|
||||||
type:
|
|
||||||
map:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
|
||||||
- name: consumesCounters
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceCounterConsumption
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: nodeName
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: nodeSelector
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.core.v1.NodeSelector
|
|
||||||
- name: taints
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceTaint
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.CELDeviceSelector
|
- name: io.k8s.api.resource.v1alpha3.CELDeviceSelector
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@@ -12574,276 +12501,12 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
type:
|
type:
|
||||||
scalar: string
|
scalar: string
|
||||||
default: ""
|
default: ""
|
||||||
- name: io.k8s.api.resource.v1alpha3.Counter
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: value
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.api.resource.Quantity
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.CounterSet
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: counters
|
|
||||||
type:
|
|
||||||
map:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.Counter
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.Device
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: basic
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.BasicDevice
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: opaque
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration
|
|
||||||
- name: requests
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: source
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceAllocationResult
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: config
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: results
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceAttribute
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: bool
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: int
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
- name: string
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: version
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceClaim
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: config
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: constraints
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceConstraint
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: requests
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceRequest
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: opaque
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration
|
|
||||||
- name: requests
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceClass
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: apiVersion
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: kind
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: metadata
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
|
||||||
default: {}
|
|
||||||
- name: spec
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceClassSpec
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceClassConfiguration
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: opaque
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceClassSpec
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: config
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceClassConfiguration
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: selectors
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceConstraint
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: matchAttribute
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: requests
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceCounterConsumption
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: counterSet
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: counters
|
|
||||||
type:
|
|
||||||
map:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.Counter
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceRequest
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: adminAccess
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: allocationMode
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: count
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
- name: deviceClassName
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: firstAvailable
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSubRequest
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: selectors
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
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:
|
|
||||||
- name: adminAccess
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: device
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: driver
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: pool
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: request
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: tolerations
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceToleration
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceSelector
|
- name: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
- name: cel
|
- name: cel
|
||||||
type:
|
type:
|
||||||
namedType: io.k8s.api.resource.v1alpha3.CELDeviceSelector
|
namedType: io.k8s.api.resource.v1alpha3.CELDeviceSelector
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceSubRequest
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: allocationMode
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: count
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
- name: deviceClassName
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: selectors
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: tolerations
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceToleration
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.DeviceTaint
|
- name: io.k8s.api.resource.v1alpha3.DeviceTaint
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
@@ -12909,215 +12572,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
|||||||
elementType:
|
elementType:
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
namedType: io.k8s.api.resource.v1alpha3.DeviceSelector
|
||||||
elementRelationship: atomic
|
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:
|
|
||||||
- name: hardwareAddress
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: interfaceName
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: ips
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
scalar: string
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: driver
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: parameters
|
|
||||||
type:
|
|
||||||
namedType: __untyped_atomic_
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.ResourceClaim
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: apiVersion
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: kind
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: metadata
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
|
||||||
default: {}
|
|
||||||
- name: spec
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSpec
|
|
||||||
default: {}
|
|
||||||
- name: status
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.ResourceClaimStatus
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: apiGroup
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: resource
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: uid
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.ResourceClaimSpec
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: devices
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.DeviceClaim
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.ResourceClaimStatus
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: allocation
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.AllocationResult
|
|
||||||
- name: devices
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus
|
|
||||||
elementRelationship: associative
|
|
||||||
keys:
|
|
||||||
- driver
|
|
||||||
- device
|
|
||||||
- pool
|
|
||||||
- name: reservedFor
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference
|
|
||||||
elementRelationship: associative
|
|
||||||
keys:
|
|
||||||
- uid
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.ResourceClaimTemplate
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: apiVersion
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: kind
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: metadata
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
|
||||||
default: {}
|
|
||||||
- name: spec
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: metadata
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
|
||||||
default: {}
|
|
||||||
- name: spec
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSpec
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.ResourcePool
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: generation
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: name
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: resourceSliceCount
|
|
||||||
type:
|
|
||||||
scalar: numeric
|
|
||||||
default: 0
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.ResourceSlice
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: apiVersion
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: kind
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: metadata
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
|
|
||||||
default: {}
|
|
||||||
- name: spec
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.ResourceSliceSpec
|
|
||||||
default: {}
|
|
||||||
- name: io.k8s.api.resource.v1alpha3.ResourceSliceSpec
|
|
||||||
map:
|
|
||||||
fields:
|
|
||||||
- name: allNodes
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: devices
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.Device
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: driver
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
default: ""
|
|
||||||
- name: nodeName
|
|
||||||
type:
|
|
||||||
scalar: string
|
|
||||||
- name: nodeSelector
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.core.v1.NodeSelector
|
|
||||||
- name: perDeviceNodeSelection
|
|
||||||
type:
|
|
||||||
scalar: boolean
|
|
||||||
- name: pool
|
|
||||||
type:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.ResourcePool
|
|
||||||
default: {}
|
|
||||||
- name: sharedCounters
|
|
||||||
type:
|
|
||||||
list:
|
|
||||||
elementType:
|
|
||||||
namedType: io.k8s.api.resource.v1alpha3.CounterSet
|
|
||||||
elementRelationship: atomic
|
|
||||||
- name: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus
|
- name: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus
|
||||||
map:
|
map:
|
||||||
fields:
|
fields:
|
||||||
|
@@ -1,94 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// AllocatedDeviceStatusApplyConfiguration represents a declarative configuration of the AllocatedDeviceStatus type for use
|
|
||||||
// with apply.
|
|
||||||
type AllocatedDeviceStatusApplyConfiguration struct {
|
|
||||||
Driver *string `json:"driver,omitempty"`
|
|
||||||
Pool *string `json:"pool,omitempty"`
|
|
||||||
Device *string `json:"device,omitempty"`
|
|
||||||
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
|
|
||||||
Data *runtime.RawExtension `json:"data,omitempty"`
|
|
||||||
NetworkData *NetworkDeviceDataApplyConfiguration `json:"networkData,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AllocatedDeviceStatusApplyConfiguration constructs a declarative configuration of the AllocatedDeviceStatus type for use with
|
|
||||||
// apply.
|
|
||||||
func AllocatedDeviceStatus() *AllocatedDeviceStatusApplyConfiguration {
|
|
||||||
return &AllocatedDeviceStatusApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDriver sets the Driver field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Driver field is set to the value of the last call.
|
|
||||||
func (b *AllocatedDeviceStatusApplyConfiguration) WithDriver(value string) *AllocatedDeviceStatusApplyConfiguration {
|
|
||||||
b.Driver = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPool sets the Pool field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Pool field is set to the value of the last call.
|
|
||||||
func (b *AllocatedDeviceStatusApplyConfiguration) WithPool(value string) *AllocatedDeviceStatusApplyConfiguration {
|
|
||||||
b.Pool = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDevice sets the Device field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Device field is set to the value of the last call.
|
|
||||||
func (b *AllocatedDeviceStatusApplyConfiguration) WithDevice(value string) *AllocatedDeviceStatusApplyConfiguration {
|
|
||||||
b.Device = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithConditions adds the given value to the Conditions field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Conditions field.
|
|
||||||
func (b *AllocatedDeviceStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *AllocatedDeviceStatusApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithConditions")
|
|
||||||
}
|
|
||||||
b.Conditions = append(b.Conditions, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithData sets the Data field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Data field is set to the value of the last call.
|
|
||||||
func (b *AllocatedDeviceStatusApplyConfiguration) WithData(value runtime.RawExtension) *AllocatedDeviceStatusApplyConfiguration {
|
|
||||||
b.Data = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNetworkData sets the NetworkData field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the NetworkData field is set to the value of the last call.
|
|
||||||
func (b *AllocatedDeviceStatusApplyConfiguration) WithNetworkData(value *NetworkDeviceDataApplyConfiguration) *AllocatedDeviceStatusApplyConfiguration {
|
|
||||||
b.NetworkData = value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/core/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// AllocationResultApplyConfiguration represents a declarative configuration of the AllocationResult type for use
|
|
||||||
// with apply.
|
|
||||||
type AllocationResultApplyConfiguration struct {
|
|
||||||
Devices *DeviceAllocationResultApplyConfiguration `json:"devices,omitempty"`
|
|
||||||
NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// AllocationResultApplyConfiguration constructs a declarative configuration of the AllocationResult type for use with
|
|
||||||
// apply.
|
|
||||||
func AllocationResult() *AllocationResultApplyConfiguration {
|
|
||||||
return &AllocationResultApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDevices sets the Devices field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Devices field is set to the value of the last call.
|
|
||||||
func (b *AllocationResultApplyConfiguration) WithDevices(value *DeviceAllocationResultApplyConfiguration) *AllocationResultApplyConfiguration {
|
|
||||||
b.Devices = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the NodeSelector field is set to the value of the last call.
|
|
||||||
func (b *AllocationResultApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *AllocationResultApplyConfiguration {
|
|
||||||
b.NodeSelector = value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,121 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
|
||||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/core/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// BasicDeviceApplyConfiguration represents a declarative configuration of the BasicDevice type for use
|
|
||||||
// with apply.
|
|
||||||
type BasicDeviceApplyConfiguration struct {
|
|
||||||
Attributes map[resourcev1alpha3.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"`
|
|
||||||
Capacity map[resourcev1alpha3.QualifiedName]resource.Quantity `json:"capacity,omitempty"`
|
|
||||||
ConsumesCounters []DeviceCounterConsumptionApplyConfiguration `json:"consumesCounters,omitempty"`
|
|
||||||
NodeName *string `json:"nodeName,omitempty"`
|
|
||||||
NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"`
|
|
||||||
AllNodes *bool `json:"allNodes,omitempty"`
|
|
||||||
Taints []DeviceTaintApplyConfiguration `json:"taints,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BasicDeviceApplyConfiguration constructs a declarative configuration of the BasicDevice type for use with
|
|
||||||
// apply.
|
|
||||||
func BasicDevice() *BasicDeviceApplyConfiguration {
|
|
||||||
return &BasicDeviceApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAttributes puts the entries into the Attributes field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Attributes field,
|
|
||||||
// overwriting an existing map entries in Attributes field with the same key.
|
|
||||||
func (b *BasicDeviceApplyConfiguration) WithAttributes(entries map[resourcev1alpha3.QualifiedName]DeviceAttributeApplyConfiguration) *BasicDeviceApplyConfiguration {
|
|
||||||
if b.Attributes == nil && len(entries) > 0 {
|
|
||||||
b.Attributes = make(map[resourcev1alpha3.QualifiedName]DeviceAttributeApplyConfiguration, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.Attributes[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCapacity puts the entries into the Capacity field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Capacity field,
|
|
||||||
// overwriting an existing map entries in Capacity field with the same key.
|
|
||||||
func (b *BasicDeviceApplyConfiguration) WithCapacity(entries map[resourcev1alpha3.QualifiedName]resource.Quantity) *BasicDeviceApplyConfiguration {
|
|
||||||
if b.Capacity == nil && len(entries) > 0 {
|
|
||||||
b.Capacity = make(map[resourcev1alpha3.QualifiedName]resource.Quantity, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.Capacity[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithConsumesCounters adds the given value to the ConsumesCounters 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 ConsumesCounters field.
|
|
||||||
func (b *BasicDeviceApplyConfiguration) WithConsumesCounters(values ...*DeviceCounterConsumptionApplyConfiguration) *BasicDeviceApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithConsumesCounters")
|
|
||||||
}
|
|
||||||
b.ConsumesCounters = append(b.ConsumesCounters, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNodeName sets the NodeName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the NodeName field is set to the value of the last call.
|
|
||||||
func (b *BasicDeviceApplyConfiguration) WithNodeName(value string) *BasicDeviceApplyConfiguration {
|
|
||||||
b.NodeName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the NodeSelector field is set to the value of the last call.
|
|
||||||
func (b *BasicDeviceApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *BasicDeviceApplyConfiguration {
|
|
||||||
b.NodeSelector = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllNodes sets the AllNodes field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the AllNodes field is set to the value of the last call.
|
|
||||||
func (b *BasicDeviceApplyConfiguration) WithAllNodes(value bool) *BasicDeviceApplyConfiguration {
|
|
||||||
b.AllNodes = &value
|
|
||||||
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
|
|
||||||
}
|
|
@@ -1,43 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CounterApplyConfiguration represents a declarative configuration of the Counter type for use
|
|
||||||
// with apply.
|
|
||||||
type CounterApplyConfiguration struct {
|
|
||||||
Value *resource.Quantity `json:"value,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CounterApplyConfiguration constructs a declarative configuration of the Counter type for use with
|
|
||||||
// apply.
|
|
||||||
func Counter() *CounterApplyConfiguration {
|
|
||||||
return &CounterApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *CounterApplyConfiguration) WithValue(value resource.Quantity) *CounterApplyConfiguration {
|
|
||||||
b.Value = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// CounterSetApplyConfiguration represents a declarative configuration of the CounterSet type for use
|
|
||||||
// with apply.
|
|
||||||
type CounterSetApplyConfiguration struct {
|
|
||||||
Name *string `json:"name,omitempty"`
|
|
||||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// CounterSetApplyConfiguration constructs a declarative configuration of the CounterSet type for use with
|
|
||||||
// apply.
|
|
||||||
func CounterSet() *CounterSetApplyConfiguration {
|
|
||||||
return &CounterSetApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *CounterSetApplyConfiguration) WithName(value string) *CounterSetApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCounters puts the entries into the Counters 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 Counters field,
|
|
||||||
// overwriting an existing map entries in Counters field with the same key.
|
|
||||||
func (b *CounterSetApplyConfiguration) WithCounters(entries map[string]CounterApplyConfiguration) *CounterSetApplyConfiguration {
|
|
||||||
if b.Counters == nil && len(entries) > 0 {
|
|
||||||
b.Counters = make(map[string]CounterApplyConfiguration, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.Counters[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// DeviceApplyConfiguration represents a declarative configuration of the Device type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceApplyConfiguration struct {
|
|
||||||
Name *string `json:"name,omitempty"`
|
|
||||||
Basic *BasicDeviceApplyConfiguration `json:"basic,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceApplyConfiguration constructs a declarative configuration of the Device type for use with
|
|
||||||
// apply.
|
|
||||||
func Device() *DeviceApplyConfiguration {
|
|
||||||
return &DeviceApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithName sets the Name field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Name field is set to the value of the last call.
|
|
||||||
func (b *DeviceApplyConfiguration) WithName(value string) *DeviceApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithBasic sets the Basic field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Basic field is set to the value of the last call.
|
|
||||||
func (b *DeviceApplyConfiguration) WithBasic(value *BasicDeviceApplyConfiguration) *DeviceApplyConfiguration {
|
|
||||||
b.Basic = value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,63 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeviceAllocationConfigurationApplyConfiguration represents a declarative configuration of the DeviceAllocationConfiguration type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceAllocationConfigurationApplyConfiguration struct {
|
|
||||||
Source *resourcev1alpha3.AllocationConfigSource `json:"source,omitempty"`
|
|
||||||
Requests []string `json:"requests,omitempty"`
|
|
||||||
DeviceConfigurationApplyConfiguration `json:",inline"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceAllocationConfigurationApplyConfiguration constructs a declarative configuration of the DeviceAllocationConfiguration type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceAllocationConfiguration() *DeviceAllocationConfigurationApplyConfiguration {
|
|
||||||
return &DeviceAllocationConfigurationApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSource sets the Source field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Source field is set to the value of the last call.
|
|
||||||
func (b *DeviceAllocationConfigurationApplyConfiguration) WithSource(value resourcev1alpha3.AllocationConfigSource) *DeviceAllocationConfigurationApplyConfiguration {
|
|
||||||
b.Source = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRequests adds the given value to the Requests field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Requests field.
|
|
||||||
func (b *DeviceAllocationConfigurationApplyConfiguration) WithRequests(values ...string) *DeviceAllocationConfigurationApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.Requests = append(b.Requests, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOpaque sets the Opaque field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Opaque field is set to the value of the last call.
|
|
||||||
func (b *DeviceAllocationConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceAllocationConfigurationApplyConfiguration {
|
|
||||||
b.DeviceConfigurationApplyConfiguration.Opaque = value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// DeviceAllocationResultApplyConfiguration represents a declarative configuration of the DeviceAllocationResult type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceAllocationResultApplyConfiguration struct {
|
|
||||||
Results []DeviceRequestAllocationResultApplyConfiguration `json:"results,omitempty"`
|
|
||||||
Config []DeviceAllocationConfigurationApplyConfiguration `json:"config,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceAllocationResult type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceAllocationResult() *DeviceAllocationResultApplyConfiguration {
|
|
||||||
return &DeviceAllocationResultApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithResults adds the given value to the Results field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Results field.
|
|
||||||
func (b *DeviceAllocationResultApplyConfiguration) WithResults(values ...*DeviceRequestAllocationResultApplyConfiguration) *DeviceAllocationResultApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithResults")
|
|
||||||
}
|
|
||||||
b.Results = append(b.Results, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithConfig adds the given value to the Config field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Config field.
|
|
||||||
func (b *DeviceAllocationResultApplyConfiguration) WithConfig(values ...*DeviceAllocationConfigurationApplyConfiguration) *DeviceAllocationResultApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithConfig")
|
|
||||||
}
|
|
||||||
b.Config = append(b.Config, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// DeviceAttributeApplyConfiguration represents a declarative configuration of the DeviceAttribute type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceAttributeApplyConfiguration struct {
|
|
||||||
IntValue *int64 `json:"int,omitempty"`
|
|
||||||
BoolValue *bool `json:"bool,omitempty"`
|
|
||||||
StringValue *string `json:"string,omitempty"`
|
|
||||||
VersionValue *string `json:"version,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceAttributeApplyConfiguration constructs a declarative configuration of the DeviceAttribute type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceAttribute() *DeviceAttributeApplyConfiguration {
|
|
||||||
return &DeviceAttributeApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithIntValue sets the IntValue field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the IntValue field is set to the value of the last call.
|
|
||||||
func (b *DeviceAttributeApplyConfiguration) WithIntValue(value int64) *DeviceAttributeApplyConfiguration {
|
|
||||||
b.IntValue = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithBoolValue sets the BoolValue field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the BoolValue field is set to the value of the last call.
|
|
||||||
func (b *DeviceAttributeApplyConfiguration) WithBoolValue(value bool) *DeviceAttributeApplyConfiguration {
|
|
||||||
b.BoolValue = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithStringValue sets the StringValue field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the StringValue field is set to the value of the last call.
|
|
||||||
func (b *DeviceAttributeApplyConfiguration) WithStringValue(value string) *DeviceAttributeApplyConfiguration {
|
|
||||||
b.StringValue = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithVersionValue sets the VersionValue field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the VersionValue field is set to the value of the last call.
|
|
||||||
func (b *DeviceAttributeApplyConfiguration) WithVersionValue(value string) *DeviceAttributeApplyConfiguration {
|
|
||||||
b.VersionValue = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,72 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// DeviceClaimApplyConfiguration represents a declarative configuration of the DeviceClaim type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceClaimApplyConfiguration struct {
|
|
||||||
Requests []DeviceRequestApplyConfiguration `json:"requests,omitempty"`
|
|
||||||
Constraints []DeviceConstraintApplyConfiguration `json:"constraints,omitempty"`
|
|
||||||
Config []DeviceClaimConfigurationApplyConfiguration `json:"config,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceClaimApplyConfiguration constructs a declarative configuration of the DeviceClaim type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceClaim() *DeviceClaimApplyConfiguration {
|
|
||||||
return &DeviceClaimApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRequests adds the given value to the Requests field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Requests field.
|
|
||||||
func (b *DeviceClaimApplyConfiguration) WithRequests(values ...*DeviceRequestApplyConfiguration) *DeviceClaimApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithRequests")
|
|
||||||
}
|
|
||||||
b.Requests = append(b.Requests, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithConstraints adds the given value to the Constraints field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Constraints field.
|
|
||||||
func (b *DeviceClaimApplyConfiguration) WithConstraints(values ...*DeviceConstraintApplyConfiguration) *DeviceClaimApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithConstraints")
|
|
||||||
}
|
|
||||||
b.Constraints = append(b.Constraints, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithConfig adds the given value to the Config field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Config field.
|
|
||||||
func (b *DeviceClaimApplyConfiguration) WithConfig(values ...*DeviceClaimConfigurationApplyConfiguration) *DeviceClaimApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithConfig")
|
|
||||||
}
|
|
||||||
b.Config = append(b.Config, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,50 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// DeviceClaimConfigurationApplyConfiguration represents a declarative configuration of the DeviceClaimConfiguration type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceClaimConfigurationApplyConfiguration struct {
|
|
||||||
Requests []string `json:"requests,omitempty"`
|
|
||||||
DeviceConfigurationApplyConfiguration `json:",inline"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceClaimConfigurationApplyConfiguration constructs a declarative configuration of the DeviceClaimConfiguration type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceClaimConfiguration() *DeviceClaimConfigurationApplyConfiguration {
|
|
||||||
return &DeviceClaimConfigurationApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRequests adds the given value to the Requests field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Requests field.
|
|
||||||
func (b *DeviceClaimConfigurationApplyConfiguration) WithRequests(values ...string) *DeviceClaimConfigurationApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.Requests = append(b.Requests, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOpaque sets the Opaque field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Opaque field is set to the value of the last call.
|
|
||||||
func (b *DeviceClaimConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceClaimConfigurationApplyConfiguration {
|
|
||||||
b.DeviceConfigurationApplyConfiguration.Opaque = value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,253 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
|
||||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeviceClassApplyConfiguration represents a declarative configuration of the DeviceClass type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceClassApplyConfiguration struct {
|
|
||||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
|
||||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
|
||||||
Spec *DeviceClassSpecApplyConfiguration `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceClass constructs a declarative configuration of the DeviceClass type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceClass(name string) *DeviceClassApplyConfiguration {
|
|
||||||
b := &DeviceClassApplyConfiguration{}
|
|
||||||
b.WithName(name)
|
|
||||||
b.WithKind("DeviceClass")
|
|
||||||
b.WithAPIVersion("resource.k8s.io/v1alpha3")
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractDeviceClass extracts the applied configuration owned by fieldManager from
|
|
||||||
// deviceClass. If no managedFields are found in deviceClass for fieldManager, a
|
|
||||||
// DeviceClassApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
|
||||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
|
||||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
|
||||||
// the fieldManager never owned fields any fields.
|
|
||||||
// deviceClass must be a unmodified DeviceClass API object that was retrieved from the Kubernetes API.
|
|
||||||
// ExtractDeviceClass provides a way to perform a extract/modify-in-place/apply workflow.
|
|
||||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
|
||||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractDeviceClass(deviceClass *resourcev1alpha3.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) {
|
|
||||||
return extractDeviceClass(deviceClass, fieldManager, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractDeviceClassStatus is the same as ExtractDeviceClass except
|
|
||||||
// that it extracts the status subresource applied configuration.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractDeviceClassStatus(deviceClass *resourcev1alpha3.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) {
|
|
||||||
return extractDeviceClass(deviceClass, fieldManager, "status")
|
|
||||||
}
|
|
||||||
|
|
||||||
func extractDeviceClass(deviceClass *resourcev1alpha3.DeviceClass, fieldManager string, subresource string) (*DeviceClassApplyConfiguration, error) {
|
|
||||||
b := &DeviceClassApplyConfiguration{}
|
|
||||||
err := managedfields.ExtractInto(deviceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha3.DeviceClass"), fieldManager, b, subresource)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
b.WithName(deviceClass.Name)
|
|
||||||
|
|
||||||
b.WithKind("DeviceClass")
|
|
||||||
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 *DeviceClassApplyConfiguration) WithKind(value string) *DeviceClassApplyConfiguration {
|
|
||||||
b.TypeMetaApplyConfiguration.Kind = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithAPIVersion(value string) *DeviceClassApplyConfiguration {
|
|
||||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithName sets the Name field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Name field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithName(value string) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithGenerateName(value string) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithNamespace(value string) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUID sets the UID field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the UID field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithUID(value types.UID) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.UID = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithResourceVersion(value string) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Generation field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithGeneration(value int64) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
|
||||||
// overwriting an existing map entries in Labels field with the same key.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithLabels(entries map[string]string) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
|
||||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
|
||||||
// overwriting an existing map entries in Annotations field with the same key.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithAnnotations(entries map[string]string) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
|
||||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithOwnerReferences")
|
|
||||||
}
|
|
||||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithFinalizers(values ...string) *DeviceClassApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *DeviceClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
|
||||||
if b.ObjectMetaApplyConfiguration == nil {
|
|
||||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Spec field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassApplyConfiguration) WithSpec(value *DeviceClassSpecApplyConfiguration) *DeviceClassApplyConfiguration {
|
|
||||||
b.Spec = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
|
||||||
func (b *DeviceClassApplyConfiguration) GetName() *string {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
return b.ObjectMetaApplyConfiguration.Name
|
|
||||||
}
|
|
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// DeviceClassConfigurationApplyConfiguration represents a declarative configuration of the DeviceClassConfiguration type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceClassConfigurationApplyConfiguration struct {
|
|
||||||
DeviceConfigurationApplyConfiguration `json:",inline"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceClassConfigurationApplyConfiguration constructs a declarative configuration of the DeviceClassConfiguration type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceClassConfiguration() *DeviceClassConfigurationApplyConfiguration {
|
|
||||||
return &DeviceClassConfigurationApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOpaque sets the Opaque field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Opaque field is set to the value of the last call.
|
|
||||||
func (b *DeviceClassConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceClassConfigurationApplyConfiguration {
|
|
||||||
b.DeviceConfigurationApplyConfiguration.Opaque = value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// DeviceClassSpecApplyConfiguration represents a declarative configuration of the DeviceClassSpec type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceClassSpecApplyConfiguration struct {
|
|
||||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
|
||||||
Config []DeviceClassConfigurationApplyConfiguration `json:"config,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceClassSpecApplyConfiguration constructs a declarative configuration of the DeviceClassSpec type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceClassSpec() *DeviceClassSpecApplyConfiguration {
|
|
||||||
return &DeviceClassSpecApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSelectors adds the given value to the Selectors field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Selectors field.
|
|
||||||
func (b *DeviceClassSpecApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceClassSpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithSelectors")
|
|
||||||
}
|
|
||||||
b.Selectors = append(b.Selectors, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithConfig adds the given value to the Config field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Config field.
|
|
||||||
func (b *DeviceClassSpecApplyConfiguration) WithConfig(values ...*DeviceClassConfigurationApplyConfiguration) *DeviceClassSpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithConfig")
|
|
||||||
}
|
|
||||||
b.Config = append(b.Config, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// DeviceConfigurationApplyConfiguration represents a declarative configuration of the DeviceConfiguration type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceConfigurationApplyConfiguration struct {
|
|
||||||
Opaque *OpaqueDeviceConfigurationApplyConfiguration `json:"opaque,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceConfigurationApplyConfiguration constructs a declarative configuration of the DeviceConfiguration type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceConfiguration() *DeviceConfigurationApplyConfiguration {
|
|
||||||
return &DeviceConfigurationApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOpaque sets the Opaque field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Opaque field is set to the value of the last call.
|
|
||||||
func (b *DeviceConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceConfigurationApplyConfiguration {
|
|
||||||
b.Opaque = value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeviceConstraintApplyConfiguration represents a declarative configuration of the DeviceConstraint type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceConstraintApplyConfiguration struct {
|
|
||||||
Requests []string `json:"requests,omitempty"`
|
|
||||||
MatchAttribute *resourcev1alpha3.FullyQualifiedName `json:"matchAttribute,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceConstraintApplyConfiguration constructs a declarative configuration of the DeviceConstraint type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceConstraint() *DeviceConstraintApplyConfiguration {
|
|
||||||
return &DeviceConstraintApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRequests adds the given value to the Requests field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Requests field.
|
|
||||||
func (b *DeviceConstraintApplyConfiguration) WithRequests(values ...string) *DeviceConstraintApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.Requests = append(b.Requests, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMatchAttribute sets the MatchAttribute field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the MatchAttribute field is set to the value of the last call.
|
|
||||||
func (b *DeviceConstraintApplyConfiguration) WithMatchAttribute(value resourcev1alpha3.FullyQualifiedName) *DeviceConstraintApplyConfiguration {
|
|
||||||
b.MatchAttribute = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,54 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// DeviceCounterConsumptionApplyConfiguration represents a declarative configuration of the DeviceCounterConsumption type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceCounterConsumptionApplyConfiguration struct {
|
|
||||||
CounterSet *string `json:"counterSet,omitempty"`
|
|
||||||
Counters map[string]CounterApplyConfiguration `json:"counters,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceCounterConsumptionApplyConfiguration constructs a declarative configuration of the DeviceCounterConsumption type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceCounterConsumption() *DeviceCounterConsumptionApplyConfiguration {
|
|
||||||
return &DeviceCounterConsumptionApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCounterSet sets the CounterSet field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the CounterSet field is set to the value of the last call.
|
|
||||||
func (b *DeviceCounterConsumptionApplyConfiguration) WithCounterSet(value string) *DeviceCounterConsumptionApplyConfiguration {
|
|
||||||
b.CounterSet = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCounters puts the entries into the Counters 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 Counters field,
|
|
||||||
// overwriting an existing map entries in Counters field with the same key.
|
|
||||||
func (b *DeviceCounterConsumptionApplyConfiguration) WithCounters(entries map[string]CounterApplyConfiguration) *DeviceCounterConsumptionApplyConfiguration {
|
|
||||||
if b.Counters == nil && len(entries) > 0 {
|
|
||||||
b.Counters = make(map[string]CounterApplyConfiguration, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.Counters[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,121 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeviceRequestApplyConfiguration represents a declarative configuration of the DeviceRequest type for use
|
|
||||||
// with apply.
|
|
||||||
type DeviceRequestApplyConfiguration struct {
|
|
||||||
Name *string `json:"name,omitempty"`
|
|
||||||
DeviceClassName *string `json:"deviceClassName,omitempty"`
|
|
||||||
Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"`
|
|
||||||
AllocationMode *resourcev1alpha3.DeviceAllocationMode `json:"allocationMode,omitempty"`
|
|
||||||
Count *int64 `json:"count,omitempty"`
|
|
||||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
|
||||||
FirstAvailable []DeviceSubRequestApplyConfiguration `json:"firstAvailable,omitempty"`
|
|
||||||
Tolerations []DeviceTolerationApplyConfiguration `json:"tolerations,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceRequestApplyConfiguration constructs a declarative configuration of the DeviceRequest type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceRequest() *DeviceRequestApplyConfiguration {
|
|
||||||
return &DeviceRequestApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithName sets the Name field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Name field is set to the value of the last call.
|
|
||||||
func (b *DeviceRequestApplyConfiguration) WithName(value string) *DeviceRequestApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeviceClassName sets the DeviceClassName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeviceClassName field is set to the value of the last call.
|
|
||||||
func (b *DeviceRequestApplyConfiguration) WithDeviceClassName(value string) *DeviceRequestApplyConfiguration {
|
|
||||||
b.DeviceClassName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSelectors adds the given value to the Selectors field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Selectors field.
|
|
||||||
func (b *DeviceRequestApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceRequestApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithSelectors")
|
|
||||||
}
|
|
||||||
b.Selectors = append(b.Selectors, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllocationMode sets the AllocationMode field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the AllocationMode field is set to the value of the last call.
|
|
||||||
func (b *DeviceRequestApplyConfiguration) WithAllocationMode(value resourcev1alpha3.DeviceAllocationMode) *DeviceRequestApplyConfiguration {
|
|
||||||
b.AllocationMode = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCount sets the Count field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Count field is set to the value of the last call.
|
|
||||||
func (b *DeviceRequestApplyConfiguration) WithCount(value int64) *DeviceRequestApplyConfiguration {
|
|
||||||
b.Count = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAdminAccess sets the AdminAccess field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the AdminAccess field is set to the value of the last call.
|
|
||||||
func (b *DeviceRequestApplyConfiguration) WithAdminAccess(value bool) *DeviceRequestApplyConfiguration {
|
|
||||||
b.AdminAccess = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithFirstAvailable adds the given value to the FirstAvailable 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 FirstAvailable field.
|
|
||||||
func (b *DeviceRequestApplyConfiguration) WithFirstAvailable(values ...*DeviceSubRequestApplyConfiguration) *DeviceRequestApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithFirstAvailable")
|
|
||||||
}
|
|
||||||
b.FirstAvailable = append(b.FirstAvailable, *values[i])
|
|
||||||
}
|
|
||||||
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
|
|
||||||
}
|
|
@@ -1,89 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// 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"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with
|
|
||||||
// apply.
|
|
||||||
func DeviceRequestAllocationResult() *DeviceRequestAllocationResultApplyConfiguration {
|
|
||||||
return &DeviceRequestAllocationResultApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithRequest sets the Request field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Request field is set to the value of the last call.
|
|
||||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithRequest(value string) *DeviceRequestAllocationResultApplyConfiguration {
|
|
||||||
b.Request = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDriver sets the Driver field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Driver field is set to the value of the last call.
|
|
||||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithDriver(value string) *DeviceRequestAllocationResultApplyConfiguration {
|
|
||||||
b.Driver = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPool sets the Pool field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Pool field is set to the value of the last call.
|
|
||||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithPool(value string) *DeviceRequestAllocationResultApplyConfiguration {
|
|
||||||
b.Pool = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDevice sets the Device field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Device field is set to the value of the last call.
|
|
||||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithDevice(value string) *DeviceRequestAllocationResultApplyConfiguration {
|
|
||||||
b.Device = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAdminAccess sets the AdminAccess field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the AdminAccess field is set to the value of the last call.
|
|
||||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithAdminAccess(value bool) *DeviceRequestAllocationResultApplyConfiguration {
|
|
||||||
b.AdminAccess = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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
|
|
||||||
}
|
|
@@ -1,98 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 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 *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
|
|
||||||
// apply.
|
|
||||||
func DeviceSubRequest() *DeviceSubRequestApplyConfiguration {
|
|
||||||
return &DeviceSubRequestApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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 *DeviceSubRequestApplyConfiguration) WithName(value string) *DeviceSubRequestApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeviceClassName sets the DeviceClassName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeviceClassName field is set to the value of the last call.
|
|
||||||
func (b *DeviceSubRequestApplyConfiguration) WithDeviceClassName(value string) *DeviceSubRequestApplyConfiguration {
|
|
||||||
b.DeviceClassName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSelectors adds the given value to the Selectors field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Selectors field.
|
|
||||||
func (b *DeviceSubRequestApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceSubRequestApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithSelectors")
|
|
||||||
}
|
|
||||||
b.Selectors = append(b.Selectors, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllocationMode sets the AllocationMode field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the AllocationMode field is set to the value of the last call.
|
|
||||||
func (b *DeviceSubRequestApplyConfiguration) WithAllocationMode(value resourcev1alpha3.DeviceAllocationMode) *DeviceSubRequestApplyConfiguration {
|
|
||||||
b.AllocationMode = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCount sets the Count field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Count field is set to the value of the last call.
|
|
||||||
func (b *DeviceSubRequestApplyConfiguration) WithCount(value int64) *DeviceSubRequestApplyConfiguration {
|
|
||||||
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
|
|
||||||
}
|
|
@@ -1,79 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 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
|
|
||||||
}
|
|
@@ -1,59 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// NetworkDeviceDataApplyConfiguration represents a declarative configuration of the NetworkDeviceData type for use
|
|
||||||
// with apply.
|
|
||||||
type NetworkDeviceDataApplyConfiguration struct {
|
|
||||||
InterfaceName *string `json:"interfaceName,omitempty"`
|
|
||||||
IPs []string `json:"ips,omitempty"`
|
|
||||||
HardwareAddress *string `json:"hardwareAddress,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NetworkDeviceDataApplyConfiguration constructs a declarative configuration of the NetworkDeviceData type for use with
|
|
||||||
// apply.
|
|
||||||
func NetworkDeviceData() *NetworkDeviceDataApplyConfiguration {
|
|
||||||
return &NetworkDeviceDataApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithInterfaceName sets the InterfaceName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the InterfaceName field is set to the value of the last call.
|
|
||||||
func (b *NetworkDeviceDataApplyConfiguration) WithInterfaceName(value string) *NetworkDeviceDataApplyConfiguration {
|
|
||||||
b.InterfaceName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithIPs adds the given value to the IPs field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the IPs field.
|
|
||||||
func (b *NetworkDeviceDataApplyConfiguration) WithIPs(values ...string) *NetworkDeviceDataApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
b.IPs = append(b.IPs, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHardwareAddress sets the HardwareAddress field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the HardwareAddress field is set to the value of the last call.
|
|
||||||
func (b *NetworkDeviceDataApplyConfiguration) WithHardwareAddress(value string) *NetworkDeviceDataApplyConfiguration {
|
|
||||||
b.HardwareAddress = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,52 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
// OpaqueDeviceConfigurationApplyConfiguration represents a declarative configuration of the OpaqueDeviceConfiguration type for use
|
|
||||||
// with apply.
|
|
||||||
type OpaqueDeviceConfigurationApplyConfiguration struct {
|
|
||||||
Driver *string `json:"driver,omitempty"`
|
|
||||||
Parameters *runtime.RawExtension `json:"parameters,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// OpaqueDeviceConfigurationApplyConfiguration constructs a declarative configuration of the OpaqueDeviceConfiguration type for use with
|
|
||||||
// apply.
|
|
||||||
func OpaqueDeviceConfiguration() *OpaqueDeviceConfigurationApplyConfiguration {
|
|
||||||
return &OpaqueDeviceConfigurationApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDriver sets the Driver field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Driver field is set to the value of the last call.
|
|
||||||
func (b *OpaqueDeviceConfigurationApplyConfiguration) WithDriver(value string) *OpaqueDeviceConfigurationApplyConfiguration {
|
|
||||||
b.Driver = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithParameters sets the Parameters field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Parameters field is set to the value of the last call.
|
|
||||||
func (b *OpaqueDeviceConfigurationApplyConfiguration) WithParameters(value runtime.RawExtension) *OpaqueDeviceConfigurationApplyConfiguration {
|
|
||||||
b.Parameters = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,264 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
|
||||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceClaimApplyConfiguration represents a declarative configuration of the ResourceClaim type for use
|
|
||||||
// with apply.
|
|
||||||
type ResourceClaimApplyConfiguration struct {
|
|
||||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
|
||||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
|
||||||
Spec *ResourceClaimSpecApplyConfiguration `json:"spec,omitempty"`
|
|
||||||
Status *ResourceClaimStatusApplyConfiguration `json:"status,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaim constructs a declarative configuration of the ResourceClaim type for use with
|
|
||||||
// apply.
|
|
||||||
func ResourceClaim(name, namespace string) *ResourceClaimApplyConfiguration {
|
|
||||||
b := &ResourceClaimApplyConfiguration{}
|
|
||||||
b.WithName(name)
|
|
||||||
b.WithNamespace(namespace)
|
|
||||||
b.WithKind("ResourceClaim")
|
|
||||||
b.WithAPIVersion("resource.k8s.io/v1alpha3")
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractResourceClaim extracts the applied configuration owned by fieldManager from
|
|
||||||
// resourceClaim. If no managedFields are found in resourceClaim for fieldManager, a
|
|
||||||
// ResourceClaimApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
|
||||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
|
||||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
|
||||||
// the fieldManager never owned fields any fields.
|
|
||||||
// resourceClaim must be a unmodified ResourceClaim API object that was retrieved from the Kubernetes API.
|
|
||||||
// ExtractResourceClaim provides a way to perform a extract/modify-in-place/apply workflow.
|
|
||||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
|
||||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractResourceClaim(resourceClaim *resourcev1alpha3.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) {
|
|
||||||
return extractResourceClaim(resourceClaim, fieldManager, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractResourceClaimStatus is the same as ExtractResourceClaim except
|
|
||||||
// that it extracts the status subresource applied configuration.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractResourceClaimStatus(resourceClaim *resourcev1alpha3.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) {
|
|
||||||
return extractResourceClaim(resourceClaim, fieldManager, "status")
|
|
||||||
}
|
|
||||||
|
|
||||||
func extractResourceClaim(resourceClaim *resourcev1alpha3.ResourceClaim, fieldManager string, subresource string) (*ResourceClaimApplyConfiguration, error) {
|
|
||||||
b := &ResourceClaimApplyConfiguration{}
|
|
||||||
err := managedfields.ExtractInto(resourceClaim, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClaim"), fieldManager, b, subresource)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
b.WithName(resourceClaim.Name)
|
|
||||||
b.WithNamespace(resourceClaim.Namespace)
|
|
||||||
|
|
||||||
b.WithKind("ResourceClaim")
|
|
||||||
b.WithAPIVersion("resource.k8s.io/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 *ResourceClaimApplyConfiguration) WithKind(value string) *ResourceClaimApplyConfiguration {
|
|
||||||
b.TypeMetaApplyConfiguration.Kind = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithAPIVersion(value string) *ResourceClaimApplyConfiguration {
|
|
||||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithName sets the Name field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Name field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithName(value string) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithGenerateName(value string) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithNamespace(value string) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUID sets the UID field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the UID field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithUID(value types.UID) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.UID = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithResourceVersion(value string) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Generation field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithGeneration(value int64) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
|
||||||
// overwriting an existing map entries in Labels field with the same key.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
|
||||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
|
||||||
// overwriting an existing map entries in Annotations field with the same key.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
|
||||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithOwnerReferences")
|
|
||||||
}
|
|
||||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *ResourceClaimApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
|
||||||
if b.ObjectMetaApplyConfiguration == nil {
|
|
||||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Spec field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithSpec(value *ResourceClaimSpecApplyConfiguration) *ResourceClaimApplyConfiguration {
|
|
||||||
b.Spec = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithStatus sets the Status field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Status field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) WithStatus(value *ResourceClaimStatusApplyConfiguration) *ResourceClaimApplyConfiguration {
|
|
||||||
b.Status = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
|
||||||
func (b *ResourceClaimApplyConfiguration) GetName() *string {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
return b.ObjectMetaApplyConfiguration.Name
|
|
||||||
}
|
|
@@ -1,70 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceClaimConsumerReferenceApplyConfiguration represents a declarative configuration of the ResourceClaimConsumerReference type for use
|
|
||||||
// with apply.
|
|
||||||
type ResourceClaimConsumerReferenceApplyConfiguration struct {
|
|
||||||
APIGroup *string `json:"apiGroup,omitempty"`
|
|
||||||
Resource *string `json:"resource,omitempty"`
|
|
||||||
Name *string `json:"name,omitempty"`
|
|
||||||
UID *types.UID `json:"uid,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimConsumerReferenceApplyConfiguration constructs a declarative configuration of the ResourceClaimConsumerReference type for use with
|
|
||||||
// apply.
|
|
||||||
func ResourceClaimConsumerReference() *ResourceClaimConsumerReferenceApplyConfiguration {
|
|
||||||
return &ResourceClaimConsumerReferenceApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAPIGroup sets the APIGroup field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the APIGroup field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimConsumerReferenceApplyConfiguration) WithAPIGroup(value string) *ResourceClaimConsumerReferenceApplyConfiguration {
|
|
||||||
b.APIGroup = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithResource sets the Resource field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Resource field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimConsumerReferenceApplyConfiguration) WithResource(value string) *ResourceClaimConsumerReferenceApplyConfiguration {
|
|
||||||
b.Resource = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithName sets the Name field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Name field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimConsumerReferenceApplyConfiguration) WithName(value string) *ResourceClaimConsumerReferenceApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUID sets the UID field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the UID field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimConsumerReferenceApplyConfiguration) WithUID(value types.UID) *ResourceClaimConsumerReferenceApplyConfiguration {
|
|
||||||
b.UID = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// ResourceClaimSpecApplyConfiguration represents a declarative configuration of the ResourceClaimSpec type for use
|
|
||||||
// with apply.
|
|
||||||
type ResourceClaimSpecApplyConfiguration struct {
|
|
||||||
Devices *DeviceClaimApplyConfiguration `json:"devices,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimSpecApplyConfiguration constructs a declarative configuration of the ResourceClaimSpec type for use with
|
|
||||||
// apply.
|
|
||||||
func ResourceClaimSpec() *ResourceClaimSpecApplyConfiguration {
|
|
||||||
return &ResourceClaimSpecApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDevices sets the Devices field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Devices field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimSpecApplyConfiguration) WithDevices(value *DeviceClaimApplyConfiguration) *ResourceClaimSpecApplyConfiguration {
|
|
||||||
b.Devices = value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// ResourceClaimStatusApplyConfiguration represents a declarative configuration of the ResourceClaimStatus type for use
|
|
||||||
// with apply.
|
|
||||||
type ResourceClaimStatusApplyConfiguration struct {
|
|
||||||
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
|
|
||||||
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
|
|
||||||
Devices []AllocatedDeviceStatusApplyConfiguration `json:"devices,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimStatusApplyConfiguration constructs a declarative configuration of the ResourceClaimStatus type for use with
|
|
||||||
// apply.
|
|
||||||
func ResourceClaimStatus() *ResourceClaimStatusApplyConfiguration {
|
|
||||||
return &ResourceClaimStatusApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllocation sets the Allocation field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Allocation field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimStatusApplyConfiguration) WithAllocation(value *AllocationResultApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
|
|
||||||
b.Allocation = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithReservedFor adds the given value to the ReservedFor field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the ReservedFor field.
|
|
||||||
func (b *ResourceClaimStatusApplyConfiguration) WithReservedFor(values ...*ResourceClaimConsumerReferenceApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithReservedFor")
|
|
||||||
}
|
|
||||||
b.ReservedFor = append(b.ReservedFor, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDevices adds the given value to the Devices field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Devices field.
|
|
||||||
func (b *ResourceClaimStatusApplyConfiguration) WithDevices(values ...*AllocatedDeviceStatusApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithDevices")
|
|
||||||
}
|
|
||||||
b.Devices = append(b.Devices, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,255 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
|
||||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceClaimTemplateApplyConfiguration represents a declarative configuration of the ResourceClaimTemplate type for use
|
|
||||||
// with apply.
|
|
||||||
type ResourceClaimTemplateApplyConfiguration struct {
|
|
||||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
|
||||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
|
||||||
Spec *ResourceClaimTemplateSpecApplyConfiguration `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimTemplate constructs a declarative configuration of the ResourceClaimTemplate type for use with
|
|
||||||
// apply.
|
|
||||||
func ResourceClaimTemplate(name, namespace string) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b := &ResourceClaimTemplateApplyConfiguration{}
|
|
||||||
b.WithName(name)
|
|
||||||
b.WithNamespace(namespace)
|
|
||||||
b.WithKind("ResourceClaimTemplate")
|
|
||||||
b.WithAPIVersion("resource.k8s.io/v1alpha3")
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractResourceClaimTemplate extracts the applied configuration owned by fieldManager from
|
|
||||||
// resourceClaimTemplate. If no managedFields are found in resourceClaimTemplate for fieldManager, a
|
|
||||||
// ResourceClaimTemplateApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
|
||||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
|
||||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
|
||||||
// the fieldManager never owned fields any fields.
|
|
||||||
// resourceClaimTemplate must be a unmodified ResourceClaimTemplate API object that was retrieved from the Kubernetes API.
|
|
||||||
// ExtractResourceClaimTemplate provides a way to perform a extract/modify-in-place/apply workflow.
|
|
||||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
|
||||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) {
|
|
||||||
return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractResourceClaimTemplateStatus is the same as ExtractResourceClaimTemplate except
|
|
||||||
// that it extracts the status subresource applied configuration.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractResourceClaimTemplateStatus(resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) {
|
|
||||||
return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "status")
|
|
||||||
}
|
|
||||||
|
|
||||||
func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplate, fieldManager string, subresource string) (*ResourceClaimTemplateApplyConfiguration, error) {
|
|
||||||
b := &ResourceClaimTemplateApplyConfiguration{}
|
|
||||||
err := managedfields.ExtractInto(resourceClaimTemplate, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClaimTemplate"), fieldManager, b, subresource)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
b.WithName(resourceClaimTemplate.Name)
|
|
||||||
b.WithNamespace(resourceClaimTemplate.Namespace)
|
|
||||||
|
|
||||||
b.WithKind("ResourceClaimTemplate")
|
|
||||||
b.WithAPIVersion("resource.k8s.io/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 *ResourceClaimTemplateApplyConfiguration) WithKind(value string) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.TypeMetaApplyConfiguration.Kind = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithAPIVersion(value string) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithName sets the Name field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Name field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithName(value string) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithGenerateName(value string) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithNamespace(value string) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUID sets the UID field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the UID field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithUID(value types.UID) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.UID = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithResourceVersion(value string) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Generation field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithGeneration(value int64) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
|
||||||
// overwriting an existing map entries in Labels field with the same key.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
|
||||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
|
||||||
// overwriting an existing map entries in Annotations field with the same key.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
|
||||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithOwnerReferences")
|
|
||||||
}
|
|
||||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
|
||||||
if b.ObjectMetaApplyConfiguration == nil {
|
|
||||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Spec field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) WithSpec(value *ResourceClaimTemplateSpecApplyConfiguration) *ResourceClaimTemplateApplyConfiguration {
|
|
||||||
b.Spec = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
|
||||||
func (b *ResourceClaimTemplateApplyConfiguration) GetName() *string {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
return b.ObjectMetaApplyConfiguration.Name
|
|
||||||
}
|
|
@@ -1,194 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceClaimTemplateSpecApplyConfiguration represents a declarative configuration of the ResourceClaimTemplateSpec type for use
|
|
||||||
// with apply.
|
|
||||||
type ResourceClaimTemplateSpecApplyConfiguration struct {
|
|
||||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
|
||||||
Spec *ResourceClaimSpecApplyConfiguration `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimTemplateSpecApplyConfiguration constructs a declarative configuration of the ResourceClaimTemplateSpec type for use with
|
|
||||||
// apply.
|
|
||||||
func ResourceClaimTemplateSpec() *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
return &ResourceClaimTemplateSpecApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithName sets the Name field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Name field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithName(value string) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithGenerateName(value string) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithNamespace(value string) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUID sets the UID field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the UID field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithUID(value types.UID) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.UID = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithResourceVersion(value string) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Generation field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithGeneration(value int64) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
|
||||||
// overwriting an existing map entries in Labels field with the same key.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
|
||||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
|
||||||
// overwriting an existing map entries in Annotations field with the same key.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
|
||||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithOwnerReferences")
|
|
||||||
}
|
|
||||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
|
||||||
if b.ObjectMetaApplyConfiguration == nil {
|
|
||||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Spec field is set to the value of the last call.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithSpec(value *ResourceClaimSpecApplyConfiguration) *ResourceClaimTemplateSpecApplyConfiguration {
|
|
||||||
b.Spec = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
|
||||||
func (b *ResourceClaimTemplateSpecApplyConfiguration) GetName() *string {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
return b.ObjectMetaApplyConfiguration.Name
|
|
||||||
}
|
|
@@ -1,57 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
// ResourcePoolApplyConfiguration represents a declarative configuration of the ResourcePool type for use
|
|
||||||
// with apply.
|
|
||||||
type ResourcePoolApplyConfiguration struct {
|
|
||||||
Name *string `json:"name,omitempty"`
|
|
||||||
Generation *int64 `json:"generation,omitempty"`
|
|
||||||
ResourceSliceCount *int64 `json:"resourceSliceCount,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourcePoolApplyConfiguration constructs a declarative configuration of the ResourcePool type for use with
|
|
||||||
// apply.
|
|
||||||
func ResourcePool() *ResourcePoolApplyConfiguration {
|
|
||||||
return &ResourcePoolApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithName sets the Name field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Name field is set to the value of the last call.
|
|
||||||
func (b *ResourcePoolApplyConfiguration) WithName(value string) *ResourcePoolApplyConfiguration {
|
|
||||||
b.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Generation field is set to the value of the last call.
|
|
||||||
func (b *ResourcePoolApplyConfiguration) WithGeneration(value int64) *ResourcePoolApplyConfiguration {
|
|
||||||
b.Generation = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithResourceSliceCount sets the ResourceSliceCount field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the ResourceSliceCount field is set to the value of the last call.
|
|
||||||
func (b *ResourcePoolApplyConfiguration) WithResourceSliceCount(value int64) *ResourcePoolApplyConfiguration {
|
|
||||||
b.ResourceSliceCount = &value
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1,253 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
|
||||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceSliceApplyConfiguration represents a declarative configuration of the ResourceSlice type for use
|
|
||||||
// with apply.
|
|
||||||
type ResourceSliceApplyConfiguration struct {
|
|
||||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
|
||||||
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
|
|
||||||
Spec *ResourceSliceSpecApplyConfiguration `json:"spec,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceSlice constructs a declarative configuration of the ResourceSlice type for use with
|
|
||||||
// apply.
|
|
||||||
func ResourceSlice(name string) *ResourceSliceApplyConfiguration {
|
|
||||||
b := &ResourceSliceApplyConfiguration{}
|
|
||||||
b.WithName(name)
|
|
||||||
b.WithKind("ResourceSlice")
|
|
||||||
b.WithAPIVersion("resource.k8s.io/v1alpha3")
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractResourceSlice extracts the applied configuration owned by fieldManager from
|
|
||||||
// resourceSlice. If no managedFields are found in resourceSlice for fieldManager, a
|
|
||||||
// ResourceSliceApplyConfiguration is returned with only the Name, Namespace (if applicable),
|
|
||||||
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
|
|
||||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
|
||||||
// the fieldManager never owned fields any fields.
|
|
||||||
// resourceSlice must be a unmodified ResourceSlice API object that was retrieved from the Kubernetes API.
|
|
||||||
// ExtractResourceSlice provides a way to perform a extract/modify-in-place/apply workflow.
|
|
||||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
|
||||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractResourceSlice(resourceSlice *resourcev1alpha3.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) {
|
|
||||||
return extractResourceSlice(resourceSlice, fieldManager, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExtractResourceSliceStatus is the same as ExtractResourceSlice except
|
|
||||||
// that it extracts the status subresource applied configuration.
|
|
||||||
// Experimental!
|
|
||||||
func ExtractResourceSliceStatus(resourceSlice *resourcev1alpha3.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) {
|
|
||||||
return extractResourceSlice(resourceSlice, fieldManager, "status")
|
|
||||||
}
|
|
||||||
|
|
||||||
func extractResourceSlice(resourceSlice *resourcev1alpha3.ResourceSlice, fieldManager string, subresource string) (*ResourceSliceApplyConfiguration, error) {
|
|
||||||
b := &ResourceSliceApplyConfiguration{}
|
|
||||||
err := managedfields.ExtractInto(resourceSlice, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceSlice"), fieldManager, b, subresource)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
b.WithName(resourceSlice.Name)
|
|
||||||
|
|
||||||
b.WithKind("ResourceSlice")
|
|
||||||
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 *ResourceSliceApplyConfiguration) WithKind(value string) *ResourceSliceApplyConfiguration {
|
|
||||||
b.TypeMetaApplyConfiguration.Kind = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithAPIVersion(value string) *ResourceSliceApplyConfiguration {
|
|
||||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithName sets the Name field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Name field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithName(value string) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Name = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithGenerateName(value string) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNamespace sets the Namespace field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithNamespace(value string) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithUID sets the UID field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the UID field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithUID(value types.UID) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.UID = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithResourceVersion(value string) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithGeneration sets the Generation field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Generation field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithGeneration(value int64) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithLabels puts the entries into the Labels field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Labels field,
|
|
||||||
// overwriting an existing map entries in Labels field with the same key.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithLabels(entries map[string]string) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
|
||||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the entries provided by each call will be put on the Annotations field,
|
|
||||||
// overwriting an existing map entries in Annotations field with the same key.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
|
||||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
|
||||||
}
|
|
||||||
for k, v := range entries {
|
|
||||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithOwnerReferences")
|
|
||||||
}
|
|
||||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Finalizers field.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithFinalizers(values ...string) *ResourceSliceApplyConfiguration {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
for i := range values {
|
|
||||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
func (b *ResourceSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
|
|
||||||
if b.ObjectMetaApplyConfiguration == nil {
|
|
||||||
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSpec sets the Spec field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Spec field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) WithSpec(value *ResourceSliceSpecApplyConfiguration) *ResourceSliceApplyConfiguration {
|
|
||||||
b.Spec = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
|
||||||
func (b *ResourceSliceApplyConfiguration) GetName() *string {
|
|
||||||
b.ensureObjectMetaApplyConfigurationExists()
|
|
||||||
return b.ObjectMetaApplyConfiguration.Name
|
|
||||||
}
|
|
@@ -1,116 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1 "k8s.io/client-go/applyconfigurations/core/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceSliceSpecApplyConfiguration represents a declarative configuration of the ResourceSliceSpec type for use
|
|
||||||
// with apply.
|
|
||||||
type ResourceSliceSpecApplyConfiguration struct {
|
|
||||||
Driver *string `json:"driver,omitempty"`
|
|
||||||
Pool *ResourcePoolApplyConfiguration `json:"pool,omitempty"`
|
|
||||||
NodeName *string `json:"nodeName,omitempty"`
|
|
||||||
NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"`
|
|
||||||
AllNodes *bool `json:"allNodes,omitempty"`
|
|
||||||
Devices []DeviceApplyConfiguration `json:"devices,omitempty"`
|
|
||||||
PerDeviceNodeSelection *bool `json:"perDeviceNodeSelection,omitempty"`
|
|
||||||
SharedCounters []CounterSetApplyConfiguration `json:"sharedCounters,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceSliceSpecApplyConfiguration constructs a declarative configuration of the ResourceSliceSpec type for use with
|
|
||||||
// apply.
|
|
||||||
func ResourceSliceSpec() *ResourceSliceSpecApplyConfiguration {
|
|
||||||
return &ResourceSliceSpecApplyConfiguration{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDriver sets the Driver field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Driver field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceSpecApplyConfiguration) WithDriver(value string) *ResourceSliceSpecApplyConfiguration {
|
|
||||||
b.Driver = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPool sets the Pool field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the Pool field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceSpecApplyConfiguration) WithPool(value *ResourcePoolApplyConfiguration) *ResourceSliceSpecApplyConfiguration {
|
|
||||||
b.Pool = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNodeName sets the NodeName field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the NodeName field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceSpecApplyConfiguration) WithNodeName(value string) *ResourceSliceSpecApplyConfiguration {
|
|
||||||
b.NodeName = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the NodeSelector field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceSpecApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *ResourceSliceSpecApplyConfiguration {
|
|
||||||
b.NodeSelector = value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAllNodes sets the AllNodes field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the AllNodes field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceSpecApplyConfiguration) WithAllNodes(value bool) *ResourceSliceSpecApplyConfiguration {
|
|
||||||
b.AllNodes = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDevices adds the given value to the Devices field in the declarative configuration
|
|
||||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
||||||
// If called multiple times, values provided by each call will be appended to the Devices field.
|
|
||||||
func (b *ResourceSliceSpecApplyConfiguration) WithDevices(values ...*DeviceApplyConfiguration) *ResourceSliceSpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithDevices")
|
|
||||||
}
|
|
||||||
b.Devices = append(b.Devices, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPerDeviceNodeSelection sets the PerDeviceNodeSelection field in the declarative configuration to the given value
|
|
||||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
||||||
// If called multiple times, the PerDeviceNodeSelection field is set to the value of the last call.
|
|
||||||
func (b *ResourceSliceSpecApplyConfiguration) WithPerDeviceNodeSelection(value bool) *ResourceSliceSpecApplyConfiguration {
|
|
||||||
b.PerDeviceNodeSelection = &value
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSharedCounters adds the given value to the SharedCounters 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 SharedCounters field.
|
|
||||||
func (b *ResourceSliceSpecApplyConfiguration) WithSharedCounters(values ...*CounterSetApplyConfiguration) *ResourceSliceSpecApplyConfiguration {
|
|
||||||
for i := range values {
|
|
||||||
if values[i] == nil {
|
|
||||||
panic("nil value passed to WithSharedCounters")
|
|
||||||
}
|
|
||||||
b.SharedCounters = append(b.SharedCounters, *values[i])
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
@@ -1594,50 +1594,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{}
|
return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{}
|
||||||
|
|
||||||
// Group=resource.k8s.io, Version=v1alpha3
|
// Group=resource.k8s.io, Version=v1alpha3
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("AllocatedDeviceStatus"):
|
|
||||||
return &resourcev1alpha3.AllocatedDeviceStatusApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("AllocationResult"):
|
|
||||||
return &resourcev1alpha3.AllocationResultApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("BasicDevice"):
|
|
||||||
return &resourcev1alpha3.BasicDeviceApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("CELDeviceSelector"):
|
case v1alpha3.SchemeGroupVersion.WithKind("CELDeviceSelector"):
|
||||||
return &resourcev1alpha3.CELDeviceSelectorApplyConfiguration{}
|
return &resourcev1alpha3.CELDeviceSelectorApplyConfiguration{}
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("Counter"):
|
|
||||||
return &resourcev1alpha3.CounterApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("CounterSet"):
|
|
||||||
return &resourcev1alpha3.CounterSetApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("Device"):
|
|
||||||
return &resourcev1alpha3.DeviceApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceAllocationConfiguration"):
|
|
||||||
return &resourcev1alpha3.DeviceAllocationConfigurationApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceAllocationResult"):
|
|
||||||
return &resourcev1alpha3.DeviceAllocationResultApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceAttribute"):
|
|
||||||
return &resourcev1alpha3.DeviceAttributeApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceClaim"):
|
|
||||||
return &resourcev1alpha3.DeviceClaimApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceClaimConfiguration"):
|
|
||||||
return &resourcev1alpha3.DeviceClaimConfigurationApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceClass"):
|
|
||||||
return &resourcev1alpha3.DeviceClassApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceClassConfiguration"):
|
|
||||||
return &resourcev1alpha3.DeviceClassConfigurationApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceClassSpec"):
|
|
||||||
return &resourcev1alpha3.DeviceClassSpecApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceConfiguration"):
|
|
||||||
return &resourcev1alpha3.DeviceConfigurationApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceConstraint"):
|
|
||||||
return &resourcev1alpha3.DeviceConstraintApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceCounterConsumption"):
|
|
||||||
return &resourcev1alpha3.DeviceCounterConsumptionApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceRequest"):
|
|
||||||
return &resourcev1alpha3.DeviceRequestApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceRequestAllocationResult"):
|
|
||||||
return &resourcev1alpha3.DeviceRequestAllocationResultApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSelector"):
|
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSelector"):
|
||||||
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
|
return &resourcev1alpha3.DeviceSelectorApplyConfiguration{}
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceSubRequest"):
|
|
||||||
return &resourcev1alpha3.DeviceSubRequestApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaint"):
|
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaint"):
|
||||||
return &resourcev1alpha3.DeviceTaintApplyConfiguration{}
|
return &resourcev1alpha3.DeviceTaintApplyConfiguration{}
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRule"):
|
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintRule"):
|
||||||
@@ -1646,30 +1606,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
|||||||
return &resourcev1alpha3.DeviceTaintRuleSpecApplyConfiguration{}
|
return &resourcev1alpha3.DeviceTaintRuleSpecApplyConfiguration{}
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintSelector"):
|
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintSelector"):
|
||||||
return &resourcev1alpha3.DeviceTaintSelectorApplyConfiguration{}
|
return &resourcev1alpha3.DeviceTaintSelectorApplyConfiguration{}
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("DeviceToleration"):
|
|
||||||
return &resourcev1alpha3.DeviceTolerationApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("NetworkDeviceData"):
|
|
||||||
return &resourcev1alpha3.NetworkDeviceDataApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"):
|
|
||||||
return &resourcev1alpha3.OpaqueDeviceConfigurationApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaim"):
|
|
||||||
return &resourcev1alpha3.ResourceClaimApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"):
|
|
||||||
return &resourcev1alpha3.ResourceClaimConsumerReferenceApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimSpec"):
|
|
||||||
return &resourcev1alpha3.ResourceClaimSpecApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimStatus"):
|
|
||||||
return &resourcev1alpha3.ResourceClaimStatusApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplate"):
|
|
||||||
return &resourcev1alpha3.ResourceClaimTemplateApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"):
|
|
||||||
return &resourcev1alpha3.ResourceClaimTemplateSpecApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourcePool"):
|
|
||||||
return &resourcev1alpha3.ResourcePoolApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceSlice"):
|
|
||||||
return &resourcev1alpha3.ResourceSliceApplyConfiguration{}
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithKind("ResourceSliceSpec"):
|
|
||||||
return &resourcev1alpha3.ResourceSliceSpecApplyConfiguration{}
|
|
||||||
|
|
||||||
// Group=resource.k8s.io, Version=v1beta1
|
// Group=resource.k8s.io, Version=v1beta1
|
||||||
case resourcev1beta1.SchemeGroupVersion.WithKind("AllocatedDeviceStatus"):
|
case resourcev1beta1.SchemeGroupVersion.WithKind("AllocatedDeviceStatus"):
|
||||||
|
@@ -379,16 +379,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
|
||||||
|
|
||||||
// Group=resource.k8s.io, Version=v1alpha3
|
// 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"):
|
case v1alpha3.SchemeGroupVersion.WithResource("devicetaintrules"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().DeviceTaintRules().Informer()}, nil
|
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"):
|
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaimTemplates().Informer()}, nil
|
|
||||||
case v1alpha3.SchemeGroupVersion.WithResource("resourceslices"):
|
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceSlices().Informer()}, nil
|
|
||||||
|
|
||||||
// Group=resource.k8s.io, Version=v1beta1
|
// Group=resource.k8s.io, Version=v1beta1
|
||||||
case resourcev1beta1.SchemeGroupVersion.WithResource("deviceclasses"):
|
case resourcev1beta1.SchemeGroupVersion.WithResource("deviceclasses"):
|
||||||
|
@@ -1,101 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeviceClassInformer provides access to a shared informer and lister for
|
|
||||||
// DeviceClasses.
|
|
||||||
type DeviceClassInformer interface {
|
|
||||||
Informer() cache.SharedIndexInformer
|
|
||||||
Lister() resourcev1alpha3.DeviceClassLister
|
|
||||||
}
|
|
||||||
|
|
||||||
type deviceClassInformer struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeviceClassInformer constructs a new informer for DeviceClass type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewDeviceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredDeviceClassInformer(client, resyncPeriod, indexers, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFilteredDeviceClassInformer constructs a new informer for DeviceClass type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewFilteredDeviceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
|
||||||
return cache.NewSharedIndexInformer(
|
|
||||||
&cache.ListWatch{
|
|
||||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().DeviceClasses().List(context.Background(), options)
|
|
||||||
},
|
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().DeviceClasses().Watch(context.Background(), options)
|
|
||||||
},
|
|
||||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().DeviceClasses().List(ctx, options)
|
|
||||||
},
|
|
||||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().DeviceClasses().Watch(ctx, options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
&apiresourcev1alpha3.DeviceClass{},
|
|
||||||
resyncPeriod,
|
|
||||||
indexers,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *deviceClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredDeviceClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *deviceClassInformer) Informer() cache.SharedIndexInformer {
|
|
||||||
return f.factory.InformerFor(&apiresourcev1alpha3.DeviceClass{}, f.defaultInformer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *deviceClassInformer) Lister() resourcev1alpha3.DeviceClassLister {
|
|
||||||
return resourcev1alpha3.NewDeviceClassLister(f.Informer().GetIndexer())
|
|
||||||
}
|
|
@@ -24,16 +24,8 @@ import (
|
|||||||
|
|
||||||
// Interface provides access to all the informers in this group version.
|
// Interface provides access to all the informers in this group version.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
// DeviceClasses returns a DeviceClassInformer.
|
|
||||||
DeviceClasses() DeviceClassInformer
|
|
||||||
// DeviceTaintRules returns a DeviceTaintRuleInformer.
|
// DeviceTaintRules returns a DeviceTaintRuleInformer.
|
||||||
DeviceTaintRules() DeviceTaintRuleInformer
|
DeviceTaintRules() DeviceTaintRuleInformer
|
||||||
// ResourceClaims returns a ResourceClaimInformer.
|
|
||||||
ResourceClaims() ResourceClaimInformer
|
|
||||||
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
|
|
||||||
ResourceClaimTemplates() ResourceClaimTemplateInformer
|
|
||||||
// ResourceSlices returns a ResourceSliceInformer.
|
|
||||||
ResourceSlices() ResourceSliceInformer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type version struct {
|
type version struct {
|
||||||
@@ -47,27 +39,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeviceClasses returns a DeviceClassInformer.
|
|
||||||
func (v *version) DeviceClasses() DeviceClassInformer {
|
|
||||||
return &deviceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceTaintRules returns a DeviceTaintRuleInformer.
|
// DeviceTaintRules returns a DeviceTaintRuleInformer.
|
||||||
func (v *version) DeviceTaintRules() DeviceTaintRuleInformer {
|
func (v *version) DeviceTaintRules() DeviceTaintRuleInformer {
|
||||||
return &deviceTaintRuleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
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}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
|
|
||||||
func (v *version) ResourceClaimTemplates() ResourceClaimTemplateInformer {
|
|
||||||
return &resourceClaimTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceSlices returns a ResourceSliceInformer.
|
|
||||||
func (v *version) ResourceSlices() ResourceSliceInformer {
|
|
||||||
return &resourceSliceInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
|
||||||
}
|
|
||||||
|
@@ -1,102 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceClaimInformer provides access to a shared informer and lister for
|
|
||||||
// ResourceClaims.
|
|
||||||
type ResourceClaimInformer interface {
|
|
||||||
Informer() cache.SharedIndexInformer
|
|
||||||
Lister() resourcev1alpha3.ResourceClaimLister
|
|
||||||
}
|
|
||||||
|
|
||||||
type resourceClaimInformer struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
namespace string
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewResourceClaimInformer constructs a new informer for ResourceClaim type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewResourceClaimInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredResourceClaimInformer(client, namespace, resyncPeriod, indexers, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFilteredResourceClaimInformer constructs a new informer for ResourceClaim type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewFilteredResourceClaimInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
|
||||||
return cache.NewSharedIndexInformer(
|
|
||||||
&cache.ListWatch{
|
|
||||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceClaims(namespace).List(context.Background(), options)
|
|
||||||
},
|
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceClaims(namespace).Watch(context.Background(), options)
|
|
||||||
},
|
|
||||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceClaims(namespace).List(ctx, options)
|
|
||||||
},
|
|
||||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceClaims(namespace).Watch(ctx, options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
&apiresourcev1alpha3.ResourceClaim{},
|
|
||||||
resyncPeriod,
|
|
||||||
indexers,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *resourceClaimInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredResourceClaimInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *resourceClaimInformer) Informer() cache.SharedIndexInformer {
|
|
||||||
return f.factory.InformerFor(&apiresourcev1alpha3.ResourceClaim{}, f.defaultInformer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *resourceClaimInformer) Lister() resourcev1alpha3.ResourceClaimLister {
|
|
||||||
return resourcev1alpha3.NewResourceClaimLister(f.Informer().GetIndexer())
|
|
||||||
}
|
|
@@ -1,102 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceClaimTemplateInformer provides access to a shared informer and lister for
|
|
||||||
// ResourceClaimTemplates.
|
|
||||||
type ResourceClaimTemplateInformer interface {
|
|
||||||
Informer() cache.SharedIndexInformer
|
|
||||||
Lister() resourcev1alpha3.ResourceClaimTemplateLister
|
|
||||||
}
|
|
||||||
|
|
||||||
type resourceClaimTemplateInformer struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
namespace string
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewResourceClaimTemplateInformer constructs a new informer for ResourceClaimTemplate type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewResourceClaimTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredResourceClaimTemplateInformer(client, namespace, resyncPeriod, indexers, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFilteredResourceClaimTemplateInformer constructs a new informer for ResourceClaimTemplate type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewFilteredResourceClaimTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
|
||||||
return cache.NewSharedIndexInformer(
|
|
||||||
&cache.ListWatch{
|
|
||||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceClaimTemplates(namespace).List(context.Background(), options)
|
|
||||||
},
|
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceClaimTemplates(namespace).Watch(context.Background(), options)
|
|
||||||
},
|
|
||||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceClaimTemplates(namespace).List(ctx, options)
|
|
||||||
},
|
|
||||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceClaimTemplates(namespace).Watch(ctx, options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
&apiresourcev1alpha3.ResourceClaimTemplate{},
|
|
||||||
resyncPeriod,
|
|
||||||
indexers,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *resourceClaimTemplateInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredResourceClaimTemplateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer {
|
|
||||||
return f.factory.InformerFor(&apiresourcev1alpha3.ResourceClaimTemplate{}, f.defaultInformer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *resourceClaimTemplateInformer) Lister() resourcev1alpha3.ResourceClaimTemplateLister {
|
|
||||||
return resourcev1alpha3.NewResourceClaimTemplateLister(f.Informer().GetIndexer())
|
|
||||||
}
|
|
@@ -1,101 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by informer-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceSliceInformer provides access to a shared informer and lister for
|
|
||||||
// ResourceSlices.
|
|
||||||
type ResourceSliceInformer interface {
|
|
||||||
Informer() cache.SharedIndexInformer
|
|
||||||
Lister() resourcev1alpha3.ResourceSliceLister
|
|
||||||
}
|
|
||||||
|
|
||||||
type resourceSliceInformer struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewResourceSliceInformer constructs a new informer for ResourceSlice type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewResourceSliceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredResourceSliceInformer(client, resyncPeriod, indexers, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFilteredResourceSliceInformer constructs a new informer for ResourceSlice type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewFilteredResourceSliceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
|
||||||
return cache.NewSharedIndexInformer(
|
|
||||||
&cache.ListWatch{
|
|
||||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceSlices().List(context.Background(), options)
|
|
||||||
},
|
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceSlices().Watch(context.Background(), options)
|
|
||||||
},
|
|
||||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceSlices().List(ctx, options)
|
|
||||||
},
|
|
||||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.ResourceV1alpha3().ResourceSlices().Watch(ctx, options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
&apiresourcev1alpha3.ResourceSlice{},
|
|
||||||
resyncPeriod,
|
|
||||||
indexers,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *resourceSliceInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredResourceSliceInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *resourceSliceInformer) Informer() cache.SharedIndexInformer {
|
|
||||||
return f.factory.InformerFor(&apiresourcev1alpha3.ResourceSlice{}, f.defaultInformer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *resourceSliceInformer) Lister() resourcev1alpha3.ResourceSliceLister {
|
|
||||||
return resourcev1alpha3.NewResourceSliceLister(f.Informer().GetIndexer())
|
|
||||||
}
|
|
@@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeviceClassesGetter has a method to return a DeviceClassInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type DeviceClassesGetter interface {
|
|
||||||
DeviceClasses() DeviceClassInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeviceClassInterface has methods to work with DeviceClass resources.
|
|
||||||
type DeviceClassInterface interface {
|
|
||||||
Create(ctx context.Context, deviceClass *resourcev1alpha3.DeviceClass, opts v1.CreateOptions) (*resourcev1alpha3.DeviceClass, error)
|
|
||||||
Update(ctx context.Context, deviceClass *resourcev1alpha3.DeviceClass, opts v1.UpdateOptions) (*resourcev1alpha3.DeviceClass, error)
|
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*resourcev1alpha3.DeviceClass, error)
|
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.DeviceClassList, error)
|
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1alpha3.DeviceClass, err error)
|
|
||||||
Apply(ctx context.Context, deviceClass *applyconfigurationsresourcev1alpha3.DeviceClassApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.DeviceClass, err error)
|
|
||||||
DeviceClassExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// deviceClasses implements DeviceClassInterface
|
|
||||||
type deviceClasses struct {
|
|
||||||
*gentype.ClientWithListAndApply[*resourcev1alpha3.DeviceClass, *resourcev1alpha3.DeviceClassList, *applyconfigurationsresourcev1alpha3.DeviceClassApplyConfiguration]
|
|
||||||
}
|
|
||||||
|
|
||||||
// newDeviceClasses returns a DeviceClasses
|
|
||||||
func newDeviceClasses(c *ResourceV1alpha3Client) *deviceClasses {
|
|
||||||
return &deviceClasses{
|
|
||||||
gentype.NewClientWithListAndApply[*resourcev1alpha3.DeviceClass, *resourcev1alpha3.DeviceClassList, *applyconfigurationsresourcev1alpha3.DeviceClassApplyConfiguration](
|
|
||||||
"deviceclasses",
|
|
||||||
c.RESTClient(),
|
|
||||||
scheme.ParameterCodec,
|
|
||||||
"",
|
|
||||||
func() *resourcev1alpha3.DeviceClass { return &resourcev1alpha3.DeviceClass{} },
|
|
||||||
func() *resourcev1alpha3.DeviceClassList { return &resourcev1alpha3.DeviceClassList{} },
|
|
||||||
gentype.PrefersProtobuf[*resourcev1alpha3.DeviceClass](),
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// fakeDeviceClasses implements DeviceClassInterface
|
|
||||||
type fakeDeviceClasses struct {
|
|
||||||
*gentype.FakeClientWithListAndApply[*v1alpha3.DeviceClass, *v1alpha3.DeviceClassList, *resourcev1alpha3.DeviceClassApplyConfiguration]
|
|
||||||
Fake *FakeResourceV1alpha3
|
|
||||||
}
|
|
||||||
|
|
||||||
func newFakeDeviceClasses(fake *FakeResourceV1alpha3) typedresourcev1alpha3.DeviceClassInterface {
|
|
||||||
return &fakeDeviceClasses{
|
|
||||||
gentype.NewFakeClientWithListAndApply[*v1alpha3.DeviceClass, *v1alpha3.DeviceClassList, *resourcev1alpha3.DeviceClassApplyConfiguration](
|
|
||||||
fake.Fake,
|
|
||||||
"",
|
|
||||||
v1alpha3.SchemeGroupVersion.WithResource("deviceclasses"),
|
|
||||||
v1alpha3.SchemeGroupVersion.WithKind("DeviceClass"),
|
|
||||||
func() *v1alpha3.DeviceClass { return &v1alpha3.DeviceClass{} },
|
|
||||||
func() *v1alpha3.DeviceClassList { return &v1alpha3.DeviceClassList{} },
|
|
||||||
func(dst, src *v1alpha3.DeviceClassList) { dst.ListMeta = src.ListMeta },
|
|
||||||
func(list *v1alpha3.DeviceClassList) []*v1alpha3.DeviceClass {
|
|
||||||
return gentype.ToPointerSlice(list.Items)
|
|
||||||
},
|
|
||||||
func(list *v1alpha3.DeviceClassList, items []*v1alpha3.DeviceClass) {
|
|
||||||
list.Items = gentype.FromPointerSlice(items)
|
|
||||||
},
|
|
||||||
),
|
|
||||||
fake,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -28,26 +28,10 @@ type FakeResourceV1alpha3 struct {
|
|||||||
*testing.Fake
|
*testing.Fake
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeResourceV1alpha3) DeviceClasses() v1alpha3.DeviceClassInterface {
|
|
||||||
return newFakeDeviceClasses(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeResourceV1alpha3) DeviceTaintRules() v1alpha3.DeviceTaintRuleInterface {
|
func (c *FakeResourceV1alpha3) DeviceTaintRules() v1alpha3.DeviceTaintRuleInterface {
|
||||||
return newFakeDeviceTaintRules(c)
|
return newFakeDeviceTaintRules(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeResourceV1alpha3) ResourceClaims(namespace string) v1alpha3.ResourceClaimInterface {
|
|
||||||
return newFakeResourceClaims(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeResourceV1alpha3) ResourceClaimTemplates(namespace string) v1alpha3.ResourceClaimTemplateInterface {
|
|
||||||
return newFakeResourceClaimTemplates(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeResourceV1alpha3) ResourceSlices() v1alpha3.ResourceSliceInterface {
|
|
||||||
return newFakeResourceSlices(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *FakeResourceV1alpha3) RESTClient() rest.Interface {
|
func (c *FakeResourceV1alpha3) RESTClient() rest.Interface {
|
||||||
|
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// fakeResourceClaims implements ResourceClaimInterface
|
|
||||||
type fakeResourceClaims struct {
|
|
||||||
*gentype.FakeClientWithListAndApply[*v1alpha3.ResourceClaim, *v1alpha3.ResourceClaimList, *resourcev1alpha3.ResourceClaimApplyConfiguration]
|
|
||||||
Fake *FakeResourceV1alpha3
|
|
||||||
}
|
|
||||||
|
|
||||||
func newFakeResourceClaims(fake *FakeResourceV1alpha3, namespace string) typedresourcev1alpha3.ResourceClaimInterface {
|
|
||||||
return &fakeResourceClaims{
|
|
||||||
gentype.NewFakeClientWithListAndApply[*v1alpha3.ResourceClaim, *v1alpha3.ResourceClaimList, *resourcev1alpha3.ResourceClaimApplyConfiguration](
|
|
||||||
fake.Fake,
|
|
||||||
namespace,
|
|
||||||
v1alpha3.SchemeGroupVersion.WithResource("resourceclaims"),
|
|
||||||
v1alpha3.SchemeGroupVersion.WithKind("ResourceClaim"),
|
|
||||||
func() *v1alpha3.ResourceClaim { return &v1alpha3.ResourceClaim{} },
|
|
||||||
func() *v1alpha3.ResourceClaimList { return &v1alpha3.ResourceClaimList{} },
|
|
||||||
func(dst, src *v1alpha3.ResourceClaimList) { dst.ListMeta = src.ListMeta },
|
|
||||||
func(list *v1alpha3.ResourceClaimList) []*v1alpha3.ResourceClaim {
|
|
||||||
return gentype.ToPointerSlice(list.Items)
|
|
||||||
},
|
|
||||||
func(list *v1alpha3.ResourceClaimList, items []*v1alpha3.ResourceClaim) {
|
|
||||||
list.Items = gentype.FromPointerSlice(items)
|
|
||||||
},
|
|
||||||
),
|
|
||||||
fake,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// fakeResourceClaimTemplates implements ResourceClaimTemplateInterface
|
|
||||||
type fakeResourceClaimTemplates struct {
|
|
||||||
*gentype.FakeClientWithListAndApply[*v1alpha3.ResourceClaimTemplate, *v1alpha3.ResourceClaimTemplateList, *resourcev1alpha3.ResourceClaimTemplateApplyConfiguration]
|
|
||||||
Fake *FakeResourceV1alpha3
|
|
||||||
}
|
|
||||||
|
|
||||||
func newFakeResourceClaimTemplates(fake *FakeResourceV1alpha3, namespace string) typedresourcev1alpha3.ResourceClaimTemplateInterface {
|
|
||||||
return &fakeResourceClaimTemplates{
|
|
||||||
gentype.NewFakeClientWithListAndApply[*v1alpha3.ResourceClaimTemplate, *v1alpha3.ResourceClaimTemplateList, *resourcev1alpha3.ResourceClaimTemplateApplyConfiguration](
|
|
||||||
fake.Fake,
|
|
||||||
namespace,
|
|
||||||
v1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"),
|
|
||||||
v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplate"),
|
|
||||||
func() *v1alpha3.ResourceClaimTemplate { return &v1alpha3.ResourceClaimTemplate{} },
|
|
||||||
func() *v1alpha3.ResourceClaimTemplateList { return &v1alpha3.ResourceClaimTemplateList{} },
|
|
||||||
func(dst, src *v1alpha3.ResourceClaimTemplateList) { dst.ListMeta = src.ListMeta },
|
|
||||||
func(list *v1alpha3.ResourceClaimTemplateList) []*v1alpha3.ResourceClaimTemplate {
|
|
||||||
return gentype.ToPointerSlice(list.Items)
|
|
||||||
},
|
|
||||||
func(list *v1alpha3.ResourceClaimTemplateList, items []*v1alpha3.ResourceClaimTemplate) {
|
|
||||||
list.Items = gentype.FromPointerSlice(items)
|
|
||||||
},
|
|
||||||
),
|
|
||||||
fake,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// fakeResourceSlices implements ResourceSliceInterface
|
|
||||||
type fakeResourceSlices struct {
|
|
||||||
*gentype.FakeClientWithListAndApply[*v1alpha3.ResourceSlice, *v1alpha3.ResourceSliceList, *resourcev1alpha3.ResourceSliceApplyConfiguration]
|
|
||||||
Fake *FakeResourceV1alpha3
|
|
||||||
}
|
|
||||||
|
|
||||||
func newFakeResourceSlices(fake *FakeResourceV1alpha3) typedresourcev1alpha3.ResourceSliceInterface {
|
|
||||||
return &fakeResourceSlices{
|
|
||||||
gentype.NewFakeClientWithListAndApply[*v1alpha3.ResourceSlice, *v1alpha3.ResourceSliceList, *resourcev1alpha3.ResourceSliceApplyConfiguration](
|
|
||||||
fake.Fake,
|
|
||||||
"",
|
|
||||||
v1alpha3.SchemeGroupVersion.WithResource("resourceslices"),
|
|
||||||
v1alpha3.SchemeGroupVersion.WithKind("ResourceSlice"),
|
|
||||||
func() *v1alpha3.ResourceSlice { return &v1alpha3.ResourceSlice{} },
|
|
||||||
func() *v1alpha3.ResourceSliceList { return &v1alpha3.ResourceSliceList{} },
|
|
||||||
func(dst, src *v1alpha3.ResourceSliceList) { dst.ListMeta = src.ListMeta },
|
|
||||||
func(list *v1alpha3.ResourceSliceList) []*v1alpha3.ResourceSlice {
|
|
||||||
return gentype.ToPointerSlice(list.Items)
|
|
||||||
},
|
|
||||||
func(list *v1alpha3.ResourceSliceList, items []*v1alpha3.ResourceSlice) {
|
|
||||||
list.Items = gentype.FromPointerSlice(items)
|
|
||||||
},
|
|
||||||
),
|
|
||||||
fake,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -18,12 +18,4 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1alpha3
|
package v1alpha3
|
||||||
|
|
||||||
type DeviceClassExpansion interface{}
|
|
||||||
|
|
||||||
type DeviceTaintRuleExpansion interface{}
|
type DeviceTaintRuleExpansion interface{}
|
||||||
|
|
||||||
type ResourceClaimExpansion interface{}
|
|
||||||
|
|
||||||
type ResourceClaimTemplateExpansion interface{}
|
|
||||||
|
|
||||||
type ResourceSliceExpansion interface{}
|
|
||||||
|
@@ -28,11 +28,7 @@ import (
|
|||||||
|
|
||||||
type ResourceV1alpha3Interface interface {
|
type ResourceV1alpha3Interface interface {
|
||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
DeviceClassesGetter
|
|
||||||
DeviceTaintRulesGetter
|
DeviceTaintRulesGetter
|
||||||
ResourceClaimsGetter
|
|
||||||
ResourceClaimTemplatesGetter
|
|
||||||
ResourceSlicesGetter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResourceV1alpha3Client is used to interact with features provided by the resource.k8s.io group.
|
// ResourceV1alpha3Client is used to interact with features provided by the resource.k8s.io group.
|
||||||
@@ -40,26 +36,10 @@ type ResourceV1alpha3Client struct {
|
|||||||
restClient rest.Interface
|
restClient rest.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ResourceV1alpha3Client) DeviceClasses() DeviceClassInterface {
|
|
||||||
return newDeviceClasses(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *ResourceV1alpha3Client) DeviceTaintRules() DeviceTaintRuleInterface {
|
func (c *ResourceV1alpha3Client) DeviceTaintRules() DeviceTaintRuleInterface {
|
||||||
return newDeviceTaintRules(c)
|
return newDeviceTaintRules(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ResourceV1alpha3Client) ResourceClaims(namespace string) ResourceClaimInterface {
|
|
||||||
return newResourceClaims(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *ResourceV1alpha3Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface {
|
|
||||||
return newResourceClaimTemplates(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *ResourceV1alpha3Client) ResourceSlices() ResourceSliceInterface {
|
|
||||||
return newResourceSlices(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewForConfig creates a new ResourceV1alpha3Client for the given config.
|
// NewForConfig creates a new ResourceV1alpha3Client for the given config.
|
||||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||||
|
@@ -1,75 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceClaimsGetter has a method to return a ResourceClaimInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type ResourceClaimsGetter interface {
|
|
||||||
ResourceClaims(namespace string) ResourceClaimInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimInterface has methods to work with ResourceClaim resources.
|
|
||||||
type ResourceClaimInterface interface {
|
|
||||||
Create(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaim, opts v1.CreateOptions) (*resourcev1alpha3.ResourceClaim, error)
|
|
||||||
Update(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaim, opts v1.UpdateOptions) (*resourcev1alpha3.ResourceClaim, error)
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
|
||||||
UpdateStatus(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaim, opts v1.UpdateOptions) (*resourcev1alpha3.ResourceClaim, error)
|
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*resourcev1alpha3.ResourceClaim, error)
|
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.ResourceClaimList, error)
|
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1alpha3.ResourceClaim, err error)
|
|
||||||
Apply(ctx context.Context, resourceClaim *applyconfigurationsresourcev1alpha3.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.ResourceClaim, err error)
|
|
||||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
|
||||||
ApplyStatus(ctx context.Context, resourceClaim *applyconfigurationsresourcev1alpha3.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.ResourceClaim, err error)
|
|
||||||
ResourceClaimExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// resourceClaims implements ResourceClaimInterface
|
|
||||||
type resourceClaims struct {
|
|
||||||
*gentype.ClientWithListAndApply[*resourcev1alpha3.ResourceClaim, *resourcev1alpha3.ResourceClaimList, *applyconfigurationsresourcev1alpha3.ResourceClaimApplyConfiguration]
|
|
||||||
}
|
|
||||||
|
|
||||||
// newResourceClaims returns a ResourceClaims
|
|
||||||
func newResourceClaims(c *ResourceV1alpha3Client, namespace string) *resourceClaims {
|
|
||||||
return &resourceClaims{
|
|
||||||
gentype.NewClientWithListAndApply[*resourcev1alpha3.ResourceClaim, *resourcev1alpha3.ResourceClaimList, *applyconfigurationsresourcev1alpha3.ResourceClaimApplyConfiguration](
|
|
||||||
"resourceclaims",
|
|
||||||
c.RESTClient(),
|
|
||||||
scheme.ParameterCodec,
|
|
||||||
namespace,
|
|
||||||
func() *resourcev1alpha3.ResourceClaim { return &resourcev1alpha3.ResourceClaim{} },
|
|
||||||
func() *resourcev1alpha3.ResourceClaimList { return &resourcev1alpha3.ResourceClaimList{} },
|
|
||||||
gentype.PrefersProtobuf[*resourcev1alpha3.ResourceClaim](),
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,73 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceClaimTemplatesGetter has a method to return a ResourceClaimTemplateInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type ResourceClaimTemplatesGetter interface {
|
|
||||||
ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimTemplateInterface has methods to work with ResourceClaimTemplate resources.
|
|
||||||
type ResourceClaimTemplateInterface interface {
|
|
||||||
Create(ctx context.Context, resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplate, opts v1.CreateOptions) (*resourcev1alpha3.ResourceClaimTemplate, error)
|
|
||||||
Update(ctx context.Context, resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplate, opts v1.UpdateOptions) (*resourcev1alpha3.ResourceClaimTemplate, error)
|
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*resourcev1alpha3.ResourceClaimTemplate, error)
|
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.ResourceClaimTemplateList, error)
|
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1alpha3.ResourceClaimTemplate, err error)
|
|
||||||
Apply(ctx context.Context, resourceClaimTemplate *applyconfigurationsresourcev1alpha3.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.ResourceClaimTemplate, err error)
|
|
||||||
ResourceClaimTemplateExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// resourceClaimTemplates implements ResourceClaimTemplateInterface
|
|
||||||
type resourceClaimTemplates struct {
|
|
||||||
*gentype.ClientWithListAndApply[*resourcev1alpha3.ResourceClaimTemplate, *resourcev1alpha3.ResourceClaimTemplateList, *applyconfigurationsresourcev1alpha3.ResourceClaimTemplateApplyConfiguration]
|
|
||||||
}
|
|
||||||
|
|
||||||
// newResourceClaimTemplates returns a ResourceClaimTemplates
|
|
||||||
func newResourceClaimTemplates(c *ResourceV1alpha3Client, namespace string) *resourceClaimTemplates {
|
|
||||||
return &resourceClaimTemplates{
|
|
||||||
gentype.NewClientWithListAndApply[*resourcev1alpha3.ResourceClaimTemplate, *resourcev1alpha3.ResourceClaimTemplateList, *applyconfigurationsresourcev1alpha3.ResourceClaimTemplateApplyConfiguration](
|
|
||||||
"resourceclaimtemplates",
|
|
||||||
c.RESTClient(),
|
|
||||||
scheme.ParameterCodec,
|
|
||||||
namespace,
|
|
||||||
func() *resourcev1alpha3.ResourceClaimTemplate { return &resourcev1alpha3.ResourceClaimTemplate{} },
|
|
||||||
func() *resourcev1alpha3.ResourceClaimTemplateList {
|
|
||||||
return &resourcev1alpha3.ResourceClaimTemplateList{}
|
|
||||||
},
|
|
||||||
gentype.PrefersProtobuf[*resourcev1alpha3.ResourceClaimTemplate](),
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,71 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by client-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
context "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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceSlicesGetter has a method to return a ResourceSliceInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type ResourceSlicesGetter interface {
|
|
||||||
ResourceSlices() ResourceSliceInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceSliceInterface has methods to work with ResourceSlice resources.
|
|
||||||
type ResourceSliceInterface interface {
|
|
||||||
Create(ctx context.Context, resourceSlice *resourcev1alpha3.ResourceSlice, opts v1.CreateOptions) (*resourcev1alpha3.ResourceSlice, error)
|
|
||||||
Update(ctx context.Context, resourceSlice *resourcev1alpha3.ResourceSlice, opts v1.UpdateOptions) (*resourcev1alpha3.ResourceSlice, error)
|
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*resourcev1alpha3.ResourceSlice, error)
|
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.ResourceSliceList, error)
|
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *resourcev1alpha3.ResourceSlice, err error)
|
|
||||||
Apply(ctx context.Context, resourceSlice *applyconfigurationsresourcev1alpha3.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.ResourceSlice, err error)
|
|
||||||
ResourceSliceExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// resourceSlices implements ResourceSliceInterface
|
|
||||||
type resourceSlices struct {
|
|
||||||
*gentype.ClientWithListAndApply[*resourcev1alpha3.ResourceSlice, *resourcev1alpha3.ResourceSliceList, *applyconfigurationsresourcev1alpha3.ResourceSliceApplyConfiguration]
|
|
||||||
}
|
|
||||||
|
|
||||||
// newResourceSlices returns a ResourceSlices
|
|
||||||
func newResourceSlices(c *ResourceV1alpha3Client) *resourceSlices {
|
|
||||||
return &resourceSlices{
|
|
||||||
gentype.NewClientWithListAndApply[*resourcev1alpha3.ResourceSlice, *resourcev1alpha3.ResourceSliceList, *applyconfigurationsresourcev1alpha3.ResourceSliceApplyConfiguration](
|
|
||||||
"resourceslices",
|
|
||||||
c.RESTClient(),
|
|
||||||
scheme.ParameterCodec,
|
|
||||||
"",
|
|
||||||
func() *resourcev1alpha3.ResourceSlice { return &resourcev1alpha3.ResourceSlice{} },
|
|
||||||
func() *resourcev1alpha3.ResourceSliceList { return &resourcev1alpha3.ResourceSliceList{} },
|
|
||||||
gentype.PrefersProtobuf[*resourcev1alpha3.ResourceSlice](),
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeviceClassLister helps list DeviceClasses.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type DeviceClassLister interface {
|
|
||||||
// List lists all DeviceClasses in the indexer.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*resourcev1alpha3.DeviceClass, err error)
|
|
||||||
// Get retrieves the DeviceClass from the index for a given name.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
Get(name string) (*resourcev1alpha3.DeviceClass, error)
|
|
||||||
DeviceClassListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// deviceClassLister implements the DeviceClassLister interface.
|
|
||||||
type deviceClassLister struct {
|
|
||||||
listers.ResourceIndexer[*resourcev1alpha3.DeviceClass]
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewDeviceClassLister returns a new DeviceClassLister.
|
|
||||||
func NewDeviceClassLister(indexer cache.Indexer) DeviceClassLister {
|
|
||||||
return &deviceClassLister{listers.New[*resourcev1alpha3.DeviceClass](indexer, resourcev1alpha3.Resource("deviceclass"))}
|
|
||||||
}
|
|
@@ -18,30 +18,6 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1alpha3
|
package v1alpha3
|
||||||
|
|
||||||
// DeviceClassListerExpansion allows custom methods to be added to
|
|
||||||
// DeviceClassLister.
|
|
||||||
type DeviceClassListerExpansion interface{}
|
|
||||||
|
|
||||||
// DeviceTaintRuleListerExpansion allows custom methods to be added to
|
// DeviceTaintRuleListerExpansion allows custom methods to be added to
|
||||||
// DeviceTaintRuleLister.
|
// DeviceTaintRuleLister.
|
||||||
type DeviceTaintRuleListerExpansion interface{}
|
type DeviceTaintRuleListerExpansion interface{}
|
||||||
|
|
||||||
// ResourceClaimListerExpansion allows custom methods to be added to
|
|
||||||
// ResourceClaimLister.
|
|
||||||
type ResourceClaimListerExpansion interface{}
|
|
||||||
|
|
||||||
// ResourceClaimNamespaceListerExpansion allows custom methods to be added to
|
|
||||||
// ResourceClaimNamespaceLister.
|
|
||||||
type ResourceClaimNamespaceListerExpansion interface{}
|
|
||||||
|
|
||||||
// ResourceClaimTemplateListerExpansion allows custom methods to be added to
|
|
||||||
// ResourceClaimTemplateLister.
|
|
||||||
type ResourceClaimTemplateListerExpansion interface{}
|
|
||||||
|
|
||||||
// ResourceClaimTemplateNamespaceListerExpansion allows custom methods to be added to
|
|
||||||
// ResourceClaimTemplateNamespaceLister.
|
|
||||||
type ResourceClaimTemplateNamespaceListerExpansion interface{}
|
|
||||||
|
|
||||||
// ResourceSliceListerExpansion allows custom methods to be added to
|
|
||||||
// ResourceSliceLister.
|
|
||||||
type ResourceSliceListerExpansion interface{}
|
|
||||||
|
@@ -1,70 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceClaimLister helps list ResourceClaims.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type ResourceClaimLister interface {
|
|
||||||
// List lists all ResourceClaims in the indexer.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*resourcev1alpha3.ResourceClaim, err error)
|
|
||||||
// ResourceClaims returns an object that can list and get ResourceClaims.
|
|
||||||
ResourceClaims(namespace string) ResourceClaimNamespaceLister
|
|
||||||
ResourceClaimListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// resourceClaimLister implements the ResourceClaimLister interface.
|
|
||||||
type resourceClaimLister struct {
|
|
||||||
listers.ResourceIndexer[*resourcev1alpha3.ResourceClaim]
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewResourceClaimLister returns a new ResourceClaimLister.
|
|
||||||
func NewResourceClaimLister(indexer cache.Indexer) ResourceClaimLister {
|
|
||||||
return &resourceClaimLister{listers.New[*resourcev1alpha3.ResourceClaim](indexer, resourcev1alpha3.Resource("resourceclaim"))}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaims returns an object that can list and get ResourceClaims.
|
|
||||||
func (s *resourceClaimLister) ResourceClaims(namespace string) ResourceClaimNamespaceLister {
|
|
||||||
return resourceClaimNamespaceLister{listers.NewNamespaced[*resourcev1alpha3.ResourceClaim](s.ResourceIndexer, namespace)}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimNamespaceLister helps list and get ResourceClaims.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type ResourceClaimNamespaceLister interface {
|
|
||||||
// List lists all ResourceClaims in the indexer for a given namespace.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*resourcev1alpha3.ResourceClaim, err error)
|
|
||||||
// Get retrieves the ResourceClaim from the indexer for a given namespace and name.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
Get(name string) (*resourcev1alpha3.ResourceClaim, error)
|
|
||||||
ResourceClaimNamespaceListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// resourceClaimNamespaceLister implements the ResourceClaimNamespaceLister
|
|
||||||
// interface.
|
|
||||||
type resourceClaimNamespaceLister struct {
|
|
||||||
listers.ResourceIndexer[*resourcev1alpha3.ResourceClaim]
|
|
||||||
}
|
|
@@ -1,70 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by lister-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v1alpha3
|
|
||||||
|
|
||||||
import (
|
|
||||||
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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceClaimTemplateLister helps list ResourceClaimTemplates.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type ResourceClaimTemplateLister interface {
|
|
||||||
// List lists all ResourceClaimTemplates in the indexer.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*resourcev1alpha3.ResourceClaimTemplate, err error)
|
|
||||||
// ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates.
|
|
||||||
ResourceClaimTemplates(namespace string) ResourceClaimTemplateNamespaceLister
|
|
||||||
ResourceClaimTemplateListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// resourceClaimTemplateLister implements the ResourceClaimTemplateLister interface.
|
|
||||||
type resourceClaimTemplateLister struct {
|
|
||||||
listers.ResourceIndexer[*resourcev1alpha3.ResourceClaimTemplate]
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewResourceClaimTemplateLister returns a new ResourceClaimTemplateLister.
|
|
||||||
func NewResourceClaimTemplateLister(indexer cache.Indexer) ResourceClaimTemplateLister {
|
|
||||||
return &resourceClaimTemplateLister{listers.New[*resourcev1alpha3.ResourceClaimTemplate](indexer, resourcev1alpha3.Resource("resourceclaimtemplate"))}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates.
|
|
||||||
func (s *resourceClaimTemplateLister) ResourceClaimTemplates(namespace string) ResourceClaimTemplateNamespaceLister {
|
|
||||||
return resourceClaimTemplateNamespaceLister{listers.NewNamespaced[*resourcev1alpha3.ResourceClaimTemplate](s.ResourceIndexer, namespace)}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ResourceClaimTemplateNamespaceLister helps list and get ResourceClaimTemplates.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type ResourceClaimTemplateNamespaceLister interface {
|
|
||||||
// List lists all ResourceClaimTemplates in the indexer for a given namespace.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*resourcev1alpha3.ResourceClaimTemplate, err error)
|
|
||||||
// Get retrieves the ResourceClaimTemplate from the indexer for a given namespace and name.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
Get(name string) (*resourcev1alpha3.ResourceClaimTemplate, error)
|
|
||||||
ResourceClaimTemplateNamespaceListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// resourceClaimTemplateNamespaceLister implements the ResourceClaimTemplateNamespaceLister
|
|
||||||
// interface.
|
|
||||||
type resourceClaimTemplateNamespaceLister struct {
|
|
||||||
listers.ResourceIndexer[*resourcev1alpha3.ResourceClaimTemplate]
|
|
||||||
}
|
|
@@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ResourceSliceLister helps list ResourceSlices.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type ResourceSliceLister interface {
|
|
||||||
// List lists all ResourceSlices in the indexer.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*resourcev1alpha3.ResourceSlice, err error)
|
|
||||||
// Get retrieves the ResourceSlice from the index for a given name.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
Get(name string) (*resourcev1alpha3.ResourceSlice, error)
|
|
||||||
ResourceSliceListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// resourceSliceLister implements the ResourceSliceLister interface.
|
|
||||||
type resourceSliceLister struct {
|
|
||||||
listers.ResourceIndexer[*resourcev1alpha3.ResourceSlice]
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewResourceSliceLister returns a new ResourceSliceLister.
|
|
||||||
func NewResourceSliceLister(indexer cache.Indexer) ResourceSliceLister {
|
|
||||||
return &resourceSliceLister{listers.New[*resourcev1alpha3.ResourceSlice](indexer, resourcev1alpha3.Resource("resourceslice"))}
|
|
||||||
}
|
|
Reference in New Issue
Block a user