From d3907afb22aecfdf9a6f62ec22cff6169ba9b60a Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Thu, 5 Dec 2024 15:30:00 -0800 Subject: [PATCH] chore: Add initialized label key to metric labels (#1868) --- pkg/controllers/controllers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controllers/controllers.go b/pkg/controllers/controllers.go index 8ca3f9ff1b..a7a5d4e403 100644 --- a/pkg/controllers/controllers.go +++ b/pkg/controllers/controllers.go @@ -99,7 +99,7 @@ func NewControllers( nodehydration.NewController(kubeClient, cloudProvider), status.NewController[*v1.NodeClaim](kubeClient, mgr.GetEventRecorderFor("karpenter"), status.EmitDeprecatedMetrics, status.WithLabels(append(lo.Map(cloudProvider.GetSupportedNodeClasses(), func(obj status.Object, _ int) string { return v1.NodeClassLabelKey(object.GVK(obj).GroupKind()) }), v1.NodePoolLabelKey)...)), status.NewController[*v1.NodePool](kubeClient, mgr.GetEventRecorderFor("karpenter"), status.EmitDeprecatedMetrics), - status.NewGenericObjectController[*corev1.Node](kubeClient, mgr.GetEventRecorderFor("karpenter"), status.WithLabels(append(lo.Map(cloudProvider.GetSupportedNodeClasses(), func(obj status.Object, _ int) string { return v1.NodeClassLabelKey(object.GVK(obj).GroupKind()) }), v1.NodePoolLabelKey)...)), + status.NewGenericObjectController[*corev1.Node](kubeClient, mgr.GetEventRecorderFor("karpenter"), status.WithLabels(append(lo.Map(cloudProvider.GetSupportedNodeClasses(), func(obj status.Object, _ int) string { return v1.NodeClassLabelKey(object.GVK(obj).GroupKind()) }), v1.NodePoolLabelKey, v1.NodeInitializedLabelKey)...)), } // The cloud provider must define status conditions for the node repair controller to use to detect unhealthy nodes