Commit Graph

1038 Commits

Author SHA1 Message Date
vinay kulkarni
d011cc4d87 Fix up after rebasing on top of dedup pod resource req calculation PR 2023-03-10 15:21:56 +00:00
Todd Neal
4096c9209c dedupe pod resource request calculation 2023-03-09 17:15:53 -06:00
Vinay Kulkarni
76962b0fa7 In-place Pod Vertical Scaling - API changes
1. Define ContainerResizePolicy and add it to Container struct.
 2. Add ResourcesAllocated and Resources fields to ContainerStatus struct.
 3. Define ResourcesResizeStatus and add it to PodStatus struct.
 4. Add InPlacePodVerticalScaling feature gate and drop disabled fields.
 5. ResizePolicy validation & defaulting and Resources mutability for CPU/Memory.
 6. Various fixes from code review feedback (originally committed on Apr 12, 2022)
KEP: /enhancements/keps/sig-node/1287-in-place-update-pod-resources
2023-02-24 17:18:04 +00:00
Tim Hockin
d0e2b06850
ServiceExternalTrafficPolicyType: s/Type//
Rename ServiceExternalTrafficPolicyType => ServiceExternalTrafficPolicy
2022-12-11 13:48:27 -08:00
Dipankar Das
54ddcdce21
Code Refactoring of Pod under pkg/api (#112085)
* Code Refactoring

- added some function comments
- spelling errors

Signed-off-by: Dipankar Das <dipankardas0115@gmail.com>

* Some typo fix in resource under pkg/api/v1

Signed-off-by: Dipankar Das <dipankardas0115@gmail.com>

* Grammer corrections in api/v1/pod

Signed-off-by: Dipankar Das <dipankardas0115@gmail.com>

* Function description changes in pkg/api/v1

- pod
- resource

Signed-off-by: Dipankar Das <dipankardas0115@gmail.com>

Signed-off-by: Dipankar Das <dipankardas0115@gmail.com>
2022-09-26 09:20:08 -07: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
Lee Verberne
d238e67ba6 Remove EphemeralContainers feature-gate checks 2022-07-26 02:55:30 +02:00
0xff-dev
729bd22e24 clean up unused function 'GetServiceHealthCheckPathPort' 2022-07-06 16:15:14 +08:00
21kyu
df168d5b5c Change reflect.Ptr to reflect.Pointer 2022-06-26 01:23:43 +09:00
David Porter
7811d84fef kubelet: Mark ready condition as false explicitly for terminal pods
Terminal pods may continue to report a ready condition of true because
there is a delay in reconciling the ready condition of the containers
from the runtime with the pod status. It should be invalid for kubelet
to report a terminal phase with a true ready condition. To fix the
issue, explicitly override the ready condition to false for terminal
pods during status updates.

Signed-off-by: David Porter <david@porter.me>
2022-06-08 16:19:16 -07:00
Antonio Ojea
d16d23e0c7 add pod util to verify pod is terminal
pods on phase succeeded or failed are guaranteed to have all containers
stopped and to not ever regress
2022-05-27 06:42:39 +02:00
Humble Chirammal
c74b393771 csi: add nodeExpandSecret support for CSI client
CSI spec 1.5 enhanced the spec to add optional secrets field to
NodeExpandVolumeRequest. This commit adds NodeExpandSecret to the
CSI PV source and also derive the expansion secret in csiclient to
send it out as part of the nodeexpand request.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2022-04-05 11:36:23 +08:00
zhucan
eb2ebddf61 fix: add unit test
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2022-04-05 11:35:14 +08:00
Tim Hockin
30c1523708 kube-proxy: Renames for readability 2022-03-30 09:55:32 -07:00
Paco Xu
acd696266e mark PodOverhead to GA in v1.24; remove in v1.26 2022-03-17 09:30:14 +08:00
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:29 -05:00
Davanum Srinivas
497e9c1971
Cleanup OWNERS files (No Activity in the last year)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-15 10:34:02 -05:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05: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
Lee Verberne
83a4ec90ae Always set feature gates for ContainerVisitor test
This fixes a bug where the test was dependent on the current set of
feature gates. Since AllFeatureEnabledContainers() depends on the
feature gates it must be evaluated after the test case is initialized.
2021-10-19 08:47:57 -04:00
Monis Khan
91241eac9b
Prune stale entries from OWNERS files
Signed-off-by: Monis Khan <mok@vmware.com>
2021-04-13 20:54:50 -04:00
Fangyuan Li
7ed2f1d94d Implements Service Internal Traffic Policy
1. Add API definitions;
2. Add feature gate and drops the field when feature gate is not on;
3. Set default values for the field;
4. Add API Validation
5. add kube-proxy iptables and ipvs implementations
6. add tests
2021-03-07 16:52:59 -08:00
Clayton Coleman
6bac5019aa
podutil: Use parenthesis for clarity around the pod ready condition
While this is correct in order of operations, it is harder to read
and masks the intent of the user without the parenthesis.
2021-03-01 13:21:01 -05:00
Kubernetes Prow Robot
5498ee641b
Merge pull request #99561 from BenTheElder/remove-bazel
Remove Bazel
2021-03-01 09:55:27 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Jordan Liggitt
ec4d1b3821 Skip visiting empty secret and configmap names 2021-02-27 15:54:38 -05:00
Nikhita Raghunath
6cef3a4e33 *: remove nikhiljindal from OWNERS 2021-02-16 10:59:26 +05:30
Nikhita Raghunath
6b12c96a9b *: remove madhusudancs from reviewers 2021-02-16 10:59:26 +05:30
Nikhita Raghunath
b11516d69f *: move gmarek to emeritus_approvers 2021-02-16 10:59:19 +05:30
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
Jan Chaloupka
274c536da3 Removing GetPodPriority from pkg/api and importing PodPriority from k8s.io/component-helpers 2020-10-11 21:40:11 +02:00
Benjamin Elder
2abc8afece eparis to emeritus 2020-06-30 09:50:44 -07:00
Benjamin Elder
960ef085e9 zmerlynn to emeritus 2020-06-30 09:43:59 -07:00
Shihang Zhang
b56da85a77 sync api/v1/pod/util with api/pod/util and remove DefaultContainers 2020-03-24 16:42:32 -07:00
Eric Ernst
991909fdfb PodOverhead: remove feature gate override in tests
PodOverhead is now a beta feature and set to true by default. No need to
override to true during testing.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2020-02-27 17:27:06 +00:00
Bob Killen
03082531cc
Prune inactive owners from api-approver owned OWNERS files. 2019-10-13 08:54:18 -04:00
Harsh Singh
6a9ef7f04f Move GetPodPriority from /scheduler/util to /api/pod 2019-09-24 22:02:13 +05:30
Robert Bailey
9d211ab352 Remove myself from reviewers across the repo so that PRs are no
longer assigned to me by blunderbuss.

Move myself to be an emeritus approver for the cluster directory.
2019-08-27 16:10:16 -07: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
f137a9cdb9 resource: cleanup helpers_test.go
No test content changes - just improvements for readability

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-08-13 16:23:28 -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
Kubernetes Prow Robot
bf2dd03083
Merge pull request #80318 from davidxia/fix-err-caps
cleanup: fix some log and error capitalizations
2019-07-25 10:41:28 -07:00
Lee Verberne
4a753c7a44 Generated code for ephemeral containers API 2019-07-22 11:19:22 +00:00
Lee Verberne
013f049ce0 Add Ephemeral Containers to the Kubernetes core API 2019-07-22 11:19:22 +00: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
Kubernetes Prow Robot
4a1f71076b
Merge pull request #78627 from tedyu/resource-req
Check the correct value of Quantity for non-v1.ResourceCPU resource in GetResourceRequest
2019-07-02 11:11:12 -07:00