Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ls-2018
Copy link
Member

@ls-2018 ls-2018 commented Sep 19, 2023

@kruise-bot kruise-bot added the size/M size/M: 30-99 label Sep 19, 2023
@ls-2018 ls-2018 changed the title finished issus 1422 [draft] finished issus 1422 Sep 20, 2023
@kruise-bot kruise-bot added size/L size/L: 100-499 and removed size/M size/M: 30-99 labels Sep 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2023

Codecov Report

Attention: Patch coverage is 85.36585% with 6 lines in your changes missing coverage. Please review.

Project coverage is 48.40%. Comparing base (12e6c38) to head (cfe5886).
Report is 90 commits behind head on master.

Files Patch % Lines
...chpriority/container_launch_priority_controller.go 85.36% 5 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
unittests 48.40% <85.36%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ls-2018 ls-2018 changed the title [draft] finished issus 1422 finished issus 1422 Sep 20, 2023
@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from zmberg by writing /assign @zmberg in a comment. For more information see:The Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ls-2018
Copy link
Member Author

ls-2018 commented Oct 9, 2023

@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.
Copy link
Member

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{
Copy link
Member

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 <acejilam@gmail.com>
@kruise-bot
Copy link

@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.

@ls-2018 ls-2018 changed the title finished issus 1422 ContainerLaunchPriority support container launch timeout alert Mar 28, 2024
@ls-2018 ls-2018 closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants