mirror of
https://github.com/kubernetes/client-go.git
synced 2026-05-15 03:33:11 +00:00
KEP-4680: Add message field support to DRA device health reporting
Author: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com> Co-Authored-By: Harshal Patil <12152047+harche@users.noreply.github.com> Signed-off-by: Harshal Patil <12152047+harche@users.noreply.github.com> Kubernetes-commit: ad6c155449e38d7cca22230fdb99ae02b65ccb59
This commit is contained in:
committed by
Kubernetes Publisher
parent
e243a98fa8
commit
7bb07cbe8e
@@ -41,6 +41,9 @@ type ResourceHealthApplyConfiguration struct {
|
||||
//
|
||||
// In future we may want to introduce the PermanentlyUnhealthy Status.
|
||||
Health *corev1.ResourceHealthStatus `json:"health,omitempty"`
|
||||
// Message provides human-readable context for Health (e.g. "ECC error count exceeded threshold").
|
||||
// This field is populated by the kubelet when ResourceHealthStatusMessage is enabled if the DRA plugin returns a message, and is null otherwise.
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceHealthApplyConfiguration constructs a declarative configuration of the ResourceHealth type for use with
|
||||
@@ -64,3 +67,11 @@ func (b *ResourceHealthApplyConfiguration) WithHealth(value corev1.ResourceHealt
|
||||
b.Health = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessage sets the Message 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 Message field is set to the value of the last call.
|
||||
func (b *ResourceHealthApplyConfiguration) WithMessage(value string) *ResourceHealthApplyConfiguration {
|
||||
b.Message = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -7519,6 +7519,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: health
|
||||
type:
|
||||
scalar: string
|
||||
- name: message
|
||||
type:
|
||||
scalar: string
|
||||
- name: resourceID
|
||||
type:
|
||||
scalar: string
|
||||
|
||||
Reference in New Issue
Block a user