Fix workloadspread maxReplicas

Signed-off-by: Siyu Wang <FillZpp.pub@gmail.com>
This commit is contained in:
Siyu Wang 2022-02-16 11:46:54 +08:00
parent f80c0fec1f
commit bd11d8138e
1 changed files with 0 additions and 18 deletions

View File

@ -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( *generator.NewFamilyGenerator(
descWorkloadSpreadAnnotationsName, descWorkloadSpreadAnnotationsName,
descWorkloadSpreadAnnotationsHelp, descWorkloadSpreadAnnotationsHelp,