mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +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 _, ps := range podStats {
|
||||||
for _, c := range ps.Containers {
|
for _, c := range ps.Containers {
|
||||||
if c.Logs.UsedBytes != nil {
|
if c.Logs != nil && c.Logs.UsedBytes != nil {
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
descLogSize,
|
descLogSize,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
Loading…
Reference in New Issue
Block a user