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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource quotas and default resource request/limit support for projects/namespaces #162

Closed
lilianzhu opened this issue Aug 9, 2021 · 8 comments

Comments

@lilianzhu
Copy link
Collaborator

/kind feature

Thanks @hoozecn for the advice #156 . Welcome to contribute PR for this issue 馃槉

Is your feature request related to a problem? Please describe.

If your namespace has a resource quota, it is helpful to have a default value in place for memory limit and cpu limit.

Describe the feature you'd like

The k8s resource limit and request quota can be configured via the Zadig UI.

@27149chen 27149chen changed the title Support custom k8s resource limit and request quota configuration for projects/namespace Resource quotas and default resource request/ limit support for projects/namespaces Aug 9, 2021
@27149chen 27149chen changed the title Resource quotas and default resource request/ limit support for projects/namespaces Resource quotas and default resource request/limit support for projects/namespaces Aug 9, 2021
@fengzixu
Copy link
Contributor

/assign @fengzixu

@fengzixu
Copy link
Contributor

Hi @lilianzhu @27149chen , could you give me more info about "projects" concept in the issue title? How should I understand project? Is it same with namespace?

@fengzixu
Copy link
Contributor

I looked though the original PR, I found the issue it mentioned is about "how to set the default resource request & limit correctly for pod under the specific namespace". In that case, Rangelimiter should be a correct and native solution.

But, from the description of this issue, I found Zadig guys would like to implement ^ above features, but needs to consider the resource quota of namespace. Is it dynamical adjustment of default resource requests & limit feature based on resource quota?

Any rule your guys expected? For example

  1. if resource quota of namespace-A is: request.cpu is 1/ request.mem is 1Gi. In that case, our Rangelimit should set default cpu/mem request as 100mCPU/100Mi MEM ( around 1/10 ratio)

@fengzixu
Copy link
Contributor

I hope I can get much more info about expectation on this feature. Currently, I found zadig is using the hard-code way to set resource settings. If you can tell me the reason why your guys specify the current constant value, we may discuss the strategy

@fengzixu
Copy link
Contributor

maybe #730 is duplicated issue? Anyway, I am looking forward to listen what zadig guys think about this feature

@flyer103
Copy link
Contributor

info

This document has a complete description of the project: link

The integrated environment in Zadig corresponds to the namespace in K8s.

@flyer103
Copy link
Contributor

@fengzixu Sorry for the confusion.
What this issue wants to express is to use K8s' LimitRange to manage the default resource configuration, but Zadig should not modify the behavior of users deploying applications, so we have decided to remove https://github.com/koderover/zadig/blob/aa39e56cd0fac4468cb3511b438a718b2966b5f3/pkg/microservice/aslan /core/environment/service/environment.go#L2069. Zadig shouldn't configure default resources at any level.

@flyer103
Copy link
Contributor

We will follow up in #730 and will close the issue.

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

No branches or pull requests

3 participants