Conversation
Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com>
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
| 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) |
9692743 to
3c95c44
Compare
No description provided.