mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
fix nil pointer dereference panic for deprecated metrics
This commit is contained in:
parent
f33498a825
commit
b83600de01
@ -118,12 +118,7 @@ func countSkipTLSMetric(insecureSkipTLSVerifyBackend bool) {
|
||||
}
|
||||
counter.Inc()
|
||||
|
||||
deprecatedCounter, err := deprecatedPodLogsUsage.GetMetricWithLabelValues(usageType)
|
||||
if err != nil {
|
||||
utilruntime.HandleError(err)
|
||||
return
|
||||
}
|
||||
deprecatedCounter.Inc()
|
||||
deprecatedPodLogsUsage.WithLabelValues(usageType).Inc()
|
||||
}
|
||||
|
||||
// NewGetOptions creates a new options object
|
||||
|
Loading…
Reference in New Issue
Block a user