Merge pull request #128189 from zylxjtu/bug

Fix the incorrect metrics setting/naming in nodeshutdown manager
This commit is contained in:
Kubernetes Prow Robot 2024-11-06 02:29:29 +00:00 committed by GitHub
commit 8c5472ce66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -751,7 +751,7 @@ var (
&metrics.GaugeOpts{ &metrics.GaugeOpts{
Subsystem: KubeletSubsystem, Subsystem: KubeletSubsystem,
Name: "graceful_shutdown_end_time_seconds", Name: "graceful_shutdown_end_time_seconds",
Help: "Last graceful shutdown start time since unix epoch in seconds", Help: "Last graceful shutdown end time since unix epoch in seconds",
StabilityLevel: metrics.ALPHA, StabilityLevel: metrics.ALPHA,
}, },
) )

View File

@ -321,7 +321,7 @@ func (m *managerImpl) processShutdownEvent() error {
if err != nil { if err != nil {
m.logger.Error(err, "Failed to store graceful shutdown state") m.logger.Error(err, "Failed to store graceful shutdown state")
} }
metrics.GracefulShutdownStartTime.Set(timestamp(endTime)) metrics.GracefulShutdownEndTime.Set(timestamp(endTime))
}() }()
} }