@@ -390,20 +390,22 @@ var (
390
390
},
391
391
)
392
392
393
- nodeGroupCreationCount = k8smetrics .NewCounter (
393
+ nodeGroupCreationCount = k8smetrics .NewCounterVec (
394
394
& k8smetrics.CounterOpts {
395
395
Namespace : caNamespace ,
396
396
Name : "created_node_groups_total" ,
397
397
Help : "Number of node groups created by Node Autoprovisioning." ,
398
398
},
399
+ []string {"group_type" },
399
400
)
400
401
401
- nodeGroupDeletionCount = k8smetrics .NewCounter (
402
+ nodeGroupDeletionCount = k8smetrics .NewCounterVec (
402
403
& k8smetrics.CounterOpts {
403
404
Namespace : caNamespace ,
404
405
Name : "deleted_node_groups_total" ,
405
406
Help : "Number of node groups deleted by Node Autoprovisioning." ,
406
407
},
408
+ []string {"group_type" },
407
409
)
408
410
409
411
nodeTaintsCount = k8smetrics .NewGaugeVec (
@@ -643,12 +645,22 @@ func UpdateNapEnabled(enabled bool) {
643
645
644
646
// RegisterNodeGroupCreation registers node group creation
645
647
func RegisterNodeGroupCreation () {
646
- nodeGroupCreationCount .Add (1.0 )
648
+ RegisterNodeGroupCreationWithLabelValues ("" )
649
+ }
650
+
651
+ // RegisterNodeGroupCreationWithLabelValues registers node group creation with the provided labels
652
+ func RegisterNodeGroupCreationWithLabelValues (groupType string ) {
653
+ nodeGroupCreationCount .WithLabelValues (groupType ).Add (1.0 )
647
654
}
648
655
649
656
// RegisterNodeGroupDeletion registers node group deletion
650
657
func RegisterNodeGroupDeletion () {
651
- nodeGroupDeletionCount .Add (1.0 )
658
+ RegisterNodeGroupDeletionWithLabelValues ("" )
659
+ }
660
+
661
+ // RegisterNodeGroupDeletionWithLabelValues registers node group deletion with the provided labels
662
+ func RegisterNodeGroupDeletionWithLabelValues (groupType string ) {
663
+ nodeGroupDeletionCount .WithLabelValues (groupType ).Add (1.0 )
652
664
}
653
665
654
666
// UpdateScaleDownInCooldown registers if the cluster autoscaler
0 commit comments