volcano-sh / volcano

A Cloud Native Batch System (Project under CNCF)
https://volcano.sh
Apache License 2.0
3.91k stars 902 forks source link

Add controller switch params. #3485

Open Monokaix opened 1 month ago

Monokaix commented 1 month ago

What would you like to be added:

Add a switch params in vc-controller to determine which controller is enabled and which is disabled.

Why is this needed:

some times we do not need start all controllers like jobflow and jobtemplate, so we can disable them to reduce unnecessary memory and cpu consuming.

Monokaix commented 1 month ago

We can refer to: https://github.com/kubernetes/kubernetes/blob/8361522b40cc8b569efdd6ee2456fa514071cad1/staging/src/k8s.io/controller-manager/app/helper.go#L60

Monokaix commented 1 month ago

/good-first-issue

volcano-sh-bot commented 1 month ago

@Monokaix: This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to [this](https://github.com/volcano-sh/volcano/issues/3485): >/good-first-issue Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
googs1025 commented 1 month ago

/assign

googs1025 commented 1 month ago

hey @Monokaix I would also like to ask if this option should be put into the flags?

*: Start all controllers by default. +job,queue: Only start the job and queue controllers. -job,queue: Do not start the job and queue controllers.

flag.StringVar(&controllerGates, "controller-gates", "*", "Specify controller gates. Use '*' for all controllers, '+controller1,controller2' to start specific controllers, and '-controller1,controller2' to stop specific controllers.")
Monokaix commented 1 month ago

hey @Monokaix I would also like to ask if this option should be put into the flags?

*: Start all controllers by default. +job,queue: Only start the job and queue controllers. -job,queue: Do not start the job and queue controllers.

flag.StringVar(&controllerGates, "controller-gates", "*", "Specify controller gates. Use '*' for all controllers, '+controller1,controller2' to start specific controllers, and '-controller1,controller2' to stop specific controllers.")

It's ok : )