Fix workloadspread maxReplicas
Signed-off-by: Siyu Wang <FillZpp.pub@gmail.com>
This commit is contained in:
parent
f80c0fec1f
commit
bd11d8138e
|
|
@ -111,24 +111,6 @@ func workloadSpreadMetricFamilies(allowAnnotationsList, allowLabelsList []string
|
|||
}
|
||||
}),
|
||||
),
|
||||
*generator.NewFamilyGenerator(
|
||||
"kruise_workloadspread_spec_subsets_max_replicas",
|
||||
"The desired max replicas of this subset.",
|
||||
metric.Gauge,
|
||||
"",
|
||||
wrapWorkloadSpreadFunc(func(ws *v1alpha1.WorkloadSpread) *metric.Family {
|
||||
ms := []*metric.Metric{}
|
||||
for _, subset := range ws.Spec.Subsets {
|
||||
ms = append(ms, &metric.Metric{
|
||||
LabelKeys: []string{"maxreplicas"},
|
||||
LabelValues: []string{subset.MaxReplicas.StrVal},
|
||||
})
|
||||
}
|
||||
return &metric.Family{
|
||||
Metrics: ms,
|
||||
}
|
||||
}),
|
||||
),
|
||||
*generator.NewFamilyGenerator(
|
||||
descWorkloadSpreadAnnotationsName,
|
||||
descWorkloadSpreadAnnotationsHelp,
|
||||
|
|
|
|||
Loading…
Reference in New Issue