profile
viewpoint
Kumar Kaushik kaushik229 Apple Inc. Cupertino, CA

kaushik229/docker 0

Docker - the open-source application container engine

kaushik229/etcd 0

Distributed reliable key-value store for the most critical data of a distributed system

kaushik229/photon 0

Kaushik Fork Repo

kaushik229/tech-interview-handbook 0

💯 Algorithms study materials, behavioral content and tips for rocking your coding interview

kaushik229/website 0

Kubernetes website and documentation repo:

pull request commentkubernetes/website

Limited resources in quota when scoped for priority class

@sftim

kaushik229

comment created time in 2 months

pull request commentkubernetes/website

Limited resources in quota when scoped for priority class.

Sorry I deleted my fork. I opened another PR for the same. https://github.com/kubernetes/website/pull/23795

kaushik229

comment created time in 2 months

pull request commentkubernetes/website

Limited resources in quota when scoped for priority class.

Sorry I deleted my fork. I opened another PR for the same. https://github.com/kubernetes/website/pull/23795

kaushik229

comment created time in 2 months

PR opened kubernetes/website

Limited resources in quota when scoped for priority class

This PR brings in documentation around small but important limitation of resource quota object scoped for priority class. When quota object is created for priority class, we only enforce limited set of resources. This PR lists those resources.

If quota object is created with priority class scope, k8s has no validation around allowed resources. Eventually the quota object gets created but resources not in the above list will never be enforced and counted towards usage.

Github issue: https://github.com/kubernetes/website/issues/23626

+13 -0

0 comment

1 changed file

pr created time in 2 months

push eventkaushik229/website

Kumar Kaushik

commit sha acbaf2577a9ab4711612ab750af0109926136f65

Limited resources in quota when scoped for priority class

view details

push time in 2 months

fork kaushik229/website

Kubernetes website and documentation repo:

https://kubernetes.io

fork in 2 months

push eventkaushik229/website

push time in 2 months

PR closed kubernetes/website

Reviewers
Limited resources in quota when scoped for priority class. cncf-cla: yes language/en lgtm sig/docs size/S

This PR brings in documentation around small but important limitation of resource quota object scoped for priority class. When quota object is created for priority class, we only enforce limited set of resources. This PR lists those resources.

If quota object is created with priority class scope, k8s has no validation around allowed resources. Eventually the quota object gets created but resources not in the above list will never be enforced and counted towards usage.

Github issue: https://github.com/kubernetes/website/issues/23626

+13 -0

5 comments

1 changed file

kaushik229

pr closed time in 2 months

PR opened kubernetes/website

Limited resources in quota when scoped for priority class.

This PR brings in documentation around small but important limitation of resource quota object scoped for priority class. When quota object is created for priority class, we only enforce limited set of resources. This PR lists those resources.

If quota object is created with priority class scope, k8s has no validation around allowed resources. Eventually the quota object gets created but resources not in the above list will never be enforced and counted towards usage.

Github issue: https://github.com/kubernetes/website/issues/23626

+13 -0

0 comment

1 changed file

pr created time in 2 months

push eventkaushik229/website

Kumar Kaushik

commit sha bc4a4f115903af4f0f9ea8c72d8feeec0ae86e6b

Limited resources in quota when scoped for priority class

view details

push time in 2 months

fork kaushik229/website

Kubernetes website and documentation repo:

https://kubernetes.io

fork in 2 months

issue openedkubernetes/website

Limited resource list enforcement for resource quota scoped for priority class.

Problem: When resource quota is created scoped for priority class, only subset of resource list are enforced and counted towards usage. We must make sure list and document all such resources so that users have better understanding of resource quota. For details of which fields are supported, please refer. https://github.com/kubernetes/kubernetes/blob/17aa60686ebe5fd04b4fe6f442dc36a8d70b6730/pkg/quota/v1/evaluator/core/pods.go#L44 Proposed Solution: Please update resource quota document to reflect the same.

Page to Update: https://kubernetes.io/docs/concepts/policy/resource-quotas/#resource-quota-per-priorityclass

<!--Kubernetes Version:--> All versions supporting resource quota for priority class.

created time in 2 months

issue openedkubernetes/kubectl

Add validation in container spec for resource quantity suffix.

What happened: The suffix allowed to denote resource quantity for resource reservation in container spec has options to specify units. However if use wrong suffix for resource, if might result resource to go in bad state. We need to be careful about using the right suffix for right resource. For example, if we specify suffix m for storage resource, there is no validation at the client side and this get processed by api-server and later messes with quota calculation logic, ultimately resulting blocking update on quota object(status) forever due to bad value of resource quantity.

What you expected to happen: Bad request should be rejected at client with proper error message. Add validation of resource suffix. For example, storage can only have Mi, Gi or Ti suffix. CPU can have m (milli) unit. etc.

How to reproduce it (as minimally and precisely as possible):

  1. Create a resource quota object in namespace with storage limits enforced.
  2. Mention following in container spec.
spec:
    resources:
      requests:
        storage: 10m

As there is no validation currently, we will be able to launch the deployment with above spec. However after some time, the quota object will not be able to update status. We see following error message.

ResourceQuota "<quota-object-name>" is invalid: status.used[xxxxxx.storageclass.storage.k8s.io/requests.storage]: Invalid value: resource.Quantity{i:resource.int64Amount{value:<large integer value>, scale:-3}, d:resource.infDecAmount{Dec:(*inf.Dec)(nil)}, s:"<large integer value>m", Format:"DecimalSI"}: must be an integer

Anything else we need to know?: No

Environment:

  • Kubernetes client and server versions (use kubectl version): Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3",
  • Cloud provider or hardware configuration: N/A
  • OS (e.g: cat /etc/os-release): Darwin(client)

created time in 2 months

more