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

✨ Configurable qos resources for containers managed by cluster-manager and klusterlet #351

Merged

Conversation

dongbeiqing91
Copy link
Contributor

Summary

Configurable qos resources for containers managed by cluster-manager and klusterlet

Related issue(s)

Fixes #

Related PR

open-cluster-management-io/api#316

@openshift-ci openshift-ci bot requested review from xuezhaojun and zhujian7 January 19, 2024 08:16
@dongbeiqing91
Copy link
Contributor Author

dongbeiqing91 commented Jan 19, 2024

/hold
Pending open-cluster-management-io/api#316 this PR and then resolve TODOs

@dongbeiqing91
Copy link
Contributor Author

/hold cancel

@dongbeiqing91
Copy link
Contributor Author

/hold

@@ -1,114 +0,0 @@
package helpers
Copy link
Member

@haoqing0110 haoqing0110 Jan 23, 2024

Choose a reason for hiding this comment

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

The PlacementDecisionGetter is being used by other controllers, GetClusterChanges and the clusters_test.go is used to test the PlacementDecisionGetter I think. Any reason want to remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this because functions used in pkg/common/helpers/clusters.go are not found after I updated open-cluster-management.io/api to the latest commit in go.mod
Confirmed with @qiujian16, the not found issue will be fixed by open-cluster-management-io/addon-framework#232.
I will update this PR then after the above PR is merged.

Copy link
Member

Choose a reason for hiding this comment

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

@promid get it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

file restored

}

func TestRenderingResourceRequirements(t *testing.T) {
r := &operatorapiv1.ResourceRequirement{
Copy link
Member

Choose a reason for hiding this comment

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

seems to me the three tests can be put in one test func with different cases. It also worth a test case with type is ResourceRequirement and ResourceRequirements is nil or empty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

merged into one unit test with 3 cases

@dongbeiqing91
Copy link
Contributor Author

/hold cancel

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

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

Comparison is base (c04ab36) 61.35% compared to head (65acbb8) 61.29%.

Files Patch % Lines
pkg/operator/helpers/helpers.go 0.00% 15 Missing ⚠️
...stermanagercontroller/clustermanager_controller.go 42.85% 3 Missing and 1 partial ⚠️
...lers/klusterletcontroller/klusterlet_controller.go 55.55% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #351      +/-   ##
==========================================
- Coverage   61.35%   61.29%   -0.06%     
==========================================
  Files         132      132              
  Lines       13996    14020      +24     
==========================================
+ Hits         8587     8594       +7     
- Misses       4657     4672      +15     
- Partials      752      754       +2     
Flag Coverage Δ
unit 61.29% <25.80%> (-0.06%) ⬇️

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

Signed-off-by: Dong Beiqing <[email protected]>
@dongbeiqing91
Copy link
Contributor Author

executed make fmt-imports

@qiujian16
Copy link
Member

/approve
/lgtm

I am fine to merge this, I think we also need to add an integration test case as a followup

Copy link
Contributor

openshift-ci bot commented Jan 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: promid, 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

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