Commit Graph

9549 Commits

Author SHA1 Message Date
yxxhero
afde4c8bc4 fix init container oomkilled as a failure
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-09-03 07:04:57 +08: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
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
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
Kubernetes Prow Robot
4b4d12f8a6
Merge pull request #102913 from pacoxu/upgrade-promotheus-common
upgrade prometheus/common to v0.28.0
2021-08-09 08:03:31 -07:00
longhui.li
4af506c989 Add getOSInfo err info 2021-08-09 11:04:53 +08:00
Artyom Lukianov
73a5cce3e6 device manager: do not clean admitted pods from the state
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-08-08 16:46:06 +03:00
Artyom Lukianov
93a237abd8 memory manager: do not clean admitted pods from the state
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-08-08 16:46:06 +03:00
Artyom Lukianov
66babd1a90 cpu manager: do not clean admitted pods from the state
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-08-08 16:46:06 +03:00
Elana Hashman
d2ed3b28b7
Revert "revert Bump DynamicKubeConfig metric deprecation to 1.23 by delta update" 2021-08-06 08:38:56 -07:00
Kubernetes Prow Robot
28990f7664
Merge pull request #103958 from liggitt/server-timeouts
Set idle and readheader timeouts
2021-08-05 14:11:02 -07:00
Kubernetes Prow Robot
3b84cc9e6b
Merge pull request #104075 from kerthcet/cleanup/revert-dynamickubeconfig-metric
revert Bump DynamicKubeConfig metric deprecation to 1.23 by delta update
2021-08-05 08:18:40 -07:00
Kubernetes Prow Robot
fa1d682bd7
Merge pull request #103353 from njuptlzf/fix_datarace
fix data race for Test_Run_Positive_VolumeMountControllerAttachEnabledRace
2021-08-04 19:00:23 -07:00
Kubernetes Prow Robot
a674fb496c
Merge pull request #103261 from markusthoemmes/kubelet-volume-logs
Add pod context to volume lifecycle logs
2021-08-04 19:00:15 -07:00
Kubernetes Prow Robot
4b2f2a0cd8
Merge pull request #102789 from haircommander/add-summary-stats-to-cri
CRI: add fields for pod level stats to satisfy the /stats/summary API
2021-08-04 18:59:43 -07:00
Wesley Williams
ff165c8823
Replace usage of Whitelist with Allowlist within Kubelet's sysctl package (#102298)
* Change uses of whitelist to allowlist in kubelet sysctl

* Rename whitelist files to allowlist in Kubelet sysctl

* Further renames of whitelist to allowlist in Kubelet

* Rename podsecuritypolicy uses of whitelist to allowlist

* Update pkg/kubelet/kubelet.go

Co-authored-by: Danielle <dani@builds.terrible.systems>

Co-authored-by: Danielle <dani@builds.terrible.systems>
2021-08-04 18:59:35 -07:00
Markus Thömmes
c820824711 Add pod context to volume lifecycle logs 2021-08-03 13:12:22 +02:00
kerthcet
980cf85439 revert Bump DynamicKubeConfig metric deprecation to 1.23 by delta update
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-08-02 23:15:10 +08:00
Elana Hashman
b5f24c334e
Bump DynamicKubeConfig metric deprecation to 1.23 2021-07-28 09:29:57 -07:00
Jordan Liggitt
db48793269 Set idle and readheader timeouts 2021-07-27 11:58:45 -04:00
njuptlzf
1555877cc5 fix data race for Test_Run_Positive_VolumeMountControllerAttachEnabledRace 2021-07-26 17:17:16 +08:00
Kubernetes Prow Robot
47e1df8f4e
Merge pull request #103743 from kolyshkin/runc-1.0.1
vendor: bump runc to v1.0.1
2021-07-23 15:16:33 -07:00
tanjing2020
523b4c0918 Replace 'x.Sub(time.Now())' with 'time.Until(x)' 2021-07-23 10:03:36 +08:00
Kubernetes Prow Robot
9f47110aa2
Merge pull request #103785 from smarterclayton/preserve_reason
Ensure that Reason and Message are preserved on pod status
2021-07-20 15:21:26 -07:00
Kubernetes Prow Robot
6aa160f3ba
Merge pull request #103181 from 249043822/bugfix-volumemanager
Add sync reconstructed volume from desired state of world for volumemanager
2021-07-19 15:04:52 -07:00
Clayton Coleman
d7ee024cc5
kubelet: Make condition processing in one spot
The list of status conditions should be calculated all together,
this made review more complex. Readability only.
2021-07-19 17:56:22 -04:00
Clayton Coleman
c2a6d07b8f
kubelet: Avoid allocating multiple times during status
Noticed while reviewing this code path. We can assume the
temporary slice should be about the same size as it was previously.
2021-07-19 17:55:18 -04:00
Clayton Coleman
9efd40d72a kubelet: Preserve reason/message when phase changes
The Kubelet always clears reason and message in generateAPIPodStatus
even when the phase is unchanged. It is reasonable that we preserve
the previous values when the phase does not change, and clear it
when the phase does change.

When a pod is evicted, this ensurse that the eviction message and
reason are propagated even in the face of subsequent updates. It also
preserves the message and reason if components beyond the Kubelet
choose to set that value.

To preserve the value we need to know the old phase, which requires
a change to convertStatusToAPIStatus so that both methods have
access to it.
2021-07-19 17:54:55 -04:00
Kir Kolyshkin
e5b434e990 kubelet/cm: don't set Devices
Since runc 1.0.0 it is now sufficient to have SkipDevices: true.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-07-16 12:45:35 -07:00
Davanum Srinivas
75748c185e
enable verify-golangci-lint.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-14 08:53:33 -04:00
Davanum Srinivas
26cc8e40a8
fix deadcode issues
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-14 08:41:21 -04:00