diff --git a/applyconfigurations/core/v1/resourcehealth.go b/applyconfigurations/core/v1/resourcehealth.go index 684153c49..061535b8d 100644 --- a/applyconfigurations/core/v1/resourcehealth.go +++ b/applyconfigurations/core/v1/resourcehealth.go @@ -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 +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 251245afb..ebf35632d 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -7519,6 +7519,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: health type: scalar: string + - name: message + type: + scalar: string - name: resourceID type: scalar: string