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

koord-manager: add args for common controllers #1235

Merged

Conversation

saintube
Copy link
Member

@saintube saintube commented Apr 20, 2023

Ⅰ. Describe what this PR does

Add command options for the common controllers. We can enable/disable the known controllers via the arg --controllers.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.01 🎉

Comparison is base (63e3948) 65.41% compared to head (a5f0616) 65.43%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1235      +/-   ##
==========================================
+ Coverage   65.41%   65.43%   +0.01%     
==========================================
  Files         309      309              
  Lines       31756    31756              
==========================================
+ Hits        20773    20779       +6     
+ Misses       9465     9458       -7     
- Partials     1518     1519       +1     
Flag Coverage Δ
unittests 65.43% <0.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...slo-controller/nodemetric/nodemetric_controller.go 52.29% <0.00%> (ø)
...controller/noderesource/noderesource_controller.go 39.39% <0.00%> (ø)
pkg/slo-controller/nodeslo/nodeslo_controller.go 46.61% <0.00%> (ø)

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@jasonliu747 jasonliu747 left a comment

Choose a reason for hiding this comment

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

/lgtm

@zwzhang0107
Copy link
Contributor

/lgtm
/approve

@FillZpp
Copy link
Member

FillZpp commented Apr 21, 2023

Should this be in feature-gate or a command-line flag?

For example, kube-controller-manager has --feature-gates to enable those features in controllers and --controllers to indicate which controllers should be started.

@saintube
Copy link
Member Author

Should this be in feature-gate or a command-line flag?

For example, kube-controller-manager has --feature-gates to enable those features in controllers and --controllers to indicate which controllers should be started.

I think both options are acceptable since these controllers have different maturities. The main reason I chose the feature gate is that the webhook plugins are maintained in this way.

@hormes
Copy link
Member

hormes commented Apr 23, 2023

--controllers to indicate which controllers should be started

I think this is more accurate. The feature gate is a function switch, and the controller is more like a program. Some behaviors inside the controller should be controlled by the feature gate.

@saintube saintube force-pushed the koord-manager-add-featuregates branch from 9edbd83 to c569ec4 Compare April 23, 2023 13:12
@koordinator-bot koordinator-bot bot removed the lgtm label Apr 23, 2023
@saintube saintube changed the title koord-manager: add feature-gates for common controllers koord-manager: add commandline args for common controllers Apr 23, 2023
@saintube
Copy link
Member Author

--controllers to indicate which controllers should be started

I think this is more accurate. The feature gate is a function switch, and the controller is more like a program. Some behaviors inside the controller should be controlled by the feature gate.

@FillZpp @hormes Fixed. PTAL.
Now we use --controllers to control which controllers should be added to the manager.

@saintube saintube changed the title koord-manager: add commandline args for common controllers koord-manager: add args for common controllers Apr 23, 2023
@hormes
Copy link
Member

hormes commented Apr 24, 2023

/lgtm

cmd/koord-manager/main.go Outdated Show resolved Hide resolved
cmd/koord-manager/main.go Outdated Show resolved Hide resolved
cmd/koord-manager/main.go Outdated Show resolved Hide resolved
@saintube saintube force-pushed the koord-manager-add-featuregates branch from c569ec4 to 963f31e Compare April 24, 2023 09:02
@koordinator-bot koordinator-bot bot removed the lgtm label Apr 24, 2023
cmd/koord-manager/main.go Outdated Show resolved Hide resolved
@saintube saintube force-pushed the koord-manager-add-featuregates branch from 963f31e to 857b4a0 Compare April 25, 2023 10:30
Signed-off-by: saintube <saintube@foxmail.com>
@saintube saintube force-pushed the koord-manager-add-featuregates branch from 857b4a0 to a5f0616 Compare April 25, 2023 10:32
Copy link
Member

@eahydra eahydra left a comment

Choose a reason for hiding this comment

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

/lgtm

@koordinator-bot koordinator-bot bot added the lgtm label Apr 25, 2023
@saintube
Copy link
Member Author

/assign @FillZpp

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes, jasonliu747, zwzhang0107

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

@koordinator-bot koordinator-bot bot merged commit ddc5054 into koordinator-sh:main Apr 28, 2023
16 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.

None yet

6 participants