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:
Carlos Eduardo Arango Gutierrez
2025-11-10 15:50:09 -05:00
committed by Kubernetes Publisher
parent e243a98fa8
commit 7bb07cbe8e
2 changed files with 14 additions and 0 deletions

View File

@@ -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
}

View File

@@ -7519,6 +7519,9 @@ var schemaYAML = typed.YAMLObject(`types:
- name: health
type:
scalar: string
- name: message
type:
scalar: string
- name: resourceID
type:
scalar: string