Compare commits

...

11 Commits

Author SHA1 Message Date
Kubernetes Publisher
877f535934 Update dependencies to v0.36.2 tag 2026-06-12 13:09:41 +00:00
Kubernetes Publisher
f22a53e627 Merge remote-tracking branch 'origin/master' into release-1.36
Kubernetes-commit: f52d1f45d35130c79cd7f1a2596b36325260efe4
2026-04-14 15:32:10 +00:00
Davanum Srinivas
a948641f81 Update github.com/moby/spdystream from v0.5.0 to v0.5.1
Kubernetes-commit: 7e9c2c8eef26f99aa2f94d8e09d6d32de86c7769

Kubernetes-commit: f6209104d25a6c0ea7605a73b9ec4085aacbca03
2026-04-13 13:57:52 -04:00
Antoni Zawodny
7e44ffcaa9 Add Workload-Aware Preemption fields to Workload and PodGroup APIs
Co-authored-by: Omar Sayed <omarsayed@google.com>

Kubernetes-commit: 59c9f75133f22ed24e944cf0b8a1a68e1c49af32
2026-04-09 18:50:07 +00:00
Kubernetes Publisher
df2d882697 Merge pull request #136989 from nojnhuh/podgroup-resourceclaim
KEP-5729: DRA: ResourceClaim Support for Workloads

Kubernetes-commit: b5a943f629904bda73a8f6784ad3cd8325ead57c
2026-03-23 19:02:58 +00:00
Jon Huhn
4eece5291a Workload API: PodGroup ResourceClaims (KEP-5729)
Kubernetes-commit: d80f384b702e4c6630e6f46b2926ab5e45553c97
2026-02-10 14:42:04 -06:00
Kubernetes Publisher
3d35c51207 Merge pull request #137190 from everpeace/KEP-5491-alpha
KEP-5491: DRA: List Types for Attributes [Alpha]

Kubernetes-commit: ef247770b50e7105eb7453c8bfd5279b5a3656ae
2026-03-21 11:02:46 +00:00
Kubernetes Publisher
0434117726 Merge pull request #137028 from nmn3m/feature/dra-resource-pool-status
KEP-5677: Add ResourcePoolStatusRequest API for DRA resource availability visibility

Kubernetes-commit: 15eaed180f8f4d1a6188922a8258392896f7dc4c
2026-03-21 03:02:38 +00:00
Nour
ba785be0ac Drop CSR analogy, mark ObjectMeta +required,reduce limits (maxItems=500, maxLength=128) for etcd safety, add Errors printer column
Signed-off-by: Nour <nurmn3m@gmail.com>

Kubernetes-commit: 8b9159baa41418bcc62592e9da3b878e7cd138ca
2026-03-18 05:17:28 +02:00
Nour
4a9c8783a9 Add ResourcePoolStatusRequest API types and generated code
Introduce the ResourcePoolStatusRequest resource type in the
resource.k8s.io/v1alpha3 API group, gated behind the
DRAResourcePoolStatus feature gate. This includes external and internal
type definitions, protobuf/OpenAPI generated code, client-go typed
clients, informers, listers, apply configurations, deepcopy, defaults,
conversion, fuzzer, declarative validation tags, and API discovery
metadata.

Kubernetes-commit: 29601b8628ac8ea512960bc373511ae46888e502
2026-03-17 14:25:06 +02:00
Shingo Omura
15a9dffb52 KEP-5491: generated code for list attribute fields in DeviceAttribute API ("make update"-ed)
Kubernetes-commit: 3902f5611f29a80dad6c43618c1d87af7baa9637
2026-03-16 19:03:01 +09:00
34 changed files with 1738 additions and 15 deletions

View File

