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 diff --git a/go.mod b/go.mod index 3a62ca430..fe9649218 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( golang.org/x/time v0.14.0 google.golang.org/protobuf v1.36.11 gopkg.in/evanphx/json-patch.v4 v4.13.0 - k8s.io/api v0.0.0-20260303202014-605cb02318a5 + k8s.io/api v0.0.0-20260303202015-13e1054b051a k8s.io/apimachinery v0.0.0-20260227203245-48224b4d1ddb k8s.io/klog/v2 v2.130.1 k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4 diff --git a/go.sum b/go.sum index 54891af57..37d127906 100644 --- a/go.sum +++ b/go.sum @@ -123,8 +123,8 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.0.0-20260303202014-605cb02318a5 h1:dsTzpa8GpQOvVwLCfHLrYf2Ay6Ts3ryD40BbDuhhAVE= -k8s.io/api v0.0.0-20260303202014-605cb02318a5/go.mod h1:qhb/XTo9jEH6dtv01aF9OubVFb/O4rILeIUv25AhTbw= +k8s.io/api v0.0.0-20260303202015-13e1054b051a h1:Tevx3r+RgIlXg5kdBJaiaK3cDoMRck8MMTgRwmVCOi8= +k8s.io/api v0.0.0-20260303202015-13e1054b051a/go.mod h1:qhb/XTo9jEH6dtv01aF9OubVFb/O4rILeIUv25AhTbw= k8s.io/apimachinery v0.0.0-20260227203245-48224b4d1ddb h1:0MWXuP1Qkr2TJBSQ2qYrHARDtTXH4TeTZ9q8OPHOQFM= k8s.io/apimachinery v0.0.0-20260227203245-48224b4d1ddb/go.mod h1:zqp0Kd80VeQZHyQ4j0VW/sn9zTHYeXFd/brJe5Po20w= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=