volcano icon indicating copy to clipboard operation
volcano copied to clipboard

add controller gate flag

Open googs1025 opened this issue 1 year ago • 8 comments

What type of PR is this?

/kind feature

What this PR does / why we need it:

  • add controller gate flag

Which issue(s) this PR fixes:

Fix https://github.com/volcano-sh/volcano/issues/3485

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

None

googs1025 avatar May 24 '24 06:05 googs1025

helm here

kind: Deployment
apiVersion: apps/v1
     ...
    spec:
     ...
      containers:
          - name: {{ .Release.Name }}-controllers
            ...
            args:
              ...
              - --controllers=<we can use custom controller names here>
              - -v=4
             ...
{{- end }}

There are several ways to use it:

  • --controllers:
    • If none of them are set, all controllers are started by default.
    • "*": - --controllers="*", represents startup of all controllers
    • - --controllers="+gc-controller,+job-controller,+pg-controller,+queue-controller", represents startup only gc-controller job-controller pg-controller, queue-controller

googs1025 avatar Jun 23 '24 05:06 googs1025

  • If none of them are set, all controllers are started by default

How about start the most necessary controllers set such as gc,job,pg,queue.

lowang-bh avatar Jun 23 '24 08:06 lowang-bh

  • If none of them are set, all controllers are started by default

How about start the most necessary controllers set such as gc,job,pg,queue.

Certainly, it is ok. However, it might be different from before, which could confuse users since we are uncertain about the scope of the impact. To address this, we should add a toggle setting while keeping the existing functionality unchanged, allowing users to choose whether to enable it or not. IMO, it's better to keep the status quo. However, this can be discussed further to reach a conclusive decision.

googs1025 avatar Jun 23 '24 09:06 googs1025

  • If none of them are set, all controllers are started by default

How about start the most necessary controllers set such as gc,job,pg,queue.

Certainly, it is ok. However, it might be different from before, which could confuse users since we are uncertain about the scope of the impact. To address this, we should add a toggle setting while keeping the existing functionality unchanged, allowing users to choose whether to enable it or not. IMO, it's better to keep the status quo. However, this can be discussed further to reach a conclusive decision.

yeah I agree with you.

Monokaix avatar Jun 24 '24 04:06 Monokaix

Is there anything that needs improvement? I think this PR is perfect.

hwdef avatar Jun 24 '24 06:06 hwdef

usage describe be like:

     ...
      --controllers strings                      Specify controller gates. Use '*' for all controllers, all knownController: [gc-controller job-controller jobflow-controller jobtemplate-controller pg-controller queue-controller] ,and we can use '-' to disable controllers, e.g. "-job-controller,-queue-controller" to disable job and queue controllers. (default [*])

googs1025 avatar Jun 27 '24 02:06 googs1025

"+gc-controller, -gc-controller, *"

Have you considered this case?

I think a function should be added to check for incorrect settings, such as a controller being set open and close at the same time.

good catch! thank @hwdef i will fixed this case

googs1025 avatar Jun 27 '24 13:06 googs1025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: william-wang

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

volcano-sh-bot avatar Jul 12 '24 01:07 volcano-sh-bot

I want to disable job-controller. if I set --controllers=*,-job-controller, it causes Error; then I set --controllers=-job-controller, it disabled all controllers. I have to set --controllers=+queue-controller,+pg-controller,+gc-controller,+hyperNode-controller+any other controllers.

I suggest volcano supports to disable specific controllers by --controllers=*,-job-controller.

openxxs avatar Sep 12 '25 07:09 openxxs

I want to disable job-controller. if I set --controllers=*,-job-controller, it causes Error; then I set --controllers=-job-controller, it disabled all controllers. I have to set --controllers=+queue-controller,+pg-controller,+gc-controller,+hyperNode-controller+any other controllers.

I suggest volcano supports to disable specific controllers by --controllers=*,-job-controller.

@googs1025 Can you take a look?

Monokaix avatar Sep 12 '25 09:09 Monokaix

I want to disable job-controller. if I set --controllers=,-job-controller, it causes Error; then I set --controllers=-job-controller, it disabled all controllers. I have to set --controllers=+queue-controller,+pg-controller,+gc-controller,+hyperNode-controller+any other controllers. I suggest volcano supports to disable specific controllers by --controllers=,-job-controller.

@googs1025 Can you take a look?

I'll take a look the weekend and if it works I'll fix it next week.

googs1025 avatar Sep 12 '25 09:09 googs1025