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

✨ klusterlet cr add flag to use best effort resources #317

Merged
merged 4 commits into from
Nov 27, 2023

Conversation

haowells
Copy link
Contributor

@haowells haowells commented Nov 23, 2023

Summary

Klusterlet cr add new flag UseBestEffortResource which allow user use besteffort setting for deployment agent, registration, work etc

Related issue(s)

if resource quota setup in namespace, pod failed to startup and complain this error
Warning FailedCreate 7s (x3 over 14s) replicaset-controller (combined from similar events): Error creating: pods "klusterlet-registration-agent-7d777c4bff-hhxn6" is forbidden: failed quota: high-qos-limit-requests: must specify limits.cpu,limits.memory
Fixes #

@haowells
Copy link
Contributor Author

@qiujian16 PTAL.

@haowells haowells changed the title klusterlet cr add flag to use besteffort resources ✨ klusterlet cr add flag to use besteffort resources Nov 23, 2023
@haowells haowells changed the title ✨ klusterlet cr add flag to use besteffort resources ✨ klusterlet cr add flag to use best effort resources Nov 23, 2023
@qiujian16
Copy link
Member

need to signoff the commit by git commit --amend -s

@@ -146,6 +146,8 @@ type klusterletConfig struct {
WorkFeatureGates []string

HubApiServerHostAlias *operatorapiv1.HubApiServerHostAlias

Copy link
Member

@qiujian16 qiujian16 Nov 23, 2023

Choose a reason for hiding this comment

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

might worth adding a comment to indicate the meaning of this flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@qiujian16 added the comments of flag meaning. so I need to start another PR to api repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@haowells haowells Nov 23, 2023

Choose a reason for hiding this comment

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

add @haoqing0110 PTAL

@qiujian16
Copy link
Member

/approve

looks good in general, just a minor comment and need to signoff the commit. Thanks!

Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (ab87bfc) 61.78% compared to head (70a1bff) 61.76%.
Report is 1 commits behind head on main.

Files Patch % Lines
pkg/operator/helpers/helpers.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #317      +/-   ##
==========================================
- Coverage   61.78%   61.76%   -0.02%     
==========================================
  Files         132      132              
  Lines       13983    13989       +6     
==========================================
+ Hits         8640     8641       +1     
- Misses       4578     4583       +5     
  Partials      765      765              
Flag Coverage Δ
unit 61.76% <16.66%> (-0.02%) ⬇️

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.

@haoqing0110
Copy link
Member

LGTM

@haowells
Copy link
Contributor Author

/test all

Copy link
Contributor

openshift-ci bot commented Nov 24, 2023

@haowells: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

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.

@haowells
Copy link
Contributor Author

try close/reopen PR trigger the pending job

@haoqing0110
Copy link
Member

/ok-to-test

@haoqing0110
Copy link
Member

/test all

Copy link
Contributor

openshift-ci bot commented Nov 24, 2023

@haoqing0110: No presubmit jobs available for open-cluster-management-io/ocm@main

In response to this:

/test all

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.

haolin and others added 3 commits November 25, 2023 00:28
Signed-off-by: haolin <haowells@gmail.com>
Signed-off-by: haolin <haowells@gmail.com>
Signed-off-by: haolin <haowells@gmail.com>
@qiujian16
Copy link
Member

needs to run make update

@haowells
Copy link
Contributor Author

/ok-to-test

@@ -118,10 +118,12 @@ spec:
scheme: HTTPS
port: 8443
initialDelaySeconds: 2
{{if ne .ResourceRequirements "BestEffort"}}
Copy link
Member

Choose a reason for hiding this comment

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

Seems a typo, should be ResourceRequirement, no s.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @haoqing0110 . typo fixed

Signed-off-by: haolin <haowells@gmail.com>
@qiujian16
Copy link
Member

/approve

Copy link
Contributor

openshift-ci bot commented Nov 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haowells, qiujian16

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@haoqing0110
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 27, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 8a4c834 into open-cluster-management-io:main Nov 27, 2023
13 checks passed
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.

4 participants