@@ -27,6 +27,14 @@ package v1
//
// It adds a name to it that uniquely identifies the ResourceClaim inside the Pod.
// Containers that need access to the ResourceClaim reference it with this name.
//
// When the DRAWorkloadResourceClaims feature gate is enabled and this Pod
// belongs to a PodGroup, a PodResourceClaim is matched to a
// PodGroupResourceClaim if all of their fields are equal (Name,
// ResourceClaimName, and ResourceClaimTemplateName). A matched claim references
// a single ResourceClaim shared across all Pods in the PodGroup, reserved for
// the PodGroup in ResourceClaimStatus.ReservedFor rather than for individual
// Pods.
type PodResourceClaimApplyConfiguration struct {
// Name uniquely identifies this resource claim inside the pod.
// This must be a DNS_LABEL.
@@ -46,6 +54,16 @@ type PodResourceClaimApplyConfiguration struct {
// generated component, will be used to form a unique name for the
// ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses.
//
// When the DRAWorkloadResourceClaims feature gate is enabled and the pod
// belongs to a PodGroup that defines a PodGroupResourceClaim with the same
// Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the
// ResourceClaim generated for the PodGroup. All pods in the group that
// define an equivalent PodResourceClaim matching the
// PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same
// generated ResourceClaim. ResourceClaims generated for a PodGroup are
// owned by the PodGroup and their lifecycles are tied to the PodGroup
// instead of any individual pod.
//
// This field is immutable and no changes will be made to the
// corresponding ResourceClaim by the control plane after creating the
// ResourceClaim.

View File

@@ -30,9 +30,16 @@ type PodResourceClaimStatusApplyConfiguration struct {
// which implies that the string must be a DNS_LABEL.
Name *string `json:"name,omitempty"`
// ResourceClaimName is the name of the ResourceClaim that was
// generated for the Pod in the namespace of the Pod. If this is
// unset, then generating a ResourceClaim was not necessary. The
// pod.spec.resourceClaims entry can be ignored in this case.
// generated for the Pod in the namespace of the Pod.
//
// When the DRAWorkloadResourceClaims feature is enabled and the
// corresponding PodResourceClaim matches a PodGroupResourceClaim
// made by the Pod's PodGroup, then this is the name of the
// ResourceClaim generated and reserved for the PodGroup.
//
// If this is unset, then generating a ResourceClaim was not
// necessary. The pod.spec.resourceClaims entry can be ignored in
// this case.
ResourceClaimName *string `json:"resourceClaimName,omitempty"`
}

View File

@@ -12530,15 +12530,39 @@ var schemaYAML = typed.YAMLObject(`types:
- name: bool
type:
scalar: boolean
- name: bools
type:
list:
elementType:
scalar: boolean
elementRelationship: atomic
- name: int
type:
scalar: numeric
- name: ints
type:
list:
elementType:
scalar: numeric
elementRelationship: atomic
- name: string
type:
scalar: string
- name: strings
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: version
type:
scalar: string
- name: versions
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.resource.v1.DeviceCapacity
map:
fields:
@@ -13089,6 +13113,94 @@ var schemaYAML = typed.YAMLObject(`types:
- name: pool
type:
scalar: string
- name: io.k8s.api.resource.v1alpha3.PoolStatus
map:
fields:
- name: allocatedDevices
type:
scalar: numeric
- name: availableDevices
type:
scalar: numeric
- name: driver
type:
scalar: string
- name: generation
type:
scalar: numeric
default: 0
- name: nodeName
type:
scalar: string
- name: poolName
type:
scalar: string
- name: resourceSliceCount
type:
scalar: numeric
- name: totalDevices
type:
scalar: numeric
- name: unavailableDevices
type:
scalar: numeric
- name: validationError
type:
scalar: string
- name: io.k8s.api.resource.v1alpha3.ResourcePoolStatusRequest
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.ResourcePoolStatusRequestSpec
default: {}
- name: status
type:
namedType: io.k8s.api.resource.v1alpha3.ResourcePoolStatusRequestStatus
- name: io.k8s.api.resource.v1alpha3.ResourcePoolStatusRequestSpec
map:
fields:
- name: driver
type:
scalar: string
default: ""
- name: limit
type:
scalar: numeric
default: 100
- name: poolName
type:
scalar: string
- name: io.k8s.api.resource.v1alpha3.ResourcePoolStatusRequestStatus
map:
fields:
- name: conditions
type:
list:
elementType:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition
elementRelationship: associative
keys:
- type
- name: poolCount
type:
scalar: numeric
- name: pools
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha3.PoolStatus
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus
map:
fields:
@@ -13298,15 +13410,39 @@ var schemaYAML = typed.YAMLObject(`types:
- name: bool
type:
scalar: boolean
- name: bools
type:
list:
elementType:
scalar: boolean
elementRelationship: atomic
- name: int
type:
scalar: numeric
- name: ints
type:
list:
elementType:
scalar: numeric
elementRelationship: atomic
- name: string
type:
scalar: string
- name: strings
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: version
type:
scalar: string
- name: versions
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta1.DeviceCapacity
map:
fields:
@@ -13983,15 +14119,39 @@ var schemaYAML = typed.YAMLObject(`types:
- name: bool
type:
scalar: boolean
- name: bools
type:
list:
elementType:
scalar: boolean
elementRelationship: atomic
- name: int
type:
scalar: numeric
- name: ints
type:
list:
elementType:
scalar: numeric
elementRelationship: atomic
- name: string
type:
scalar: string
- name: strings
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: version
type:
scalar: string
- name: versions
type:
list:
elementType:
scalar: string
elementRelationship: atomic
- name: io.k8s.api.resource.v1beta2.DeviceCapacity
map:
fields:
@@ -14591,6 +14751,29 @@ var schemaYAML = typed.YAMLObject(`types:
type:
namedType: io.k8s.api.scheduling.v1alpha2.PodGroupStatus
default: {}
- name: io.k8s.api.scheduling.v1alpha2.PodGroupResourceClaim
map:
fields:
- name: name
type:
scalar: string
default: ""
- name: resourceClaimName
type:
scalar: string
- name: resourceClaimTemplateName
type:
scalar: string
- name: io.k8s.api.scheduling.v1alpha2.PodGroupResourceClaimStatus
map:
fields:
- name: name
type:
scalar: string
default: ""
- name: resourceClaimName
type:
scalar: string
- name: io.k8s.api.scheduling.v1alpha2.PodGroupSchedulingConstraints
map:
fields:
@@ -14618,9 +14801,27 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.scheduling.v1alpha2.PodGroupSpec
map:
fields:
- name: disruptionMode
type:
scalar: string
default: Pod
- name: podGroupTemplateRef
type:
namedType: io.k8s.api.scheduling.v1alpha2.PodGroupTemplateReference
- name: priority
type:
scalar: numeric
- name: priorityClassName
type:
scalar: string
- name: resourceClaims
type:
list:
elementType:
namedType: io.k8s.api.scheduling.v1alpha2.PodGroupResourceClaim
elementRelationship: associative
keys:
- name
- name: schedulingConstraints
type:
namedType: io.k8s.api.scheduling.v1alpha2.PodGroupSchedulingConstraints
@@ -14639,13 +14840,38 @@ var schemaYAML = typed.YAMLObject(`types:
elementRelationship: associative
keys:
- type
- name: resourceClaimStatuses
type:
list:
elementType:
namedType: io.k8s.api.scheduling.v1alpha2.PodGroupResourceClaimStatus
elementRelationship: associative
keys:
- name
- name: io.k8s.api.scheduling.v1alpha2.PodGroupTemplate
map:
fields:
- name: disruptionMode
type:
scalar: string
- name: name
type:
scalar: string
default: ""
- name: priority
type:
scalar: numeric
- name: priorityClassName
type:
scalar: string
- name: resourceClaims
type:
list:
elementType:
namedType: io.k8s.api.scheduling.v1alpha2.PodGroupResourceClaim
elementRelationship: associative
keys:
- name
- name: schedulingConstraints
type:
namedType: io.k8s.api.scheduling.v1alpha2.PodGroupSchedulingConstraints

View File

@@ -72,6 +72,14 @@ type CELDeviceSelectorApplyConfiguration struct {
//
// cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
//
// When the DRAListTypeAttributes feature gate is enabled,
// the includes() helper is available and it can work for both scalar
// and list-type attributes. It was introduced to support smooth migration
// from scalar attributes to list-type attributes while keeping
// CEL expressions simple. For example:
//
// device.attributes["dra.example.com"].models.includes("some-model")
//
// The length of the expression must be smaller or equal to 10 Ki. The
// cost of evaluating it is also limited based on the estimated number
// of logical steps.

View File

@@ -32,6 +32,22 @@ type DeviceAttributeApplyConfiguration struct {
// VersionValue is a semantic version according to semver.org spec 2.0.0.
// Must not be longer than 64 characters.
VersionValue *string `json:"version,omitempty"`
// IntValues is a non-empty list of numbers.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
IntValues []int64 `json:"ints,omitempty"`
// BoolValues is a non-empty list of true/false values.
BoolValues []bool `json:"bools,omitempty"`
// StringValues is a non-empty list of strings.
// Each string must not be longer than 64 characters.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
StringValues []string `json:"strings,omitempty"`
// VersionValues is a non-empty list of semantic versions according to semver.org spec 2.0.0.
// Each version string must not be longer than 64 characters.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
VersionValues []string `json:"versions,omitempty"`
}
// DeviceAttributeApplyConfiguration constructs a declarative configuration of the DeviceAttribute type for use with
@@ -71,3 +87,43 @@ func (b *DeviceAttributeApplyConfiguration) WithVersionValue(value string) *Devi
b.VersionValue = &value
return b
}
// WithIntValues adds the given value to the IntValues 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 IntValues field.
func (b *DeviceAttributeApplyConfiguration) WithIntValues(values ...int64) *DeviceAttributeApplyConfiguration {
for i := range values {
b.IntValues = append(b.IntValues, values[i])
}
return b
}
// WithBoolValues adds the given value to the BoolValues 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 BoolValues field.
func (b *DeviceAttributeApplyConfiguration) WithBoolValues(values ...bool) *DeviceAttributeApplyConfiguration {
for i := range values {
b.BoolValues = append(b.BoolValues, values[i])
}
return b
}
// WithStringValues adds the given value to the StringValues 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 StringValues field.
func (b *DeviceAttributeApplyConfiguration) WithStringValues(values ...string) *DeviceAttributeApplyConfiguration {
for i := range values {
b.StringValues = append(b.StringValues, values[i])
}
return b
}
// WithVersionValues adds the given value to the VersionValues 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 VersionValues field.
func (b *DeviceAttributeApplyConfiguration) WithVersionValues(values ...string) *DeviceAttributeApplyConfiguration {
for i := range values {
b.VersionValues = append(b.VersionValues, values[i])
}
return b
}

View File

@@ -48,11 +48,21 @@ type DeviceConstraintApplyConfiguration struct {
// its specification, but if one device doesn't, then it also will not be
// chosen.
//
// When the DRAListTypeAttributes feature gate is enabled, comparison uses
// set semantics(i.e., element order and duplicates are ignored): list-valued attributes
// match when the intersection across all devices is non-empty.
// Scalar values are treated as single-element lists for backward compatibility.
//
// Must include the domain qualifier.
MatchAttribute *resourcev1.FullyQualifiedName `json:"matchAttribute,omitempty"`
// DistinctAttribute requires that all devices in question have this
// attribute and that its type and value are unique across those devices.
//
// When the DRAListTypeAttributes feature gate is enabled, comparison uses
// set semantics (i.e., element order and duplicates are ignored):
// list-valued attributes must be pairwise disjoint across devices.
// Scalar values are treated as singleton sets for backward compatibility.
//
// This acts as the inverse of MatchAttribute.
//
// This constraint is used to avoid allocating multiple requests to the same device

View File

@@ -0,0 +1,152 @@
/*
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
// PoolStatusApplyConfiguration represents a declarative configuration of the PoolStatus type for use
// with apply.
//
// PoolStatus contains status information for a single resource pool.
type PoolStatusApplyConfiguration struct {
// Driver is the DRA driver name for this pool.
// Must be a DNS subdomain (e.g., "gpu.example.com").
Driver *string `json:"driver,omitempty"`
// PoolName is the name of the pool.
// Must be a valid resource pool name (DNS subdomains separated by "/").
PoolName *string `json:"poolName,omitempty"`
// Generation is the pool generation observed across all ResourceSlices
// in this pool. Only the latest generation is reported. During a generation
// rollout, if not all slices at the latest generation have been published,
// the pool is included with a validationError and device counts unset.
Generation *int64 `json:"generation,omitempty"`
// ResourceSliceCount is the number of ResourceSlices that make up this pool.
// May be unset when validationError is set.
ResourceSliceCount *int32 `json:"resourceSliceCount,omitempty"`
// TotalDevices is the total number of devices in the pool across all slices.
// A value of 0 means the pool has no devices.
// May be unset when validationError is set.
TotalDevices *int32 `json:"totalDevices,omitempty"`
// AllocatedDevices is the number of devices currently allocated to claims.
// A value of 0 means no devices are allocated.
// May be unset when validationError is set.
AllocatedDevices *int32 `json:"allocatedDevices,omitempty"`
// AvailableDevices is the number of devices available for allocation.
// This equals TotalDevices - AllocatedDevices - UnavailableDevices.
// A value of 0 means no devices are currently available.
// May be unset when validationError is set.
AvailableDevices *int32 `json:"availableDevices,omitempty"`
// UnavailableDevices is the number of devices that are not available
// due to taints or other conditions, but are not allocated.
// A value of 0 means all unallocated devices are available.
// May be unset when validationError is set.
UnavailableDevices *int32 `json:"unavailableDevices,omitempty"`
// NodeName is the node this pool is associated with.
// When omitted, the pool is not associated with a specific node.
// Must be a valid DNS subdomain name (RFC1123).
NodeName *string `json:"nodeName,omitempty"`
// ValidationError is set when the pool's data could not be fully
// validated (e.g., incomplete slice publication). When set, device
// count fields and ResourceSliceCount may be unset.
ValidationError *string `json:"validationError,omitempty"`
}
// PoolStatusApplyConfiguration constructs a declarative configuration of the PoolStatus type for use with
// apply.
func PoolStatus() *PoolStatusApplyConfiguration {
return &PoolStatusApplyConfiguration{}
}
// 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 *PoolStatusApplyConfiguration) WithDriver(value string) *PoolStatusApplyConfiguration {
b.Driver = &value
return b
}
// WithPoolName sets the PoolName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PoolName field is set to the value of the last call.
func (b *PoolStatusApplyConfiguration) WithPoolName(value string) *PoolStatusApplyConfiguration {
b.PoolName = &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 *PoolStatusApplyConfiguration) WithGeneration(value int64) *PoolStatusApplyConfiguration {
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 *PoolStatusApplyConfiguration) WithResourceSliceCount(value int32) *PoolStatusApplyConfiguration {
b.ResourceSliceCount = &value
return b
}
// WithTotalDevices sets the TotalDevices field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the TotalDevices field is set to the value of the last call.
func (b *PoolStatusApplyConfiguration) WithTotalDevices(value int32) *PoolStatusApplyConfiguration {
b.TotalDevices = &value
return b
}
// WithAllocatedDevices sets the AllocatedDevices field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the AllocatedDevices field is set to the value of the last call.
func (b *PoolStatusApplyConfiguration) WithAllocatedDevices(value int32) *PoolStatusApplyConfiguration {
b.AllocatedDevices = &value
return b
}
// WithAvailableDevices sets the AvailableDevices field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the AvailableDevices field is set to the value of the last call.
func (b *PoolStatusApplyConfiguration) WithAvailableDevices(value int32) *PoolStatusApplyConfiguration {
b.AvailableDevices = &value
return b
}
// WithUnavailableDevices sets the UnavailableDevices field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UnavailableDevices field is set to the value of the last call.
func (b *PoolStatusApplyConfiguration) WithUnavailableDevices(value int32) *PoolStatusApplyConfiguration {
b.UnavailableDevices = &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 *PoolStatusApplyConfiguration) WithNodeName(value string) *PoolStatusApplyConfiguration {
b.NodeName = &value
return b
}
// WithValidationError sets the ValidationError field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ValidationError field is set to the value of the last call.
func (b *PoolStatusApplyConfiguration) WithValidationError(value string) *PoolStatusApplyConfiguration {
b.ValidationError = &value
return b
}

View File

@@ -0,0 +1,295 @@
/*
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"
)
// ResourcePoolStatusRequestApplyConfiguration represents a declarative configuration of the ResourcePoolStatusRequest type for use
// with apply.
//
// ResourcePoolStatusRequest triggers a one-time calculation of resource pool status
// based on the provided filters. Once status is set, the request is considered complete and will not be reprocessed.
// Users should delete and recreate requests to get updated information.
type ResourcePoolStatusRequestApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
// Standard object metadata
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// Spec defines the filters for which pools to include in the status.
// The spec is immutable once created.
Spec *ResourcePoolStatusRequestSpecApplyConfiguration `json:"spec,omitempty"`
// Status is populated by the controller with the calculated pool status.
// When status is non-nil, the request is considered complete and the
// entire object becomes immutable.
Status *ResourcePoolStatusRequestStatusApplyConfiguration `json:"status,omitempty"`
}
// ResourcePoolStatusRequest constructs a declarative configuration of the ResourcePoolStatusRequest type for use with
// apply.
func ResourcePoolStatusRequest(name string) *ResourcePoolStatusRequestApplyConfiguration {
b := &ResourcePoolStatusRequestApplyConfiguration{}
b.WithName(name)
b.WithKind("ResourcePoolStatusRequest")
b.WithAPIVersion("resource.k8s.io/v1alpha3")
return b
}
// ExtractResourcePoolStatusRequestFrom extracts the applied configuration owned by fieldManager from
// resourcePoolStatusRequest for the specified subresource. Pass an empty string for subresource to extract
// the main resource. Common subresources include "status", "scale", etc.
// resourcePoolStatusRequest must be a unmodified ResourcePoolStatusRequest API object that was retrieved from the Kubernetes API.
// ExtractResourcePoolStatusRequestFrom 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.
func ExtractResourcePoolStatusRequestFrom(resourcePoolStatusRequest *resourcev1alpha3.ResourcePoolStatusRequest, fieldManager string, subresource string) (*ResourcePoolStatusRequestApplyConfiguration, error) {
b := &ResourcePoolStatusRequestApplyConfiguration{}
err := managedfields.ExtractInto(resourcePoolStatusRequest, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourcePoolStatusRequest"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(resourcePoolStatusRequest.Name)
b.WithKind("ResourcePoolStatusRequest")
b.WithAPIVersion("resource.k8s.io/v1alpha3")
return b, nil
}
// ExtractResourcePoolStatusRequest extracts the applied configuration owned by fieldManager from
// resourcePoolStatusRequest. If no managedFields are found in resourcePoolStatusRequest for fieldManager, a
// ResourcePoolStatusRequestApplyConfiguration 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.
// resourcePoolStatusRequest must be a unmodified ResourcePoolStatusRequest API object that was retrieved from the Kubernetes API.
// ExtractResourcePoolStatusRequest 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.
func ExtractResourcePoolStatusRequest(resourcePoolStatusRequest *resourcev1alpha3.ResourcePoolStatusRequest, fieldManager string) (*ResourcePoolStatusRequestApplyConfiguration, error) {
return ExtractResourcePoolStatusRequestFrom(resourcePoolStatusRequest, fieldManager, "")
}
// ExtractResourcePoolStatusRequestStatus extracts the applied configuration owned by fieldManager from
// resourcePoolStatusRequest for the status subresource.
func ExtractResourcePoolStatusRequestStatus(resourcePoolStatusRequest *resourcev1alpha3.ResourcePoolStatusRequest, fieldManager string) (*ResourcePoolStatusRequestApplyConfiguration, error) {
return ExtractResourcePoolStatusRequestFrom(resourcePoolStatusRequest, fieldManager, "status")
}
func (b ResourcePoolStatusRequestApplyConfiguration) IsApplyConfiguration() {}
// 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 *ResourcePoolStatusRequestApplyConfiguration) WithKind(value string) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithAPIVersion(value string) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithName(value string) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithGenerateName(value string) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithNamespace(value string) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithUID(value types.UID) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithResourceVersion(value string) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithGeneration(value int64) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithLabels(entries map[string]string) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithAnnotations(entries map[string]string) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithFinalizers(values ...string) *ResourcePoolStatusRequestApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *ResourcePoolStatusRequestApplyConfiguration) 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 *ResourcePoolStatusRequestApplyConfiguration) WithSpec(value *ResourcePoolStatusRequestSpecApplyConfiguration) *ResourcePoolStatusRequestApplyConfiguration {
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 *ResourcePoolStatusRequestApplyConfiguration) WithStatus(value *ResourcePoolStatusRequestStatusApplyConfiguration) *ResourcePoolStatusRequestApplyConfiguration {
b.Status = value
return b
}
// GetKind retrieves the value of the Kind field in the declarative configuration.
func (b *ResourcePoolStatusRequestApplyConfiguration) GetKind() *string {
return b.TypeMetaApplyConfiguration.Kind
}
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (b *ResourcePoolStatusRequestApplyConfiguration) GetAPIVersion() *string {
return b.TypeMetaApplyConfiguration.APIVersion
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ResourcePoolStatusRequestApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (b *ResourcePoolStatusRequestApplyConfiguration) GetNamespace() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Namespace
}

View File

@@ -0,0 +1,73 @@
/*
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
// ResourcePoolStatusRequestSpecApplyConfiguration represents a declarative configuration of the ResourcePoolStatusRequestSpec type for use
// with apply.
//
// ResourcePoolStatusRequestSpec defines the filters for the pool status request.
type ResourcePoolStatusRequestSpecApplyConfiguration struct {
// Driver specifies the DRA driver name to filter pools.
// Only pools from ResourceSlices with this driver will be included.
// Must be a DNS subdomain (e.g., "gpu.example.com").
Driver *string `json:"driver,omitempty"`
// PoolName optionally filters to a specific pool name.
// If not specified, all pools from the specified driver are included.
// When specified, must be a non-empty valid resource pool name
// (DNS subdomains separated by "/").
PoolName *string `json:"poolName,omitempty"`
// Limit optionally specifies the maximum number of pools to return in the status.
// If more pools match the filter criteria, the response will be truncated
// (i.e., len(status.pools) < status.poolCount).
//
// Default: 100
// Minimum: 1
// Maximum: 1000
Limit *int32 `json:"limit,omitempty"`
}
// ResourcePoolStatusRequestSpecApplyConfiguration constructs a declarative configuration of the ResourcePoolStatusRequestSpec type for use with
// apply.
func ResourcePoolStatusRequestSpec() *ResourcePoolStatusRequestSpecApplyConfiguration {
return &ResourcePoolStatusRequestSpecApplyConfiguration{}
}
// 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 *ResourcePoolStatusRequestSpecApplyConfiguration) WithDriver(value string) *ResourcePoolStatusRequestSpecApplyConfiguration {
b.Driver = &value
return b
}
// WithPoolName sets the PoolName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PoolName field is set to the value of the last call.
func (b *ResourcePoolStatusRequestSpecApplyConfiguration) WithPoolName(value string) *ResourcePoolStatusRequestSpecApplyConfiguration {
b.PoolName = &value
return b
}
// WithLimit sets the Limit field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Limit field is set to the value of the last call.
func (b *ResourcePoolStatusRequestSpecApplyConfiguration) WithLimit(value int32) *ResourcePoolStatusRequestSpecApplyConfiguration {
b.Limit = &value
return b
}

View File

@@ -0,0 +1,87 @@
/*
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/meta/v1"
)
// ResourcePoolStatusRequestStatusApplyConfiguration represents a declarative configuration of the ResourcePoolStatusRequestStatus type for use
// with apply.
//
// ResourcePoolStatusRequestStatus contains the calculated pool status information.
type ResourcePoolStatusRequestStatusApplyConfiguration struct {
// PoolCount is the total number of pools that matched the filter criteria,
// regardless of truncation. This helps users understand how many pools exist
// even when the response is truncated. A value of 0 means no pools matched
// the filter criteria.
PoolCount *int32 `json:"poolCount,omitempty"`
// Pools contains the first `spec.limit` matching pools, sorted by driver
// then pool name. If `len(pools) < poolCount`, the list was truncated.
// When omitted, no pools matched the request filters.
Pools []PoolStatusApplyConfiguration `json:"pools,omitempty"`
// Conditions provide information about the state of the request.
// A condition with type=Complete or type=Failed will always be set
// when the status is populated.
//
// Known condition types:
// - "Complete": True when the request has been processed successfully
// - "Failed": True when the request could not be processed
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
// ResourcePoolStatusRequestStatusApplyConfiguration constructs a declarative configuration of the ResourcePoolStatusRequestStatus type for use with
// apply.
func ResourcePoolStatusRequestStatus() *ResourcePoolStatusRequestStatusApplyConfiguration {
return &ResourcePoolStatusRequestStatusApplyConfiguration{}
}
// WithPoolCount sets the PoolCount field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PoolCount field is set to the value of the last call.
func (b *ResourcePoolStatusRequestStatusApplyConfiguration) WithPoolCount(value int32) *ResourcePoolStatusRequestStatusApplyConfiguration {
b.PoolCount = &value
return b
}
// WithPools adds the given value to the Pools 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 Pools field.
func (b *ResourcePoolStatusRequestStatusApplyConfiguration) WithPools(values ...*PoolStatusApplyConfiguration) *ResourcePoolStatusRequestStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithPools")
}
b.Pools = append(b.Pools, *values[i])
}
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 *ResourcePoolStatusRequestStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ResourcePoolStatusRequestStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithConditions")
}
b.Conditions = append(b.Conditions, *values[i])
}
return b
}

View File

@@ -72,6 +72,14 @@ type CELDeviceSelectorApplyConfiguration struct {
//
// cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
//
// When the DRAListTypeAttributes feature gate is enabled,
// the includes() helper is available and it can work for both scalar
// and list-type attributes. It was introduced to support smooth migration
// from scalar attributes to list-type attributes while keeping
// CEL expressions simple. For example:
//
// device.attributes["dra.example.com"].models.includes("some-model")
//
// The length of the expression must be smaller or equal to 10 Ki. The
// cost of evaluating it is also limited based on the estimated number
// of logical steps.

View File

@@ -32,6 +32,22 @@ type DeviceAttributeApplyConfiguration struct {
// VersionValue is a semantic version according to semver.org spec 2.0.0.
// Must not be longer than 64 characters.
VersionValue *string `json:"version,omitempty"`
// IntValues is a non-empty list of numbers.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
IntValues []int64 `json:"ints,omitempty"`
// BoolValues is a non-empty list of true/false values.
BoolValues []bool `json:"bools,omitempty"`
// StringValues is a non-empty list of strings.
// Each string must not be longer than 64 characters.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
StringValues []string `json:"strings,omitempty"`
// VersionValues is a non-empty list of semantic versions according to semver.org spec 2.0.0.
// Each version string must not be longer than 64 characters.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
VersionValues []string `json:"versions,omitempty"`
}
// DeviceAttributeApplyConfiguration constructs a declarative configuration of the DeviceAttribute type for use with
@@ -71,3 +87,43 @@ func (b *DeviceAttributeApplyConfiguration) WithVersionValue(value string) *Devi
b.VersionValue = &value
return b
}
// WithIntValues adds the given value to the IntValues 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 IntValues field.
func (b *DeviceAttributeApplyConfiguration) WithIntValues(values ...int64) *DeviceAttributeApplyConfiguration {
for i := range values {
b.IntValues = append(b.IntValues, values[i])
}
return b
}
// WithBoolValues adds the given value to the BoolValues 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 BoolValues field.
func (b *DeviceAttributeApplyConfiguration) WithBoolValues(values ...bool) *DeviceAttributeApplyConfiguration {
for i := range values {
b.BoolValues = append(b.BoolValues, values[i])
}
return b
}
// WithStringValues adds the given value to the StringValues 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 StringValues field.
func (b *DeviceAttributeApplyConfiguration) WithStringValues(values ...string) *DeviceAttributeApplyConfiguration {
for i := range values {
b.StringValues = append(b.StringValues, values[i])
}
return b
}
// WithVersionValues adds the given value to the VersionValues 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 VersionValues field.
func (b *DeviceAttributeApplyConfiguration) WithVersionValues(values ...string) *DeviceAttributeApplyConfiguration {
for i := range values {
b.VersionValues = append(b.VersionValues, values[i])
}
return b
}

View File

@@ -48,11 +48,21 @@ type DeviceConstraintApplyConfiguration struct {
// its specification, but if one device doesn't, then it also will not be
// chosen.
//
// When the DRAListTypeAttributes feature gate is enabled, comparison uses
// set semantics(i.e., element order and duplicates are ignored): list-valued attributes
// match when the intersection across all devices is non-empty.
// Scalar values are treated as singleton sets for backward compatibility.
//
// Must include the domain qualifier.
MatchAttribute *resourcev1beta1.FullyQualifiedName `json:"matchAttribute,omitempty"`
// DistinctAttribute requires that all devices in question have this
// attribute and that its type and value are unique across those devices.
//
// When the DRAListTypeAttributes feature gate is enabled, comparison uses
// set semantics (i.e., element order and duplicates are ignored):
// list-valued attributes must be pairwise disjoint across devices.
// Scalar values are treated as singleton sets for backward compatibility.
//
// This acts as the inverse of MatchAttribute.
//
// This constraint is used to avoid allocating multiple requests to the same device

View File

@@ -72,6 +72,14 @@ type CELDeviceSelectorApplyConfiguration struct {
//
// cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool)
//
// When the DRAListTypeAttributes feature gate is enabled,
// the includes() helper is available and it can work for both scalar
// and list-type attributes. It was introduced to support smooth migration
// from scalar attributes to list-type attributes while keeping
// CEL expressions simple. For example:
//
// device.attributes["dra.example.com"].models.includes("some-model")
//
// The length of the expression must be smaller or equal to 10 Ki. The
// cost of evaluating it is also limited based on the estimated number
// of logical steps.

View File

@@ -32,6 +32,22 @@ type DeviceAttributeApplyConfiguration struct {
// VersionValue is a semantic version according to semver.org spec 2.0.0.
// Must not be longer than 64 characters.
VersionValue *string `json:"version,omitempty"`
// IntValues is a non-empty list of numbers.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
IntValues []int64 `json:"ints,omitempty"`
// BoolValues is a non-empty list of true/false values.
BoolValues []bool `json:"bools,omitempty"`
// StringValues is a non-empty list of strings.
// Each string must not be longer than 64 characters.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
StringValues []string `json:"strings,omitempty"`
// VersionValues is a non-empty list of semantic versions according to semver.org spec 2.0.0.
// Each version string must not be longer than 64 characters.
//
// This is an alpha field and requires enabling the DRAListTypeAttributes feature gate.
VersionValues []string `json:"versions,omitempty"`
}
// DeviceAttributeApplyConfiguration constructs a declarative configuration of the DeviceAttribute type for use with
@@ -71,3 +87,43 @@ func (b *DeviceAttributeApplyConfiguration) WithVersionValue(value string) *Devi
b.VersionValue = &value
return b
}
// WithIntValues adds the given value to the IntValues 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 IntValues field.
func (b *DeviceAttributeApplyConfiguration) WithIntValues(values ...int64) *DeviceAttributeApplyConfiguration {
for i := range values {
b.IntValues = append(b.IntValues, values[i])
}
return b
}
// WithBoolValues adds the given value to the BoolValues 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 BoolValues field.
func (b *DeviceAttributeApplyConfiguration) WithBoolValues(values ...bool) *DeviceAttributeApplyConfiguration {
for i := range values {
b.BoolValues = append(b.BoolValues, values[i])
}
return b
}
// WithStringValues adds the given value to the StringValues 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 StringValues field.
func (b *DeviceAttributeApplyConfiguration) WithStringValues(values ...string) *DeviceAttributeApplyConfiguration {
for i := range values {
b.StringValues = append(b.StringValues, values[i])
}
return b
}
// WithVersionValues adds the given value to the VersionValues 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 VersionValues field.
func (b *DeviceAttributeApplyConfiguration) WithVersionValues(values ...string) *DeviceAttributeApplyConfiguration {
for i := range values {
b.VersionValues = append(b.VersionValues, values[i])
}
return b
}

View File

@@ -48,11 +48,21 @@ type DeviceConstraintApplyConfiguration struct {
// its specification, but if one device doesn't, then it also will not be
// chosen.
//
// When the DRAListTypeAttributes feature gate is enabled, comparison uses
// set semantics(i.e., element order and duplicates are ignored): list-valued attributes
// match when the intersection across all devices is non-empty.
// Scalar values are treated as singleton sets for backward compatibility.
//
// Must include the domain qualifier.
MatchAttribute *resourcev1beta2.FullyQualifiedName `json:"matchAttribute,omitempty"`
// DistinctAttribute requires that all devices in question have this
// attribute and that its type and value are unique across those devices.
//
// When the DRAListTypeAttributes feature gate is enabled, comparison uses
// set semantics (i.e., element order and duplicates are ignored):
// list-valued attributes must be pairwise disjoint across devices.
// Scalar values are treated as singleton sets for backward compatibility.
//
// This acts as the inverse of MatchAttribute.
//
// This constraint is used to avoid allocating multiple requests to the same device

View File

@@ -0,0 +1,89 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha2
// PodGroupResourceClaimApplyConfiguration represents a declarative configuration of the PodGroupResourceClaim type for use
// with apply.
//
// PodGroupResourceClaim references exactly one ResourceClaim, either directly
// or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim
// for the PodGroup.
//
// It adds a name to it that uniquely identifies the ResourceClaim inside the PodGroup.
// Pods that need access to the ResourceClaim define a matching reference in its
// own Spec.ResourceClaims. The Pod's claim must match all fields of the
// PodGroup's claim exactly.
type PodGroupResourceClaimApplyConfiguration struct {
// Name uniquely identifies this resource claim inside the PodGroup.
// This must be a DNS_LABEL.
Name *string `json:"name,omitempty"`
// ResourceClaimName is the name of a ResourceClaim object in the same
// namespace as this PodGroup. The ResourceClaim will be reserved for the
// PodGroup instead of its individual pods.
//
// Exactly one of ResourceClaimName and ResourceClaimTemplateName must
// be set.
ResourceClaimName *string `json:"resourceClaimName,omitempty"`
// ResourceClaimTemplateName is the name of a ResourceClaimTemplate
// object in the same namespace as this PodGroup.
//
// The template will be used to create a new ResourceClaim, which will
// be bound to this PodGroup. When this PodGroup is deleted, the ResourceClaim
// will also be deleted. The PodGroup name and resource name, along with a
// generated component, will be used to form a unique name for the
// ResourceClaim, which will be recorded in podgroup.status.resourceClaimStatuses.
//
// This field is immutable and no changes will be made to the
// corresponding ResourceClaim by the control plane after creating the
// ResourceClaim.
//
// Exactly one of ResourceClaimName and ResourceClaimTemplateName must
// be set.
ResourceClaimTemplateName *string `json:"resourceClaimTemplateName,omitempty"`
}
// PodGroupResourceClaimApplyConfiguration constructs a declarative configuration of the PodGroupResourceClaim type for use with
// apply.
func PodGroupResourceClaim() *PodGroupResourceClaimApplyConfiguration {
return &PodGroupResourceClaimApplyConfiguration{}
}
// 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 *PodGroupResourceClaimApplyConfiguration) WithName(value string) *PodGroupResourceClaimApplyConfiguration {
b.Name = &value
return b
}
// WithResourceClaimName sets the ResourceClaimName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceClaimName field is set to the value of the last call.
func (b *PodGroupResourceClaimApplyConfiguration) WithResourceClaimName(value string) *PodGroupResourceClaimApplyConfiguration {
b.ResourceClaimName = &value
return b
}
// WithResourceClaimTemplateName sets the ResourceClaimTemplateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceClaimTemplateName field is set to the value of the last call.
func (b *PodGroupResourceClaimApplyConfiguration) WithResourceClaimTemplateName(value string) *PodGroupResourceClaimApplyConfiguration {
b.ResourceClaimTemplateName = &value
return b
}

View File

@@ -0,0 +1,59 @@
/*
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 v1alpha2
// PodGroupResourceClaimStatusApplyConfiguration represents a declarative configuration of the PodGroupResourceClaimStatus type for use
// with apply.
//
// PodGroupResourceClaimStatus is stored in the PodGroupStatus for each
// PodGroupResourceClaim which references a ResourceClaimTemplate. It stores the
// generated name for the corresponding ResourceClaim.
type PodGroupResourceClaimStatusApplyConfiguration struct {
// Name uniquely identifies this resource claim inside the PodGroup. This
// must match the name of an entry in podgroup.spec.resourceClaims, which
// implies that the string must be a DNS_LABEL.
Name *string `json:"name,omitempty"`
// ResourceClaimName is the name of the ResourceClaim that was generated for
// the PodGroup in the namespace of the PodGroup. If this is unset, then
// generating a ResourceClaim was not necessary. The
// podgroup.spec.resourceClaims entry can be ignored in this case.
ResourceClaimName *string `json:"resourceClaimName,omitempty"`
}
// PodGroupResourceClaimStatusApplyConfiguration constructs a declarative configuration of the PodGroupResourceClaimStatus type for use with
// apply.
func PodGroupResourceClaimStatus() *PodGroupResourceClaimStatusApplyConfiguration {
return &PodGroupResourceClaimStatusApplyConfiguration{}
}
// 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 *PodGroupResourceClaimStatusApplyConfiguration) WithName(value string) *PodGroupResourceClaimStatusApplyConfiguration {
b.Name = &value
return b
}
// WithResourceClaimName sets the ResourceClaimName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceClaimName field is set to the value of the last call.
func (b *PodGroupResourceClaimStatusApplyConfiguration) WithResourceClaimName(value string) *PodGroupResourceClaimStatusApplyConfiguration {
b.ResourceClaimName = &value
return b
}

View File

@@ -18,6 +18,10 @@ limitations under the License.
package v1alpha2
import (
schedulingv1alpha2 "k8s.io/api/scheduling/v1alpha2"
)
// PodGroupSpecApplyConfiguration represents a declarative configuration of the PodGroupSpec type for use
// with apply.
//
@@ -35,6 +39,42 @@ type PodGroupSpecApplyConfiguration struct {
// This field is immutable.
// This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled.
SchedulingConstraints *PodGroupSchedulingConstraintsApplyConfiguration `json:"schedulingConstraints,omitempty"`
// ResourceClaims defines which ResourceClaims may be shared among Pods in
// the group. Pods consume the devices allocated to a PodGroup's claim by
// defining a claim in its own Spec.ResourceClaims that matches the
// PodGroup's claim exactly. The claim must have the same name and refer to
// the same ResourceClaim or ResourceClaimTemplate.
//
// This is an alpha-level field and requires that the
// DRAWorkloadResourceClaims feature gate is enabled.
//
// This field is immutable.
ResourceClaims []PodGroupResourceClaimApplyConfiguration `json:"resourceClaims,omitempty"`
// DisruptionMode defines the mode in which a given PodGroup can be disrupted.
// Controllers are expected to fill this field by copying it from a PodGroupTemplate.
// One of Pod, PodGroup. Defaults to Pod if unset.
// This field is immutable.
// This field is available only when the WorkloadAwarePreemption feature gate
// is enabled.
DisruptionMode *schedulingv1alpha2.DisruptionMode `json:"disruptionMode,omitempty"`
// PriorityClassName defines the priority that should be considered when scheduling this pod group.
// Controllers are expected to fill this field by copying it from a PodGroupTemplate.
// Otherwise, it is validated and resolved similarly to the PriorityClassName on PodGroupTemplate
// (i.e. if no priority class is specified, admission control can set this to the global default
// priority class if it exists. Otherwise, the pod group's priority will be zero).
// This field is immutable.
// This field is available only when the WorkloadAwarePreemption feature gate
// is enabled.
PriorityClassName *string `json:"priorityClassName,omitempty"`
// Priority is the value of priority of this pod group. Various system components
// use this field to find the priority of the pod group. When Priority Admission
// Controller is enabled, it prevents users from setting this field. The admission
// controller populates this field from PriorityClassName.
// The higher the value, the higher the priority.
// This field is immutable.
// This field is available only when the WorkloadAwarePreemption feature gate
// is enabled.
Priority *int32 `json:"priority,omitempty"`
}
// PodGroupSpecApplyConfiguration constructs a declarative configuration of the PodGroupSpec type for use with
@@ -66,3 +106,40 @@ func (b *PodGroupSpecApplyConfiguration) WithSchedulingConstraints(value *PodGro
b.SchedulingConstraints = value
return b
}
// WithResourceClaims adds the given value to the ResourceClaims 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 ResourceClaims field.
func (b *PodGroupSpecApplyConfiguration) WithResourceClaims(values ...*PodGroupResourceClaimApplyConfiguration) *PodGroupSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResourceClaims")
}
b.ResourceClaims = append(b.ResourceClaims, *values[i])
}
return b
}
// WithDisruptionMode sets the DisruptionMode field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DisruptionMode field is set to the value of the last call.
func (b *PodGroupSpecApplyConfiguration) WithDisruptionMode(value schedulingv1alpha2.DisruptionMode) *PodGroupSpecApplyConfiguration {
b.DisruptionMode = &value
return b
}
// WithPriorityClassName sets the PriorityClassName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PriorityClassName field is set to the value of the last call.
func (b *PodGroupSpecApplyConfiguration) WithPriorityClassName(value string) *PodGroupSpecApplyConfiguration {
b.PriorityClassName = &value
return b
}
// WithPriority sets the Priority field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Priority field is set to the value of the last call.
func (b *PodGroupSpecApplyConfiguration) WithPriority(value int32) *PodGroupSpecApplyConfiguration {
b.Priority = &value
return b
}

View File

@@ -44,6 +44,8 @@ type PodGroupStatusApplyConfiguration struct {
// - "PreemptionByScheduler": The PodGroup was preempted by the scheduler to make room for
// higher-priority PodGroups or Pods.
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
// Status of resource claims.
ResourceClaimStatuses []PodGroupResourceClaimStatusApplyConfiguration `json:"resourceClaimStatuses,omitempty"`
}
// PodGroupStatusApplyConfiguration constructs a declarative configuration of the PodGroupStatus type for use with
@@ -64,3 +66,16 @@ func (b *PodGroupStatusApplyConfiguration) WithConditions(values ...*v1.Conditio
}
return b
}
// WithResourceClaimStatuses adds the given value to the ResourceClaimStatuses 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 ResourceClaimStatuses field.
func (b *PodGroupStatusApplyConfiguration) WithResourceClaimStatuses(values ...*PodGroupResourceClaimStatusApplyConfiguration) *PodGroupStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResourceClaimStatuses")
}
b.ResourceClaimStatuses = append(b.ResourceClaimStatuses, *values[i])
}
return b
}

View File

@@ -18,6 +18,10 @@ limitations under the License.
package v1alpha2
import (
schedulingv1alpha2 "k8s.io/api/scheduling/v1alpha2"
)
// PodGroupTemplateApplyConfiguration represents a declarative configuration of the PodGroupTemplate type for use
// with apply.
//
@@ -31,6 +35,37 @@ type PodGroupTemplateApplyConfiguration struct {
// SchedulingConstraints defines optional scheduling constraints (e.g. topology) for this PodGroupTemplate.
// This field is only available when the TopologyAwareWorkloadScheduling feature gate is enabled.
SchedulingConstraints *PodGroupSchedulingConstraintsApplyConfiguration `json:"schedulingConstraints,omitempty"`
// ResourceClaims defines which ResourceClaims may be shared among Pods in
// the group. Pods consume the devices allocated to a PodGroup's claim by
// defining a claim in its own Spec.ResourceClaims that matches the
// PodGroup's claim exactly. The claim must have the same name and refer to
// the same ResourceClaim or ResourceClaimTemplate.
//
// This is an alpha-level field and requires that the
// DRAWorkloadResourceClaims feature gate is enabled.
//
// This field is immutable.
ResourceClaims []PodGroupResourceClaimApplyConfiguration `json:"resourceClaims,omitempty"`
// DisruptionMode defines the mode in which a given PodGroup can be disrupted.
// One of Pod, PodGroup.
// This field is available only when the WorkloadAwarePreemption feature gate
// is enabled.
DisruptionMode *schedulingv1alpha2.DisruptionMode `json:"disruptionMode,omitempty"`
// PriorityClassName indicates the priority that should be considered when scheduling
// a pod group created from this template. If no priority class is specified, admission
// control can set this to the global default priority class if it exists. Otherwise,
// pod groups created from this template will have the priority set to zero.
// This field is available only when the WorkloadAwarePreemption feature gate
// is enabled.
PriorityClassName *string `json:"priorityClassName,omitempty"`
// Priority is the value of priority of pod groups created from this template. Various
// system components use this field to find the priority of the pod group. When
// Priority Admission Controller is enabled, it prevents users from setting this field.
// The admission controller populates this field from PriorityClassName.
// The higher the value, the higher the priority.
// This field is available only when the WorkloadAwarePreemption feature gate
// is enabled.
Priority *int32 `json:"priority,omitempty"`
}
// PodGroupTemplateApplyConfiguration constructs a declarative configuration of the PodGroupTemplate type for use with
@@ -62,3 +97,40 @@ func (b *PodGroupTemplateApplyConfiguration) WithSchedulingConstraints(value *Po
b.SchedulingConstraints = value
return b
}
// WithResourceClaims adds the given value to the ResourceClaims 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 ResourceClaims field.
func (b *PodGroupTemplateApplyConfiguration) WithResourceClaims(values ...*PodGroupResourceClaimApplyConfiguration) *PodGroupTemplateApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResourceClaims")
}
b.ResourceClaims = append(b.ResourceClaims, *values[i])
}
return b
}
// WithDisruptionMode sets the DisruptionMode field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DisruptionMode field is set to the value of the last call.
func (b *PodGroupTemplateApplyConfiguration) WithDisruptionMode(value schedulingv1alpha2.DisruptionMode) *PodGroupTemplateApplyConfiguration {
b.DisruptionMode = &value
return b
}
// WithPriorityClassName sets the PriorityClassName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the PriorityClassName field is set to the value of the last call.
func (b *PodGroupTemplateApplyConfiguration) WithPriorityClassName(value string) *PodGroupTemplateApplyConfiguration {
b.PriorityClassName = &value
return b
}
// WithPriority sets the Priority field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Priority field is set to the value of the last call.
func (b *PodGroupTemplateApplyConfiguration) WithPriority(value int32) *PodGroupTemplateApplyConfiguration {
b.Priority = &value
return b
}

View File

@@ -1656,6 +1656,14 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &resourcev1alpha3.DeviceTaintRuleStatusApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("DeviceTaintSelector"):
return &resourcev1alpha3.DeviceTaintSelectorApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("PoolStatus"):
return &resourcev1alpha3.PoolStatusApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourcePoolStatusRequest"):
return &resourcev1alpha3.ResourcePoolStatusRequestApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourcePoolStatusRequestSpec"):
return &resourcev1alpha3.ResourcePoolStatusRequestSpecApplyConfiguration{}
case v1alpha3.SchemeGroupVersion.WithKind("ResourcePoolStatusRequestStatus"):
return &resourcev1alpha3.ResourcePoolStatusRequestStatusApplyConfiguration{}
// Group=resource.k8s.io, Version=v1beta1
case resourcev1beta1.SchemeGroupVersion.WithKind("AllocatedDeviceStatus"):
@@ -1838,6 +1846,10 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsschedulingv1alpha2.GangSchedulingPolicyApplyConfiguration{}
case schedulingv1alpha2.SchemeGroupVersion.WithKind("PodGroup"):
return &applyconfigurationsschedulingv1alpha2.PodGroupApplyConfiguration{}
case schedulingv1alpha2.SchemeGroupVersion.WithKind("PodGroupResourceClaim"):
return &applyconfigurationsschedulingv1alpha2.PodGroupResourceClaimApplyConfiguration{}
case schedulingv1alpha2.SchemeGroupVersion.WithKind("PodGroupResourceClaimStatus"):
return &applyconfigurationsschedulingv1alpha2.PodGroupResourceClaimStatusApplyConfiguration{}
case schedulingv1alpha2.SchemeGroupVersion.WithKind("PodGroupSchedulingConstraints"):
return &applyconfigurationsschedulingv1alpha2.PodGroupSchedulingConstraintsApplyConfiguration{}
case schedulingv1alpha2.SchemeGroupVersion.WithKind("PodGroupSchedulingPolicy"):

8
go.mod
View File

@@ -23,11 +23,11 @@ require (
golang.org/x/time v0.14.0
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
gopkg.in/evanphx/json-patch.v4 v4.13.0
k8s.io/api v0.0.0-20260318235847-50328df638da
k8s.io/apimachinery v0.0.0-20260318195418-729062d58854
k8s.io/api v0.36.2
k8s.io/apimachinery v0.36.2
k8s.io/klog/v2 v2.140.0
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a
k8s.io/streaming v0.0.0-20260317070603-951b6bf67777
k8s.io/streaming v0.36.2
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730
sigs.k8s.io/randfill v1.0.0
@@ -46,7 +46,7 @@ require (
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/moby/spdystream v0.5.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect

16
go.sum
View File

@@ -43,8 +43,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU=
github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
github.com/moby/spdystream v0.5.1 h1:9sNYeYZUcci9R6/w7KDaFWEWeV4LStVG78Mpyq/Zm/Y=
github.com/moby/spdystream v0.5.1/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -105,16 +105,16 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.0.0-20260318235847-50328df638da h1:+OhUIVeMDF6qQp4PDPxIr/UYNKjbekhGfmM+wDDJvzU=
k8s.io/api v0.0.0-20260318235847-50328df638da/go.mod h1:Me8XWRAAY/34t+2YTLQeaWCLaH9DHxkNCTqVHMwo3lg=
k8s.io/apimachinery v0.0.0-20260318195418-729062d58854 h1:iuI2iZc7u7hgHcDS8SzYRurcIo3ltRh4MnFkCTYmV2c=
k8s.io/apimachinery v0.0.0-20260318195418-729062d58854/go.mod h1:Fjag9BypDOzB4sV3iuZaNeDsRkf89asmbm8aWLerfeU=
k8s.io/api v0.36.2 h1:TF6YDLIzKfccK7cq9YpTcGX8TJmEkHVRv78DM51fRYY=
k8s.io/api v0.36.2/go.mod h1:F4LbMO4brjZYh7yFkXWhynSvtB7YauxV4c+HHkNRGNg=
k8s.io/apimachinery v0.36.2 h1:0PE/W/WNy1UX61NLbXY5TMbJ6UwLL6E6lAPkYrKFxbQ=
k8s.io/apimachinery v0.36.2/go.mod h1:fvf/HOLXq9RId0rnDIbN1OEBvHXdQbLMM8nu0LcBUf4=
k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a h1:xCeOEAOoGYl2jnJoHkC3hkbPJgdATINPMAxaynU2Ovg=
k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0=
k8s.io/streaming v0.0.0-20260317070603-951b6bf67777 h1:EwFwvVp6vSJ41TUsv+DJx0UhkLnB8NizEcBJLgK/olU=
k8s.io/streaming v0.0.0-20260317070603-951b6bf67777/go.mod h1:5Zm1U2Duu3uu1nG/ijKuwNWDkQk24aXVpScAhzRkzkk=
k8s.io/streaming v0.36.2 h1:NSKthPPg9UFSKsRauVJUVGH2Dvn8fhKmY4qrMkw/p98=
k8s.io/streaming v0.36.2/go.mod h1:z6fV3D+NVkoeqRMtWwlUZK6U17SY/LqNzOxWL6GyR/s=
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU=
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk=
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=

View File

@@ -392,6 +392,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
// Group=resource.k8s.io, Version=v1alpha3
case v1alpha3.SchemeGroupVersion.WithResource("devicetaintrules"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().DeviceTaintRules().Informer()}, nil
case v1alpha3.SchemeGroupVersion.WithResource("resourcepoolstatusrequests"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourcePoolStatusRequests().Informer()}, nil
// Group=resource.k8s.io, Version=v1beta1
case resourcev1beta1.SchemeGroupVersion.WithResource("deviceclasses"):

View File

@@ -26,6 +26,8 @@ import (
type Interface interface {
// DeviceTaintRules returns a DeviceTaintRuleInformer.
DeviceTaintRules() DeviceTaintRuleInformer
// ResourcePoolStatusRequests returns a ResourcePoolStatusRequestInformer.
ResourcePoolStatusRequests() ResourcePoolStatusRequestInformer
}
type version struct {
@@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
func (v *version) DeviceTaintRules() DeviceTaintRuleInformer {
return &deviceTaintRuleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// ResourcePoolStatusRequests returns a ResourcePoolStatusRequestInformer.
func (v *version) ResourcePoolStatusRequests() ResourcePoolStatusRequestInformer {
return &resourcePoolStatusRequestInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}

View File

@@ -0,0 +1,115 @@
/*
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"
schema "k8s.io/apimachinery/pkg/runtime/schema"
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"
)
// ResourcePoolStatusRequestInformer provides access to a shared informer and lister for
// ResourcePoolStatusRequests.
type ResourcePoolStatusRequestInformer interface {
Informer() cache.SharedIndexInformer
Lister() resourcev1alpha3.ResourcePoolStatusRequestLister
}
type resourcePoolStatusRequestInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewResourcePoolStatusRequestInformer constructs a new informer for ResourcePoolStatusRequest 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 NewResourcePoolStatusRequestInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewResourcePoolStatusRequestInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers})
}
// NewFilteredResourcePoolStatusRequestInformer constructs a new informer for ResourcePoolStatusRequest 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 NewFilteredResourcePoolStatusRequestInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return NewResourcePoolStatusRequestInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions})
}
// NewResourcePoolStatusRequestInformerWithOptions constructs a new informer for ResourcePoolStatusRequest type with additional options.
// 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 NewResourcePoolStatusRequestInformerWithOptions(client kubernetes.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer {
gvr := schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha3", Resource: "resourcepoolstatusrequests"}
identifier := options.InformerName.WithResource(gvr)
tweakListOptions := options.TweakListOptions
return cache.NewSharedIndexInformerWithOptions(
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(opts v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&opts)
}
return client.ResourceV1alpha3().ResourcePoolStatusRequests().List(context.Background(), opts)
},
WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&opts)
}
return client.ResourceV1alpha3().ResourcePoolStatusRequests().Watch(context.Background(), opts)
},
ListWithContextFunc: func(ctx context.Context, opts v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&opts)
}
return client.ResourceV1alpha3().ResourcePoolStatusRequests().List(ctx, opts)
},
WatchFuncWithContext: func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&opts)
}
return client.ResourceV1alpha3().ResourcePoolStatusRequests().Watch(ctx, opts)
},
}, client),
&apiresourcev1alpha3.ResourcePoolStatusRequest{},
cache.SharedIndexInformerOptions{
ResyncPeriod: options.ResyncPeriod,
Indexers: options.Indexers,
Identifier: identifier,
},
)
}
func (f *resourcePoolStatusRequestInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewResourcePoolStatusRequestInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions})
}
func (f *resourcePoolStatusRequestInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apiresourcev1alpha3.ResourcePoolStatusRequest{}, f.defaultInformer)
}
func (f *resourcePoolStatusRequestInformer) Lister() resourcev1alpha3.ResourcePoolStatusRequestLister {
return resourcev1alpha3.NewResourcePoolStatusRequestLister(f.Informer().GetIndexer())
}

View File

@@ -32,6 +32,10 @@ func (c *FakeResourceV1alpha3) DeviceTaintRules() v1alpha3.DeviceTaintRuleInterf
return newFakeDeviceTaintRules(c)
}
func (c *FakeResourceV1alpha3) ResourcePoolStatusRequests() v1alpha3.ResourcePoolStatusRequestInterface {
return newFakeResourcePoolStatusRequests(c)
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeResourceV1alpha3) RESTClient() rest.Interface {

View File

@@ -0,0 +1,53 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by 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"
)
// fakeResourcePoolStatusRequests implements ResourcePoolStatusRequestInterface
type fakeResourcePoolStatusRequests struct {
*gentype.FakeClientWithListAndApply[*v1alpha3.ResourcePoolStatusRequest, *v1alpha3.ResourcePoolStatusRequestList, *resourcev1alpha3.ResourcePoolStatusRequestApplyConfiguration]
Fake *FakeResourceV1alpha3
}
func newFakeResourcePoolStatusRequests(fake *FakeResourceV1alpha3) typedresourcev1alpha3.ResourcePoolStatusRequestInterface {
return &fakeResourcePoolStatusRequests{
gentype.NewFakeClientWithListAndApply[*v1alpha3.ResourcePoolStatusRequest, *v1alpha3.ResourcePoolStatusRequestList, *resourcev1alpha3.ResourcePoolStatusRequestApplyConfiguration](
fake.Fake,
"",
v1alpha3.SchemeGroupVersion.WithResource("resourcepoolstatusrequests"),
v1alpha3.SchemeGroupVersion.WithKind("ResourcePoolStatusRequest"),
func() *v1alpha3.ResourcePoolStatusRequest { return &v1alpha3.ResourcePoolStatusRequest{} },
func() *v1alpha3.ResourcePoolStatusRequestList { return &v1alpha3.ResourcePoolStatusRequestList{} },
func(dst, src *v1alpha3.ResourcePoolStatusRequestList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha3.ResourcePoolStatusRequestList) []*v1alpha3.ResourcePoolStatusRequest {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha3.ResourcePoolStatusRequestList, items []*v1alpha3.ResourcePoolStatusRequest) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@@ -19,3 +19,5 @@ limitations under the License.
package v1alpha3
type DeviceTaintRuleExpansion interface{}
type ResourcePoolStatusRequestExpansion interface{}

View File

@@ -29,6 +29,7 @@ import (
type ResourceV1alpha3Interface interface {
RESTClient() rest.Interface
DeviceTaintRulesGetter
ResourcePoolStatusRequestsGetter
}
// ResourceV1alpha3Client is used to interact with features provided by the resource.k8s.io group.
@@ -40,6 +41,10 @@ func (c *ResourceV1alpha3Client) DeviceTaintRules() DeviceTaintRuleInterface {
return newDeviceTaintRules(c)
}
func (c *ResourceV1alpha3Client) ResourcePoolStatusRequests() ResourcePoolStatusRequestInterface {
return newResourcePoolStatusRequests(c)
}
// NewForConfig creates a new ResourceV1alpha3Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).

View File

@@ -0,0 +1,79 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by 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"
)
// ResourcePoolStatusRequestsGetter has a method to return a ResourcePoolStatusRequestInterface.
// A group's client should implement this interface.
type ResourcePoolStatusRequestsGetter interface {
ResourcePoolStatusRequests() ResourcePoolStatusRequestInterface
}
// ResourcePoolStatusRequestInterface has methods to work with ResourcePoolStatusRequest resources.
type ResourcePoolStatusRequestInterface interface {
Create(ctx context.Context, resourcePoolStatusRequest *resourcev1alpha3.ResourcePoolStatusRequest, opts v1.CreateOptions) (*resourcev1alpha3.ResourcePoolStatusRequest, error)
Update(ctx context.Context, resourcePoolStatusRequest *resourcev1alpha3.ResourcePoolStatusRequest, opts v1.UpdateOptions) (*resourcev1alpha3.ResourcePoolStatusRequest, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, resourcePoolStatusRequest *resourcev1alpha3.ResourcePoolStatusRequest, opts v1.UpdateOptions) (*resourcev1alpha3.ResourcePoolStatusRequest, 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.ResourcePoolStatusRequest, error)
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.ResourcePoolStatusRequestList, 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.ResourcePoolStatusRequest, err error)
Apply(ctx context.Context, resourcePoolStatusRequest *applyconfigurationsresourcev1alpha3.ResourcePoolStatusRequestApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.ResourcePoolStatusRequest, err error)
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, resourcePoolStatusRequest *applyconfigurationsresourcev1alpha3.ResourcePoolStatusRequestApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.ResourcePoolStatusRequest, err error)
ResourcePoolStatusRequestExpansion
}
// resourcePoolStatusRequests implements ResourcePoolStatusRequestInterface
type resourcePoolStatusRequests struct {
*gentype.ClientWithListAndApply[*resourcev1alpha3.ResourcePoolStatusRequest, *resourcev1alpha3.ResourcePoolStatusRequestList, *applyconfigurationsresourcev1alpha3.ResourcePoolStatusRequestApplyConfiguration]
}
// newResourcePoolStatusRequests returns a ResourcePoolStatusRequests
func newResourcePoolStatusRequests(c *ResourceV1alpha3Client) *resourcePoolStatusRequests {
return &resourcePoolStatusRequests{
gentype.NewClientWithListAndApply[*resourcev1alpha3.ResourcePoolStatusRequest, *resourcev1alpha3.ResourcePoolStatusRequestList, *applyconfigurationsresourcev1alpha3.ResourcePoolStatusRequestApplyConfiguration](
"resourcepoolstatusrequests",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *resourcev1alpha3.ResourcePoolStatusRequest {
return &resourcev1alpha3.ResourcePoolStatusRequest{}
},
func() *resourcev1alpha3.ResourcePoolStatusRequestList {
return &resourcev1alpha3.ResourcePoolStatusRequestList{}
},
gentype.PrefersProtobuf[*resourcev1alpha3.ResourcePoolStatusRequest](),
),
}
}

View File

@@ -21,3 +21,7 @@ package v1alpha3
// DeviceTaintRuleListerExpansion allows custom methods to be added to
// DeviceTaintRuleLister.
type DeviceTaintRuleListerExpansion interface{}
// ResourcePoolStatusRequestListerExpansion allows custom methods to be added to
// ResourcePoolStatusRequestLister.
type ResourcePoolStatusRequestListerExpansion interface{}

View File

@@ -0,0 +1,48 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package 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"
)
// ResourcePoolStatusRequestLister helps list ResourcePoolStatusRequests.
// All objects returned here must be treated as read-only.
type ResourcePoolStatusRequestLister interface {
// List lists all ResourcePoolStatusRequests in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*resourcev1alpha3.ResourcePoolStatusRequest, err error)
// Get retrieves the ResourcePoolStatusRequest from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*resourcev1alpha3.ResourcePoolStatusRequest, error)
ResourcePoolStatusRequestListerExpansion
}
// resourcePoolStatusRequestLister implements the ResourcePoolStatusRequestLister interface.
type resourcePoolStatusRequestLister struct {
listers.ResourceIndexer[*resourcev1alpha3.ResourcePoolStatusRequest]
}
// NewResourcePoolStatusRequestLister returns a new ResourcePoolStatusRequestLister.
func NewResourcePoolStatusRequestLister(indexer cache.Indexer) ResourcePoolStatusRequestLister {
return &resourcePoolStatusRequestLister{listers.New[*resourcev1alpha3.ResourcePoolStatusRequest](indexer, resourcev1alpha3.Resource("resourcepoolstatusrequest"))}
}