karmada
karmada copied to clipboard
[Umbrella] Support configure estimator address for karmada Scheduler & Descheduler
What would you like to be added:
karmada scheduler & descheduler component introduce a new flag named scheduler-estimator-service-prefix
.
fs.StringVar(&o.SchedulerEstimatorServicePrefix, "scheduler-estimator-service-prefix", "karmada-scheduler-estimator", "The prefix of scheduler estimator service name")
Iterated task:
- [x] karmada scheduler component introduce a new flag named
scheduler-estimator-service-prefix
- [x] karmada descheduler component introduce a new flag named
scheduler-estimator-service-prefix
. - [ ] karmadactl component introduce a new flag named
scheduler-estimator-service-prefix
. - [ ] modify karmada charts
Why is this needed:
When multiple karmada instances are deployed under the same namespace and estimators deployed, the scheduler is connected to the same estimator according to the existing logic
FYI:
- https://github.com/karmada-io/karmada/blob/master/pkg/estimator/client/cache.go#L86
- https://github.com/karmada-io/karmada/blob/636817ae42649801ed5bc436119d3c92b189c11e/pkg/util/names/names.go#L109
/cc @RainbowMango @Garrybest
/assign
I believe it's a significant work.
When multiple karmada instances are deployed under the same namespace and estimators deployed, the scheduler is connected to the same estimator according to the existing logic
I don't get it. What do you mean multiple karmada instances are deployed under the same namespace
?
@RainbowMango
there are two karmada instance in the same namespace, but only one scheduler estimator service is allowed. becasuse the scheduler and descheduler of two karmada will connected to the same estimator according to the existing logic.
NAME READY STATUS RESTARTS AGE
demo-etcd-0 1/1 Running 0 3m3s
demo-firefly-karmada-manager-584b697d6c-jxwp5 1/1 Running 0 2m14s
demo-karmada-aggregated-apiserver-8645647fc4-v9xp6 1/1 Running 0 2m16s
demo-karmada-apiserver-67645f66b-2gj8l 1/1 Running 0 3m3s
demo-karmada-controller-manager-75966bf9d8-nfx2x 1/1 Running 0 2m14s
demo-karmada-kube-controller-manager-5b7fd6c567-9ztlp 1/1 Running 0 2m14s
demo-karmada-scheduler-5dd8d9cb8b-bp565 1/1 Running 0 2m14s
demo-karmada-webhook-5d799b9d-wb4rg 1/1 Running 0 2m14s
demo1-etcd-0 1/1 Running 0 11h
demo1-firefly-karmada-manager-5678598d95-pr9jd 1/1 Running 0 11h
demo1-karmada-aggregated-apiserver-65c77fbf4d-r5n6n 1/1 Running 0 11h
demo1-karmada-apiserver-8495c66b47-xbfp8 1/1 Running 1 (11h ago) 11h
demo1-karmada-controller-manager-6fbd48544b-wktmc 1/1 Running 0 11h
demo1-karmada-kube-controller-manager-57f9fd76f6-wz9gw 1/1 Running 0 11h
demo1-karmada-scheduler-64b65b45d8-txzhb 1/1 Running 0 11h
demo1-karmada-webhook-5488959847-tqc56 1/1 Running 0 11h
karmada-scheduler-estimator-ik8s-69c8656785-4jfg9 1/1 Running 0 31s
I expect that the scheduler allow user to specify estimator address by service prefix.
NAME READY STATUS RESTARTS AGE
demo-etcd-0 1/1 Running 0 3m3s
demo-firefly-karmada-manager-584b697d6c-jxwp5 1/1 Running 0 2m14s
demo-karmada-aggregated-apiserver-8645647fc4-v9xp6 1/1 Running 0 2m16s
demo-karmada-apiserver-67645f66b-2gj8l 1/1 Running 0 3m3s
demo-karmada-controller-manager-75966bf9d8-nfx2x 1/1 Running 0 2m14s
demo-karmada-kube-controller-manager-5b7fd6c567-9ztlp 1/1 Running 0 2m14s
demo-karmada-scheduler-5dd8d9cb8b-bp565 1/1 Running 0 2m14s
demo-karmada-webhook-5d799b9d-wb4rg 1/1 Running 0 2m14s
demo-karmada-scheduler-estimator-ik8s-69c8656785-4jfg9 1/1 Running 0 31s
demo1-etcd-0 1/1 Running 0 11h
demo1-firefly-karmada-manager-5678598d95-pr9jd 1/1 Running 0 11h
demo1-karmada-aggregated-apiserver-65c77fbf4d-r5n6n 1/1 Running 0 11h
demo1-karmada-apiserver-8495c66b47-xbfp8 1/1 Running 1 (11h ago) 11h
demo1-karmada-controller-manager-6fbd48544b-wktmc 1/1 Running 0 11h
demo1-karmada-kube-controller-manager-57f9fd76f6-wz9gw 1/1 Running 0 11h
demo1-karmada-scheduler-64b65b45d8-txzhb 1/1 Running 0 11h
demo1-karmada-webhook-5488959847-tqc56 1/1 Running 0 11h
demo1-karmada-scheduler-estimator-ik8s-69c8656785-4jfg9 1/1 Running 0 31s
With the proposed prefix, you can let one of the karmada-scheduler connects to like demo1-estimator
and another connects to demo2-estimator
. Am I right?
I wonder if this is a normal use case, that deploys more than one Karmada control plane in one namespace? Or just a demo?
ping @carlory , any comments for my question above?
@RainbowMango
With the proposed prefix, you can let one of the karmada-scheduler connects to like demo1-estimator and another connects to demo2-estimator. Am I right?
yes.
I wonder if this is a normal use case, that deploys more than one Karmada control plane in one namespace? Or just a demo?
It is just a demo. We should allow this extension, rather than hard-coding it, to limit this behavior from happening.
It is just a demo. We should allow this extension, rather than hard-coding it, to limit this behavior from happening.
I agree, but I'd hesitate to do it now since we don't have a clear use case yet.
@Garrybest You mentioned it's a significant work
, can you explain more about it?
Yes, I was thinking about the prefix could be configurable. Now we use a immutable name rule here for estimator.
Well, it would be better to provide a real user case so far.
Yes, maybe what we need is a more flexible and customized way to set the connection between karmada-scheduler and karmada-estimator, not just a prefix.
Why not use SVC
+ Label Selector
?