Merge pull request #126940 from pohly/dra-1.31-api-comments

DRA API: update some comments
This commit is contained in:
Kubernetes Prow Robot 2024-08-31 06:14:43 +01:00 committed by GitHub
commit 2ecff6d0db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 34 additions and 2 deletions

View File

@ -362,6 +362,12 @@ type DeviceClaim struct {
// +optional
// +listType=atomic
Config []DeviceClaimConfiguration
// Potential future extension, ignored by older schedulers. This is
// fine because scoring allows users to define a preference, without
// making it a hard requirement.
//
// Score *SomeScoringStruct
}
const (
@ -552,6 +558,16 @@ type DeviceConstraint struct {
// +optional
// +oneOf=ConstraintType
MatchAttribute *FullyQualifiedName
// Potential future extension, not part of the current design:
// A CEL expression which compares different devices and returns
// true if they match.
//
// Because it would be part of a one-of, old schedulers will not
// accidentally ignore this additional, for them unknown match
// criteria.
//
// MatchExpression string
}
// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.

View File

@ -368,6 +368,12 @@ type DeviceClaim struct {
// +optional
// +listType=atomic
Config []DeviceClaimConfiguration `json:"config,omitempty" protobuf:"bytes,3,opt,name=config"`
// Potential future extension, ignored by older schedulers. This is
// fine because scoring allows users to define a preference, without
// making it a hard requirement.
//
// Score *SomeScoringStruct
}
const (
@ -558,6 +564,16 @@ type DeviceConstraint struct {
// +optional
// +oneOf=ConstraintType
MatchAttribute *FullyQualifiedName `json:"matchAttribute,omitempty" protobuf:"bytes,2,opt,name=matchAttribute"`
// Potential future extension, not part of the current design:
// A CEL expression which compares different devices and returns
// true if they match.
//
// Because it would be part of a one-of, old schedulers will not
// accidentally ignore this additional, for them unknown match
// criteria.
//
// MatchExpression string
}
// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.

View File

@ -150,7 +150,7 @@ type NodePrepareResourceResponse struct {
// may have zero or more devices.
Devices []*Device `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
// If non-empty, preparing the ResourceClaim failed.
// cdi_devices is ignored in that case.
// Devices are ignored in that case.
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_sizecache int32 `json:"-"`

View File

@ -67,7 +67,7 @@ message NodePrepareResourceResponse {
// may have zero or more devices.
repeated Device devices = 1;
// If non-empty, preparing the ResourceClaim failed.
// cdi_devices is ignored in that case.
// Devices are ignored in that case.
string error = 2;
}