Commit Graph

9577 Commits

Author SHA1 Message Date
Patrick Ohly
1e26115df5 consider ephemeral volumes for host path and node limits check
When adding the ephemeral volume feature, the special case for
PersistentVolumeClaim volume sources in kubelet's host path and node
limits checks was overlooked. An ephemeral volume source is another
way of referencing a claim and has to be treated the same way.
2021-10-01 17:03:44 +02:00
Khaled Henidak (Kal)
a53e2eaeab
move IPv6DualStack feature to stable. (#104691)
* kube-proxy

* endpoints controller

* app: kube-controller-manager

* app: cloud-controller-manager

* kubelet

* app: api-server

* node utils + registry/strategy

* api: validation (comment removal)

* api:pod strategy (util pkg)

* api: docs

* core: integration testing

* kubeadm: change feature gate to GA

* service registry and rest stack

* move feature to GA

* generated
2021-09-24 16:30:22 -07:00
Kubernetes Prow Robot
2541fcf256
Merge pull request #104123 from fromanirh/podresources-not-report-unhealthy-devices
devicemanager: skip unhealthy devices in GetAllocatable
2021-09-23 05:39:21 -07:00
Francesco Romani
1b6efa5e21 devicemanager: skip unhealthy devs in GetAllocatable
The GetAllocatableDevices, needed to support the podresources
API, doesn't take into account the device health when computing
its output.

In this PR we address this gap and add unit tests along the way
to prevent regressions. This gives us a good initial coverage,
E2E tests to cover this case are much harder to write, because
we would need to inject faults to trigger the unhealthy status.
We will evaluate if adding these tests into later PRs.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-09-22 19:20:04 +02:00
Kubernetes Prow Robot
7c71e06cd1
Merge pull request #104959 from calvin0327/issue-test-dataRace
fix the test issue of node shutdown manager
2021-09-21 11:56:30 -07:00
Kubernetes Prow Robot
44d4d007bf
Merge pull request #103424 from 249043822/br-cadvisor-perf
Optimize kubelet stats provider for perfomace bottleneck
2021-09-21 11:56:18 -07:00
Kubernetes Prow Robot
353f0a5eab
Merge pull request #105095 from wojtek-t/migrate_clock_3
Unify towards k8s.io/utils/clock - part 3
2021-09-20 12:46:45 -07:00
Kubernetes Prow Robot
0d20f47c7a
Merge pull request #105090 from saad-ali/removeSubpathFeaturegate
Remove VolumeSubpath feature gate
2021-09-17 15:52:07 -07:00
wojtekt
d9b08c611d Migrate to k8s.io/utils/clock 2021-09-17 15:19:08 +02:00
Kubernetes Prow Robot
cb2ea4bf7c
Merge pull request #101161 from rikatz/move-sysctl-util
Move node and networking related helpers from pkg/util to component helpers
2021-09-17 02:11:00 -07:00
saad-ali
beb17fe10b Remove VolumeSubpath feature gate
Remove the VolumeSubpath feature gate.

Feature gate convention has been updated since this was introduced to
indicate that they "are intended to be deprecated and removed after a
feature becomes GA or is dropped.".
2021-09-17 01:59:23 -07:00
Ricardo Pchevuzinske Katz
37d11bcdaf Move node and networking related helpers from pkg/util to component helpers
Signed-off-by: Ricardo Katz <rkatz@vmware.com>
2021-09-16 17:00:19 -03:00
Clayton Coleman
d5719800bf
kubelet: Handle UID reuse in pod worker
If a pod is killed (no longer wanted) and then a subsequent create/
add/update event is seen in the pod worker, assume that a pod UID
was reused (as it could be in static pods) and have the next
SyncKnownPods after the pod terminates remove the worker history so
that the config loop can restart the static pod, as well as return
to the caller the fact that this termination was not final.

The housekeeping loop then reconciles the desired state of the Kubelet
(pods in pod manager that are not in a terminal state, i.e. admitted
pods) with the pod worker by resubmitting those pods. This adds a
small amount of latency (2s) when a pod UID is reused and the pod
is terminated and restarted.
2021-09-15 14:02:00 -04:00
Kubernetes Prow Robot
fa2657b8b2
Merge pull request #104624 from Haleygo/support-null-resolvConf-in-configFile
When resolvConf is "" in kubelet configuration, pod will be created with wrong dns policy
2021-09-14 14:18:59 -07:00
Haleygo
46454ea9dc support null resolvConf in Kubelet Configuration 2021-09-14 16:12:52 +08:00
Kubernetes Prow Robot
047a6b9f86
Merge pull request #104874 from wojtek-t/migrate_clock_1
Unify towards k8s.io/utils/clock - part 1
2021-09-13 19:09:20 -07:00
Kubernetes Prow Robot
c79f7c1add
Merge pull request #104711 from claudiubelu/update-pause-3.6
update pause image references to use 3.6
2021-09-13 19:09:08 -07:00
Kubernetes Prow Robot
0e2acbe9a8
Merge pull request #104794 from wzshiming/fix/kubelet-cm-kv-pair
pkg/kubelet/cm/memorymanager: Fix ErrorS key/value pair
2021-09-13 15:44:04 -07:00
calvin0327
db82e282fc fix the test issue of data race to node shutdown manager 2021-09-13 18:12:19 +08:00
wojtekt
53ce79a18a Migrate to k8s.io/utils/clock in pkg/kubelet 2021-09-10 12:20:09 +02:00
Kubernetes Prow Robot
1dcea5cb02
Merge pull request #104817 from smarterclayton/pod_status
kubelet: Rejected pods should be filtered from admission
2021-09-09 22:15:59 -07:00
Kubernetes Prow Robot
5724484bda
Merge pull request #104069 from pacoxu/fix-data-race-104057
fix data race in kubelet volume test: add lock for ut
2021-09-09 21:09:59 -07:00
Clayton Coleman
17d32ed0b8
kubelet: Rejected pods should be filtered from admission
A pod that has been rejected by admission will have status manager
set the phase to Failed locally, which make take some time to
propagate to the apiserver. The rejected pod will be included in
admission until the apiserver propagates the change back, which
was an unintended regression when checking pod worker state as
authoritative.

A pod that is terminal in the API may still be consuming resources
on the system, so it should still be included in admission.
2021-09-08 10:23:45 -04:00
Shiming Zhang
7706d3d281 pkg/kubelet/cm/memorymanager: Fix ErrorS key/value pair 2021-09-06 17:37:04 +08:00
vikram Jadhav
c10c92bda9 changes made by introducing mockgen command 2021-09-03 17:40:11 +00:00
Vikram Jadhav
5f674101bb Added update and verify scripts for automated mock generation 2021-09-03 17:40:11 +00:00
Kubernetes Prow Robot
0b4a793da2
Merge pull request #103941 from saschagrunert/seccomp-profile-root
Remove deprecated `--seccomp-profile-root`/`seccompProfileRoot` config
2021-09-02 08:52:57 -07:00
paco
ab055e9ba4 fix data race in kubelet volume test: add lock
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
Co-authored-by: Jian Zeng <zengjian.zj@bytedance.com>
2021-09-01 16:13:55 +08:00
Sascha Grunert
46077e6be7
Remove deprecated --seccomp-profile-root/seccompProfileRoot configuration
The configuration is deprecated and targets removal for v1.23. Tests
cases have been changed as well.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-08-31 09:55:28 +02:00
Kubernetes Prow Robot
bbbeceb6aa
Merge pull request #104577 from smarterclayton/smaller_filter_master
kubelet: Admission must exclude completed pods and avoid races
2021-08-30 13:17:13 -07:00
Claudiu Belu
18936d4785 updates pause image references
The pause:3.6 image has been published.

Also updates older / incorrect references.
2021-08-29 21:50:05 -07:00
Kubernetes Prow Robot
c262d09bb7
Merge pull request #104604 from wojtek-t/fix_secret_manager_2
Don't prematurely close reflectors in case of slow initialization in watch based manager
2021-08-26 06:11:23 -07:00
wojtekt
515106b795 Don't prematurely close reflectors in case of slow initialization in watch based manager 2021-08-26 11:34:24 +02:00
Kubernetes Prow Robot
cbd0611d49
Merge pull request #104528 from kolyshkin/runc-1.0.2
vendor: bump runc to 1.0.2
2021-08-25 18:17:23 -07:00
Kubernetes Prow Robot
2f6b9166d7
Merge pull request #104039 from YanzhaoLi/extract-containerdid-from-various-cgrouppath
Get containerID from systemd-style cgroupPath in cri_stats_provider
2021-08-25 17:05:22 -07:00
Clayton Coleman
a2ca66d280
kubelet: Admission must exclude completed pods and avoid races
Fixes two issues with how the pod worker refactor calculated the
pods that admission could see (GetActivePods() and
filterOutTerminatedPods())

First, completed pods must be filtered from the "desired" state
for admission, which arguably should be happening earlier in
config. Exclude the two terminal pods states from GetActivePods()

Second, the previous check introduced with the pod worker lifecycle
ownership changes was subtly wrong for the admission use case.
Admission has to include pods that haven't yet hit the pod worker,
which CouldHaveRunningContainers was filtering out (because the
pod worker hasn't seen them). Introduce a weaker check -
IsPodKnownTerminated() - that returns true only if the pod is in
a known terminated state (no running containers AND known to pod
worker). This weaker check may only be called from components that
need admitted pods, not other kubelet subsystems.

This commit does not fix the long standing bug that force deleted
pods are omitted from admission checks, which must be fixed by
having GetActivePods() also include pods "still terminating".
2021-08-25 13:31:02 -04:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Kir Kolyshkin
c06a851042 pkg/kubelet/cm: use SkipFreezeOnSet
This is a knob added by runc 1.0.2 specifically for kubernetes,
which tells runc/libcontainer/cgroups/systemd v1 manager to not
freeze the cgroup in Set().

We set this knob here because this code is only used for pods
(rather than containers) management, and in this place we create or
update the pod cgroup with no device limits set, so we can skip the
freeze.

If this knob is not set, libcontainer's cgroup v1 manager tries to
figure out whether the freeze is needed or not, but it's a somewhat
expensive check to perform, thus the knob is a shortcut.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-08-23 13:41:51 -07:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
Kubernetes Prow Robot
8dbc33d649
Merge pull request #101081 from rphillips/add_graceful_shutdown_event
kubelet: add graceful shutdown events
2021-08-17 22:08:08 -07:00
Kubernetes Prow Robot
a779c58b16
Merge pull request #104330 from liggitt/defaulter-package
Change defaulter-gen input to package import path
2021-08-17 11:42:18 -07:00
Kubernetes Prow Robot
07b7afefbf
Merge pull request #103862 from tanjing2020/cleancode
Replace 'x.Sub(time.Now())' with 'time.Until(x)'
2021-08-17 11:42:01 -07:00
Kubernetes Prow Robot
d7c1663556
Merge pull request #103137 from wzshiming/fix/expected_inhibit_delay
Allow the actual inhibit delay to be greater than the expected inhibit delay
2021-08-17 11:41:49 -07:00
Kubernetes Prow Robot
a9aad7e034
Merge pull request #103107 from pacoxu/fix-93300
ResourceConfigForPod: check initContainers as other QoS func
2021-08-17 11:41:37 -07:00
Kubernetes Prow Robot
f4185318bc
Merge pull request #103048 from gy95/remove_static
remove not used IsStaticPod, prevent possible panic
2021-08-17 11:41:25 -07:00
Kubernetes Prow Robot
b559434c02
Merge pull request #103059 from rajaSahil/fix-error
Update github.com/pkg/errors to go native errors pkg
2021-08-17 10:29:25 -07:00
Kubernetes Prow Robot
db42b67f3c
Merge pull request #101962 from llhhbc/add-osinfo-logs
Add getOSInfo err info
2021-08-17 10:29:13 -07:00
Jordan Liggitt
87a4e082ac Change defaulter-gen input to package path 2021-08-14 11:00:18 -04:00
YanzhaoLi
545d898584 Extract containerID from systemd-style cgroupPath in cri_stats_provider
And fix test to generate UUID without dash
2021-08-11 19:03:56 -07:00
Ryan Phillips
30e9a420c4 kubelet: fix sandbox creation error suppression when pods are quickly deleted 2021-08-10 08:55:25 -05:00