153 lines
7.6 KiB
Go
153 lines
7.6 KiB
Go
/*
|
|
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
|
|
}
|