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

Create ResourceQuota request resource more than limit resource, is it normal? #130743

Open
lengrongfu opened this issue Mar 12, 2025 · 5 comments · May be fixed by #130780
Open

Create ResourceQuota request resource more than limit resource, is it normal? #130743

lengrongfu opened this issue Mar 12, 2025 · 5 comments · May be fixed by #130780
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/apps Categorizes an issue or PR as relevant to SIG Apps.

Comments

@lengrongfu
Copy link
Member

What happened?

I can create this ResourceQuota, it cpu request more than limits.

apiVersion: v1
kind: ResourceQuota
metadata:
  creationTimestamp: "2025-03-12T09:26:12Z"
  name: quota-test
  namespace: test
  resourceVersion: "654584334"
  uid: b41e9dce-5228-48bf-98d0-ab3980ab56a2
spec:
  hard:
    limits.cpu: "1"
    requests.cpu: "10"

What did you expect to happen?

We can in the webhook to check this value, prevent request value more than limit.

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

kubectl create -f

apiVersion: v1
kind: ResourceQuota
metadata:
  name: quota-test
spec:
  hard:
    limits.cpu: "1"
    requests.cpu: "10"

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
Client Version: v1.30.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.5
WARNING: version difference between client (1.30) and server (1.27) exceeds the supported minor version skew of +/-1

Cloud provider

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

@lengrongfu lengrongfu added the kind/bug Categorizes issue or PR as related to a bug. label Mar 12, 2025
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 12, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@lengrongfu
Copy link
Member Author

/sig apps
/wg apps

@k8s-ci-robot
Copy link
Contributor

@lengrongfu: The label(s) wg/apps cannot be applied, because the repository doesn't have them.

In response to this:

/sig apps
/wg apps

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 12, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in SIG Apps Mar 12, 2025
@lengrongfu
Copy link
Member Author

/assign

If this is the problem, I can fix it.

@googs1025
Copy link
Member

What did you expect to happen?
We can in the webhook to check this value, prevent request value more than limit.

maybe we should check it during validation? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/apps Categorizes an issue or PR as relevant to SIG Apps.
Projects
Status: Needs Triage
Development

Successfully merging a pull request may close this issue.

3 participants