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
karmada-scheduler add disable-scheduler-estimator-in-pull-mode flag #2064
Conversation
Actually karmada/docs/scheduler-estimator.md Line 33 in 59219f4
|
thank you for your reply. I think the pull mode is used to solve the one-way network problem between the member cluster and karmada, so deploy In the case where the network can communicate in both directions, karmada should recommend users to use the push mode, because from the details, the push mode is more perfect. Our private cloud's kube-apiserver is not open to the public network, including proxies, for security reasons,so scheduler-estimator is useless for our pull mode. FYR |
Hi @prodanlabs, I got you. But some users choose the pull mode not for network reasons. AFAIK, just for HA or some other performance reasons. So I think we should try to use a tunnel or proxy to fix the network barrier, it may be not appropriate to just disable |
@Garrybest Thanks for the quick response Yes, I admit that some users still use pull mode even when the network can communicate in both directions.
In fact, karmada also provides But as far as we are concerned, because of security management regulations, the core business systems on the private cloud are not allowed to be accessed through the public network, nor can network agents or network tunnels be deployed. My idea is that push mode is recommended when there is no network failure. Pull mode does not need to deploy scheduler estimator, or compromise, in pull mode, scheduler adds a flag to close scheduler estimator event. |
It makes sense. We could add a flag to avoid establishing the connection with clusters in pull mode. Would you like to revise again? |
OK |
Hi @Garrybest , do you have any good suggestions for |
e75e2fc
to
ee3938e
Compare
@Garrybest @RainbowMango can you please review? |
ee3938e
to
403db45
Compare
Hi @prodanlabs, this flag is not just used for disable event. If we don't add pull-mode clusters into The option could be like |
Agreed, I'll change it later. thanks |
788ffa5
to
a5a01dc
Compare
7aac8e4
to
d05fed5
Compare
done. |
8c9ace1
to
09358b7
Compare
/lgtm Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
/approve
/hold
For @Tingtal to confirm the grammar.
and for @prodanlabs update the PR descriptions. (Since this PR has changed a lot after discussion, so please help update the PR descriptions as well. )
cmd/scheduler/app/options/options.go
Outdated
@@ -80,6 +82,7 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) { | |||
fs.Float32Var(&o.KubeAPIQPS, "kube-api-qps", 40.0, "QPS to use while talking with karmada-apiserver. Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags.") | |||
fs.IntVar(&o.KubeAPIBurst, "kube-api-burst", 60, "Burst to use while talking with karmada-apiserver. Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags.") | |||
fs.BoolVar(&o.EnableSchedulerEstimator, "enable-scheduler-estimator", false, "Enable calling cluster scheduler estimator for adjusting replicas.") | |||
fs.BoolVar(&o.DisableSchedulerEstimatorInPullMode, "disable-scheduler-estimator-in-pull-mode", false, "Disable scheduler estimator in pull mode clusters, only takes effect when enable-scheduler-estimator is true.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fs.BoolVar(&o.DisableSchedulerEstimatorInPullMode, "disable-scheduler-estimator-in-pull-mode", false, "Disable scheduler estimator in pull mode clusters, only takes effect when enable-scheduler-estimator is true.") | |
fs.BoolVar(&o.DisableSchedulerEstimatorInPullMode, "disable-scheduler-estimator-in-pull-mode", false, "Disable scheduler estimator for pull mode clusters, only takes effect when enable-scheduler-estimator is true.") |
I'm not sure if we should use for
here. @Tingtal can you help to confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fs.BoolVar(&o.DisableSchedulerEstimatorInPullMode, "disable-scheduler-estimator-in-pull-mode", false, "Disable scheduler estimator in pull mode clusters, only takes effect when enable-scheduler-estimator is true.") | |
fs.BoolVar(&o.DisableSchedulerEstimatorInPullMode, "disable-scheduler-estimator-in-pull-mode", false, "Disable the scheduler estimator for clusters in pull mode, which takes effect only when enable-scheduler-estimator is true.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small touches. Pls check.
cmd/scheduler/app/options/options.go
Outdated
@@ -80,6 +82,7 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) { | |||
fs.Float32Var(&o.KubeAPIQPS, "kube-api-qps", 40.0, "QPS to use while talking with karmada-apiserver. Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags.") | |||
fs.IntVar(&o.KubeAPIBurst, "kube-api-burst", 60, "Burst to use while talking with karmada-apiserver. Doesn't cover events and node heartbeat apis which rate limiting is controlled by a different set of flags.") | |||
fs.BoolVar(&o.EnableSchedulerEstimator, "enable-scheduler-estimator", false, "Enable calling cluster scheduler estimator for adjusting replicas.") | |||
fs.BoolVar(&o.DisableSchedulerEstimatorInPullMode, "disable-scheduler-estimator-in-pull-mode", false, "Disable scheduler estimator in pull mode clusters, only takes effect when enable-scheduler-estimator is true.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fs.BoolVar(&o.DisableSchedulerEstimatorInPullMode, "disable-scheduler-estimator-in-pull-mode", false, "Disable scheduler estimator in pull mode clusters, only takes effect when enable-scheduler-estimator is true.") | |
fs.BoolVar(&o.DisableSchedulerEstimatorInPullMode, "disable-scheduler-estimator-in-pull-mode", false, "Disable the scheduler estimator for clusters in pull mode, which takes effect only when enable-scheduler-estimator is true.") |
pkg/scheduler/scheduler.go
Outdated
|
||
enableEmptyWorkloadPropagation bool | ||
} | ||
|
||
type schedulerOptions struct { | ||
// enableSchedulerEstimator represents whether the accurate scheduler estimator should be enabled. | ||
enableSchedulerEstimator bool | ||
// disableSchedulerEstimatorInPullMode represents whether to disable the pull mode scheduler estimator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// disableSchedulerEstimatorInPullMode represents whether to disable the pull mode scheduler estimator. | |
// disableSchedulerEstimatorInPullMode represents whether to disable the scheduler estimator in pull mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
b9aae34
to
6ab8de4
Compare
Hi @XiShanYongYe-Chang , can you help take a look. |
Hi @prodanlabs, have you rebased the newest code in the master branch? |
my master branch is not up to date. |
How to rerun CI . |
Rebase and push again? |
Last time I seemed to see @RainbowMango used the command to rerun CI, I forgot where I saw it |
Signed-off-by: prodan <pengshihaoren@gmail.com>
6ab8de4
to
2f35a48
Compare
No command can be used to re-trigger the test. sad... |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: RainbowMango 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 |
Signed-off-by: prodan pengshihaoren@gmail.com
What type of PR is this?
/kind bug
/kind feature
What this PR does / why we need it:
In pull mode, if the network of the member cluster and karmada are not two-way communication,
scheduler-estimator
is not available.,In this scenario, we need to add a flag to disablescheduler-estimator
in pull mode.For example, my cluster2 is in pull mode, and scheduler-estimator is not installed, the scheduler has been looking for karmada-scheduler-estimator-cluster2.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: