-
Notifications
You must be signed in to change notification settings - Fork 777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContainerLaunchPriority support container launch timeout alert #1423
Conversation
ls-2018
commented
Sep 19, 2023
- ContainerLaunchPriority support container launch timeout alert #1422
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1423 +/- ##
==========================================
+ Coverage 48.27% 48.40% +0.13%
==========================================
Files 153 154 +1
Lines 21492 21703 +211
==========================================
+ Hits 10375 10506 +131
- Misses 9978 10045 +67
- Partials 1139 1152 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
58cfbbe
to
1249f14
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@zmberg Can you look at this request again please? Thanks. |
@@ -20,6 +20,10 @@ const ( | |||
// ContainerLaunchPriorityEnvName is the env name that users have to define in pod container | |||
// to identity the launch priority of this container. | |||
ContainerLaunchPriorityEnvName = "KRUISE_CONTAINER_PRIORITY" | |||
// ContainerLaunchTimeOutEnvName is high priority container startup times out. | |||
ContainerLaunchTimeOutEnvName = "KRUISE_CONTAINER_LAUNCH_TIMEOUT" | |||
// ContainerLaunchPriorityUpdateTimeKey a label used to record the update time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use annotations to record it?
|
||
if timeout > 0 && time.Duration(timeout)*time.Second < time.Since(updateTime) && (containerStatus == nil || containerStatus.Ready == false) { | ||
name, _ := os.Hostname() | ||
event := &v1.Event{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can call p.recorder.Eventf() function to record event
Signed-off-by: acejilam <[email protected]>
@ls-2018: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |