File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
staging/src/k8s.io/apiserver/pkg/endpoints/metrics Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -416,6 +416,33 @@ func Reset() {
416
416
}
417
417
}
418
418
419
+ // ResetLabelAllowLists resets the label allow lists for all metrics.
420
+ // NOTE: This is only used for testing.
421
+ func ResetLabelAllowLists () {
422
+ for _ , metric := range metrics {
423
+ if counterVec , ok := metric .(* compbasemetrics.CounterVec ); ok {
424
+ counterVec .ResetLabelAllowLists ()
425
+ continue
426
+ }
427
+ if gaugeVec , ok := metric .(* compbasemetrics.GaugeVec ); ok {
428
+ gaugeVec .ResetLabelAllowLists ()
429
+ continue
430
+ }
431
+ if histogramVec , ok := metric .(* compbasemetrics.HistogramVec ); ok {
432
+ histogramVec .ResetLabelAllowLists ()
433
+ continue
434
+ }
435
+ if summaryVec , ok := metric .(* compbasemetrics.SummaryVec ); ok {
436
+ summaryVec .ResetLabelAllowLists ()
437
+ continue
438
+ }
439
+ if timingHistogramVec , ok := metric .(* compbasemetrics.TimingHistogramVec ); ok {
440
+ timingHistogramVec .ResetLabelAllowLists ()
441
+ continue
442
+ }
443
+ }
444
+ }
445
+
419
446
// UpdateInflightRequestMetrics reports concurrency metrics classified by
420
447
// mutating vs Readonly.
421
448
func UpdateInflightRequestMetrics (phase string , nonmutating , mutating int ) {
You can’t perform that action at this time.
0 commit comments