-
Notifications
You must be signed in to change notification settings - Fork 226
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
CPU/Memory Limits and Resources are not being set in namespaces #90
Comments
@jamiebuxxx , the rancher project |
No, the projects do not have CPU/Memory resources and limits defined. And I don't see anything assigned in the GUI. Those are only defined in the namespace using the Terraform plugin. This would be the preferred method as different namespaces can have different resource needs but still be under the same project. |
Project CPU/Memory resources and limits should be defined before you can define CPU/Memory resources and limits for namespaces assigned to that project. Once project CPU/Memory resources and limits are defined you'll see namespace CPU/Memory resources and limits on the rancher UI. Something lik that,
|
Interesting. I remember discussing this issue before. Cause whatever you allocate to the project resource/limits, then the namespace can not allocate over that value. I can see the logic of this concept, but this won't be ideal for our setup. It will be difficult for us to allocate resources/limits to a project without know how many namespaces will be under a project. This could cause a newly created namespaces to not have limits because the project budget ran out. We saw this a while back with initial Rancher 2 testing. So then this leads me to another question, why can set the resource/limits of a namespace under a project from the Web UI, but not from this provider? Considering that its extending the Rancher2 API
|
A rancher project is a group of namespaces, then no namespace within a project can't allocate more that project resource/limits.
I got your point, but you'd have same problem on k8s cluster sizing. If you set resource limits on your namespace (good practice), this could cause that newly created namespaces could not get them because k8s cluster don't have enough free resources. I guess that at some point you are going to scale the k8s cluster, you could do the same with the project resource/limits. When you set project resouce/limits and default namespaces resouce/limits, you have an estimation of how many namespaces may fit on it.
You can't set namespace resource/limits from the UI as you can't from this provider. Your screenshot is showing other feature |
Ok. Going to let this soak for bit. I would like to avoid breaking away to far from Kubernetes specific derivatives like request, limits, max/min limits. Adding the project resource element is how to think about our clusters. I think we will need to come up with use cases to try and different ways to handle namespaces and projects for our uses. |
Yeah, it's depending of the offering use case, clusters or projects in shared clusters. Please, reopen issue if needed. |
Hello,
While doing some finalizing of our Rancher2 terraform stack, we discovered the CPU/Memory resources and limits are not being set in the namespaces. Here's an example of namespace terraform resource.
When we then describe the namespace we see that previous values are only store under the
field.cattle.io/resourceQuota
annotations, but not under theResources Limits
orResources Quota
Also, these changes are not show up in the Rancher2 UI either.
I can confirm that setting the resource quotas and limits using the normal
kubectl
derivatives works as expected.The text was updated successfully, but these errors were encountered: