mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 10:17:46 +00:00
fix nil pointer dereference panic for deprecated metrics
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user