Skip to content
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

[CapacityScheduling] ElasticQuota default value for "max" is zero #424

Closed
Telemaco019 opened this issue Sep 3, 2022 · 5 comments · Fixed by #520
Closed

[CapacityScheduling] ElasticQuota default value for "max" is zero #424

Telemaco019 opened this issue Sep 3, 2022 · 5 comments · Fixed by #520
Assignees

Comments

@Telemaco019
Copy link

Telemaco019 commented Sep 3, 2022

Hello everyone,

When creating an ElasticQuota resource, if the "max" field is not provided then its default value is zero. Is this the intended behavior? Quoting KEP 9 - Capacity Scheduling: "Max is infinite by default, min is 0 by default", so I was expecting the plugin to threat the max field as "infinite" when the custom resource does not specify it.

Having the max field with "infinite" as the default value would be helpful in those cases where someone needs to define just the minimum resources that need to be guaranteed to a namespace, without specifying any upper limit constraint. In such a case, I would like to create the ElasticQuota resource as follows, without specifying any value for the max field:

apiVersion: scheduling.sigs.k8s.io/v1alpha1
kind: ElasticQuota
metadata:
  name: quota1
  namespace: quota1
spec:
   min:
    cpu: 4

#424 (comment)

@k8s-triage-robot
Copy link

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 2, 2023
@k8s-triage-robot
Copy link

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

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

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

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 1, 2023
@Gekko0114
Copy link
Member

I agree with this issue.

When I create ElasticQuota like this,

apiVersion: scheduling.sigs.k8s.io/v1alpha1
kind: ElasticQuota
metadata:
  name: test
  namespace: test
spec:
  max:
    cpu: 10
    nvidia.com/gpu: 1

and create pod having this resource,

cpu: 10
memory: 1
nvidia.com/gpu: 1

then max of this ElasticQuota is calculated like this(same as min).

spec:
  max:
    cpu: 10
    memory: 0
    nvidia.com/gpu: 1

I guess this is unintended behavior.
Can I fix this issue?

@Huang-Wei
Copy link
Contributor

@denkensk would you like to shed some light here? I suppose if the KEP says "not specifying max is infinite", we should honor that in the impl.

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Feb 14, 2023
@Gekko0114
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants