kubernetes-sigs / scheduler-plugins

Repository for out-of-tree scheduler plugins based on scheduler framework.
Apache License 2.0
1.04k stars 484 forks source link

Multi-tenant Elastic Resource Quota #48 #681

Open kaiohenricunha opened 7 months ago

kaiohenricunha commented 7 months ago

Area

Other components

No response

What happened?

The current design of the capacity scheduler for elastic quotas doesn't fit a multi-tenant scenario, if I understand it correctly.

If I have the following namespaces:

acme-dev-us-west-2-webhook acme-dev-us-west-2-kube-janitor apple-dev-us-west-2-webhook

It would be great if we could configure the "acme" tenant resources to be shared only among namespaces starting with "acme".

What did you expect to happen?

Tenant's resources not shared with other tenants

How can we reproduce it (as minimally and precisely as possible)?

No response

Anything else we need to know?

No response

Kubernetes version

1.28

Scheduler Plugins version

Latest

Huang-Wei commented 7 months ago

My 2 cents is that there is no one-size-fit-all quota design. If an ElasticQuota needs to support cross-namespace sharing, there are more areas need to be considered:

If you have a through design and can make it backwards-compatible, I'm happy to review to discuss the next steps.

kaiohenricunha commented 5 months ago

My 2 cents is that there is no one-size-fit-all quota design. If an ElasticQuota needs to support cross-namespace sharing, there are more areas need to be considered:

  • semantics of selector (label selector or regex or mix, etc.)

  • how to deal with overlapping selectors

  • how it impacts preemption

  • ...

If you have a through design and can make it backwards-compatible, I'm happy to review to discuss the next steps.

Thanks for the ideas. I'll see if I can work on that and submit a PR. Could be an interesting use case.

imliuda commented 4 months ago

My 2 cents is that there is no one-size-fit-all quota design. If an ElasticQuota needs to support cross-namespace sharing, there are more areas need to be considered:

  • semantics of selector (label selector or regex or mix, etc.)
  • how to deal with overlapping selectors
  • how it impacts preemption
  • ...

If you have a through design and can make it backwards-compatible, I'm happy to review to discuss the next steps.

Thanks for the ideas. I'll see if I can work on that and submit a PR. Could be an interesting use case.

Hi, may I ask if you are working on it? Maybe a new queue based plugin can be introduced.

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 week ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten