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

Add helm variables to choose controllers of karmada and kubernetes ma… #2542

Closed

Conversation

fredgate
Copy link
Contributor

What type of PR is this?
/kind feature

What this PR does / why we need it:
Allow to choose controllers executed by karmada and kubernetes manager of control plane when deploying with the Helm chart.

Which issue(s) this PR fixes:
Fixes #2512

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Add variables `controllerManager.config.controllers` and `kubeControllerManager.config.controllers` to choose controllers executed by karmada and kubernetes managers

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 19, 2022
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign pidb after the PR has been reviewed.
You can assign the PR to them by writing /assign @pidb in a comment when ready.

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

@karmada-bot
Copy link
Collaborator

Welcome @fredgate! It looks like this is your first PR to karmada-io/karmada 🎉

@karmada-bot karmada-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 19, 2022
@fredgate fredgate force-pushed the feature/helm-value-controllers branch from 5c19b5a to 2c0e322 Compare September 19, 2022 18:02
…nager

Signed-off-by: fredgate <barriere.fr@gmail.com>
@fredgate fredgate force-pushed the feature/helm-value-controllers branch from 2c0e322 to 55744e0 Compare September 19, 2022 22:29
@RainbowMango
Copy link
Member

/lgtm
/assign @Poor12

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 20, 2022
Copy link
Member

@Poor12 Poor12 left a comment

Choose a reason for hiding this comment

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

Thanks @fredgate. Would you like to update the document here synchronously? :)

@@ -261,6 +261,9 @@ controllerManager:
## - myRegistryKeySecretName
##
pullSecrets: []
## @param controllerManager.config.controllers the controllers launched by the manager.
config:
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to use controllers directly. config looks a bit redundant.

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 can use controllers directly instead of config.controllers, but I preferred the latter because it will be more organized if some additional parameters need to be added such as cluster-status-update-frequency or v...
All these values will be clearly under controllerManager.config rather than directly at the root of controllerManager, which I find more readable.

What do you think about it ?

Copy link
Member

Choose a reason for hiding this comment

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

I got what you mean. I prefer to put some related configuration items under the same group. It's ok to use controllers directly when there are currently no other options.
BTW, I don't think config is a good group name. All of them in controllerManager belong to the category of config.

## controller manager config
controllerManager:

Copy link
Member

Choose a reason for hiding this comment

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

I can use controllers directly instead of config.controllers, but I preferred the latter because it will be more organized if some additional parameters need to be added such as cluster-status-update-frequency or v...

I agree that we may need to customize other parameters later, they are organized together would be great!

I don't think config is a good group name. All of them in controllerManager belong to the category of config.

How about args?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes args seems like a better name to me.
Should we use it as

  • an object with predefined properties (like I did in the PR)
  • an array where as many elements can be added freely. We could fill this variable like this during a release
controllerManager:
  args:
    - --controllers=-namespace,*
    - --v=3

The latter makes it possible to better cover all the possibilities without modification.

Copy link
Member

Choose a reason for hiding this comment

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

I think the former is better. The latter may confuse users about which configuration items can be configured.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The latter option allows to configure all args of karmada-controller-manager, that allows the user to configure anything he wants, not just what we imagine : there can always be unimagined scenarios, like for example mine. And both current and future. And the chart will be compatible without change not only with current arguments but also with future ones.
@RainbowMango What do you think about this two solutions ?

Copy link
Member

Choose a reason for hiding this comment

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

The latter option allows to configure all args of karmada-controller-manager, that allows the user to configure anything he wants, not just what we imagine

The idea is great, but my concern is the user experience. The users might need to specify all args at here, even they just want to customize the --controllers.

Copy link
Member

Choose a reason for hiding this comment

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

Kindly ping @fredgate .

@Poor12
Copy link
Member

Poor12 commented Mar 8, 2023

Hi, @fredgate, I guess you are busy now. I put the remaining work of this pr in #3240. Looking forward to your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Namespaces should not be synced in all clusters
4 participants