-
Notifications
You must be signed in to change notification settings - Fork 113
Simple way to know HierarchicalResourceQuota status #274
Comments
/kind feature |
/assign @mochizuki875 |
I tried using JsonPath with So I propose a new sub-command of
For Example
|
@adrianludwin |
hii spec:
versions:
- name: v1alpha2
additionalPrinterColumns:
- description: blah blah
jsonPath: .status.hard
name: Hard
type: string
- description: blah blah
jsonPath: .status.used
name: Used
type: string |
@zfrhv $ kubectl get hierarchicalresourcequotas.hnc.x-k8s.io -n test
NAME HARD USED
test-hrq {"limits.cpu":"2","limits.memory":"500Mi","requests.cpu":"1","requests.memory":"200Mi"} {"limits.cpu":"500m","limits.memory":"100Mi","requests.cpu":"500m","requests.memory":"100Mi"} However, I don't know how to display exactly output as the ResourceQuota...(said here) If it needed, I'll add this:) |
Sorry I didn't respond on the bug, but the PR looks fantastic and I've approved it. Can you please cherry-pick it to v1.1 as well? Thanks! |
I wouldn't worry too much about making this exactly like the RQ output. For now, it's human output, and machines can use the json representation. |
@adrianludwin |
@mochizuki875: Closing this issue. In response to this:
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/test-infra repository. |
Overview
When using
HierarchicalResourceQuota
, resource quotas is applied across parent and childNamespaces
.However, there is no way to know the quota and consumption of resource in the
HierarchicalResourceQuota
other than check the detail.This may confuse users, so I think there should be a simple way to know it(like
kubectl get resourcequotas
).Detail
For example, there are two
Namespaces
with hierarchy like this.If
HierarchicalResourceQuota
oflimits.cpu=1
is applied to the parent testNamespace
, the total amount of CPU available across parent and childNamespaces
is 1.Now, the result of
kubectl get hierarchicalresourcequotas
is this.We can't know the quota and consumption of resource.
To know that, we need to check the detail of
HierarchicalResourceQuota
.In this case, the total CPU concumption across parent and child
Namespace
is 500m/1.In addition, if we check the
ResourceQuota
of eachNamespace
that are automatically created in eachNamespace
when we createHierarchicalResourceQuota
, the result is this.These status do not fully reflect quotas by
HierarchicalResourceQuota
.In this case, it looks like this:
However, the actual available CPU is 500m across these
Namespaces
.Expectation
I think there should be a simple way to know
HierarchicalResourceQuota
status like this.The text was updated successfully, but these errors were encountered: