mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Fix kubelet panic.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
859ab7450d
commit
59e80cdac3
@ -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