mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-30 21:51:14 +00:00
DRA API: AdminAccess in DeviceRequestAllocationResult
Drivers need to know that because admin access may also grant additional permissions. The allocator needs to ignore such results when determining which devices are considered as allocated. In both cases it is conceptually cleaner to not rely on the content of the ClaimSpec. Kubernetes-commit: f3fef01e79a75ebc4c327afb7d05d6fd350e08fa
This commit is contained in:
parent
a887e579c0
commit
d32193115c
@ -12443,6 +12443,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult
|
||||
map:
|
||||
fields:
|
||||
- name: adminAccess
|
||||
type:
|
||||
scalar: boolean
|
||||
- name: device
|
||||
type:
|
||||
scalar: string
|
||||
|
@ -21,10 +21,11 @@ package v1alpha3
|
||||
// DeviceRequestAllocationResultApplyConfiguration represents a declarative configuration of the DeviceRequestAllocationResult type for use
|
||||
// with apply.
|
||||
type DeviceRequestAllocationResultApplyConfiguration struct {
|
||||
Request *string `json:"request,omitempty"`
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
Request *string `json:"request,omitempty"`
|
||||
Driver *string `json:"driver,omitempty"`
|
||||
Pool *string `json:"pool,omitempty"`
|
||||
Device *string `json:"device,omitempty"`
|
||||
AdminAccess *bool `json:"adminAccess,omitempty"`
|
||||
}
|
||||
|
||||
// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with
|
||||
@ -64,3 +65,11 @@ func (b *DeviceRequestAllocationResultApplyConfiguration) WithDevice(value strin
|
||||
b.Device = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAdminAccess sets the AdminAccess field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AdminAccess field is set to the value of the last call.
|
||||
func (b *DeviceRequestAllocationResultApplyConfiguration) WithAdminAccess(value bool) *DeviceRequestAllocationResultApplyConfiguration {
|
||||
b.AdminAccess = &value
|
||||
return b
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user