Skip to content

Conversation

@ZhangSetSail
Copy link
Collaborator

No description provided.

Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 10, 2025 06:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances pod eviction event handling by extending the monitoring window and adding more specific eviction reason detection. The changes enable the system to detect and report eviction events throughout a pod's entire lifecycle rather than just within the first 30 minutes.

  • Extended monitoring window from 30 minutes to indefinite to catch runtime evictions
  • Added granular eviction reason detection for PID exhaustion, inode exhaustion, and ephemeral storage issues
  • Enhanced error messages with more context and user guidance

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
worker/master/podevent/podevent.go Removed 30-minute monitoring upper bound, extended cache cleanup to 24 hours, and enhanced eviction detection with specific resource types
util/language.go Added Chinese translations for new eviction event types (PID, inode, disk pressure, generic resource pressure)

msg = util.Translation("Deployment failed: insufficient storage resources")
statusMsg := strings.ToLower(pod.Status.Message)
if strings.Contains(statusMsg, "memory") || strings.Contains(statusMsg, "mem") {
msg = fmt.Sprintf("%s: %s", util.Translation("Deployment failed: container out of memory killed"), pod.Status.Message)
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The translation key used for memory eviction is inconsistent with the eviction context. For memory evictions, the message uses "Deployment failed: container out of memory killed" which is actually meant for OOMKilled containers (line 656), not pod evictions. This should use a dedicated translation key like "Deployment failed: pod evicted due to memory pressure" to maintain consistency with the other eviction-specific messages.

Suggested change
msg = fmt.Sprintf("%s: %s", util.Translation("Deployment failed: container out of memory killed"), pod.Status.Message)
msg = fmt.Sprintf("%s: %s", util.Translation("Deployment failed: pod evicted due to memory pressure"), pod.Status.Message)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant