mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #71166 from Random-Liu/fix-kubelet-panic
Fix kubelet panic.
This commit is contained in:
commit
df8ad8eae1
@ -62,7 +62,7 @@ func (c *logMetricsCollector) Collect(ch chan<- prometheus.Metric) {
|
||||
|
||||
for _, ps := range podStats {
|
||||
for _, c := range ps.Containers {
|
||||
if c.Logs.UsedBytes != nil {
|
||||
if c.Logs != nil && c.Logs.UsedBytes != nil {
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
descLogSize,
|
||||
prometheus.GaugeValue,
|
||||
|
Loading…
Reference in New Issue
Block a user