Commit Graph

25 Commits

Author SHA1 Message Date
Todd Neal
4096c9209c dedupe pod resource request calculation 2023-03-09 17:15:53 -06:00
Sergey Kanzhelev
ad7199a9da remove podOverhead feature gate as a feature is now GA since 1.24 2022-09-19 19:25:16 +00:00
jinxu
0064010cdd Promote Local storage capacity isolation feature to GA
This change is to promote local storage capacity isolation feature to GA

At the same time, to allow rootless system disable this feature due to
unable to get root fs, this change introduced a new kubelet config
"localStorageCapacityIsolation". By default it is set to true. For
rootless systems, they can set this configuration to false to disable
the feature. Once it is set, user cannot set ephemeral-storage
request/limit because capacity and allocatable will not be set.

Change-Id: I48a52e737c6a09e9131454db6ad31247b56c000a
2022-08-02 23:45:48 -07:00
Paco Xu
acd696266e mark PodOverhead to GA in v1.24; remove in v1.26 2022-03-17 09:30:14 +08:00
Eric Ernst
ac88cd7691 helpers: refactor and expose function for sum of container req/limits
Currently we only care about the sum of sandbox resources, which
includes a pod overhead if defined. We have a need for also calculating
*just* the sum of container requests/limits for CPU / Memory, so let's
do a refactor and expose this new helper function.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-10-20 11:30:23 -07:00
Clayton Coleman
264496cc41
scheduler: Implement resource metrics at /metrics/resources
Implement pod resource metrics as described in KEP 1916. The new
`/metrics/resources` endpoint is exposed on the active scheduler
and reports kube_pod_resources* metrics that present the effective
requests and limits for all resources on the pods as calculated by
the scheduler and kubelet. This allows administrators using the
system to quickly perform resource consumption, reservation, and
pending utilization calculations when those metrics are read.
Because metrics calculation is on-demand, there is no additional
resource consumption incurred by the scheduler unless the endpoint
is scraped.
2020-11-12 12:37:38 -05:00
Derek Carr
45bd6cb186 Downward API hugepages 2020-11-10 16:09:13 -05:00
Kubernetes Prow Robot
6b47754740
Merge pull request #81627 from tallclair/copy
Delete duplicate resource.Quantity.Copy()
2019-08-22 11:13:13 -07:00
Eric Ernst
80ee072b85 pod-overhead: utilize pod overhead for cgroup sizing, eviction handling
Pod and burstable QoS cgroups should take overhead of running a sandbox
into account if the PodOverhead feature is enabled. These helper
functions are utilized by Kubelet for sizing the pod and burstable QoS
cgroups.

Pod overhead is added to resource requests, regardless of the initial
request values. A particular resource pod overhead is only added to a
resource limit if a non-zero limit already existed.

This commit updates eviction handling to also take Pod Overhead into
account (if the feature is enabled).

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-08-19 17:40:47 -07:00
Tim Allclair
49f50484b8 Delete duplicate resource.Quantity.Copy() 2019-08-19 17:23:14 -07:00
Eric Ernst
9d2d37be27 resource: modify resource helpers for better reuse
Update GetResoureqRequest function to utilize a new helper,
GetResourceRequestQuantity. This logic was duplicated in a couple of
areas in the K/K codebase, so consolidating for better test coverage.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-08-13 16:23:28 -07:00
David Xia
fabfd950b1
cleanup: fix some log and error capitalizations
Part of https://github.com/kubernetes/kubernetes/issues/15863
2019-07-20 18:26:16 -04:00
Ted Yu
2dca643ca1 Check the correct value of Quantity in GetResourceRequest 2019-07-01 06:45:28 +08:00
yuchengwu
6bcb7d5130 Fix initContainer failed to get its own field value as env values 2019-05-15 13:45:50 +08:00
Prasad Ghangal
3fba36291c pkg/api: Fix golint errors 2018-09-07 12:31:25 +05:30
yanxuean
efca28f8a5 remove deplicate code for PodRequestsAndLimits
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2018-08-18 09:22:28 +08:00
NickrenREN
d379a9a3ff Add downward_api e2e test for LocalStorageCapacityIsolation feature 2017-11-04 12:50:34 +08:00
Dr. Stefan Schimanski
509df603b1 apimachinery: mechanical removal of ObjectCopier plumbing 2017-10-06 19:21:03 +02:00
Dr. Stefan Schimanski
362439db64 pkg/api: simplify deepcopy calls 2017-08-29 20:04:05 +02:00
NickrenREN
194418986f Add local storage to downwards API 2017-08-26 11:58:21 +08:00
Xing Zhou
37f9e13025 Remove useless error 2017-07-03 14:59:54 +08:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Chao Xu
3fa7b7824a easy changes 2017-04-27 09:41:53 -07:00
Chao Xu
4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00