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

"No resource limits." message for namespaces should be improved and made more clear. #78918

Open
RochesterinNYC opened this issue Jun 11, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@RochesterinNYC
Copy link

commented Jun 11, 2019

What would you like to be added:

If I have a Namespace that has a ResourceQuota resource and I describe the namespace, I see that CPU and Memory limits/requests are present for the namespace, but a confusing "No resource limits." message is present at the bottom.

Ex.

$ kubectl describe namespace testnamespace
Name:         testnamespace
Labels:       enhancer=enabled
Annotations:  kubectl.kubernetes.io/last-applied-configuration:
                {"apiVersion":"v1","kind":"Namespace","metadata":[...]}
Status:       Active

Resource Quotas
 Name:            compute-resources
 Resource         Used         Hard
 --------         ---          ---
 limits.cpu       16           48
 limits.memory    17619739Ki   180Gi
 requests.cpu     8375m       24
 requests.memory  10774612736  90Gi

No resource limits.

I would like to see this "No resource limits." message replaced with something that makes it more clear to the user what is missing or not in use (since it's not apparently cpu or memory limits).

From poking around the source code, the message stems from https://github.com/kubernetes/kubernetes/blame/master/pkg/kubectl/describe/versioned/describe.go#L475 and seems to be intended to describe whether a LimitRange resource is present or not. But from how it reads, it seems to be very vague and a user could easily assume that it refers to cpu and memory for the namespace instead.

Why is this needed:

Users using kubectl to inspect their namespace can be easily confused and either think that their namespace is missing a ResourceQuota or that conflicting information about CPU and memory resource limits for the namespace is being presented.

@RochesterinNYC

This comment has been minimized.

Copy link
Author

commented Jun 11, 2019

/sig cli

@k8s-ci-robot k8s-ci-robot added sig/cli and removed needs-sig labels Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.