mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +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 _, 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