Commit Graph

584 Commits

Author SHA1 Message Date
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
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
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02: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
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
rarashid
bf2ae14501 Move feature flag to beta (but leave as false) and remove the feature flag from Kubelet 2021-07-13 14:25:44 -05:00
Elana Hashman
642eff0c69
Rename NodeSwapEnabled flag to NodeSwap 2021-07-09 11:39:52 -07:00
Kubernetes Prow Robot
dab6f6a43d
Merge pull request #102344 from smarterclayton/keep_pod_worker
Prevent Kubelet from incorrectly interpreting "not yet started" pods as "ready to terminate pods" by unifying responsibility for pod lifecycle into pod worker
2021-07-08 16:48:53 -07:00
Kubernetes Prow Robot
a9d7526864
Merge pull request #102970 from tkestack/feature-memory-qos
Feature: Support memory qos with cgroups v2
2021-07-08 14:01:36 -07:00
Kubernetes Prow Robot
7c84064a4f
Merge pull request #99000 from verb/1.21-kubelet-metrics
Add kubelet metrics for ephemeral containers
2021-07-08 14:00:55 -07:00
Peter Hunt
a9b7dcc8c2 kubelet: update remote runtimes for cri stat changes
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2021-07-08 13:17:04 -04:00
Li Bo
c3d9b10ca8 feature: support Memory QoS for cgroups v2 2021-07-08 09:26:46 +08:00
Elana Hashman
5584725605
Explicitly set LimitedSwap case with fallthrough 2021-07-06 13:50:09 -07:00
Clayton Coleman
3eadd1a9ea
Keep pod worker running until pod is truly complete
A number of race conditions exist when pods are terminated early in
their lifecycle because components in the kubelet need to know "no
running containers" or "containers can't be started from now on" but
were relying on outdated state.

Only the pod worker knows whether containers are being started for
a given pod, which is required to know when a pod is "terminated"
(no running containers, none coming). Move that responsibility and
podKiller function into the pod workers, and have everything that
was killing the pod go into the UpdatePod loop. Split syncPod into
three phases - setup, terminate containers, and cleanup pod - and
have transitions between those methods be visible to other
components. After this change, to kill a pod you tell the pod worker
to UpdatePod({UpdateType: SyncPodKill, Pod: pod}).

Several places in the kubelet were incorrect about whether they
were handling terminating (should stop running, might have
containers) or terminated (no running containers) pods. The pod worker
exposes methods that allow other loops to know when to set up or tear
down resources based on the state of the pod - these methods remove
the possibility of race conditions by ensuring a single component is
responsible for knowing each pod's allowed state and other components
simply delegate to checking whether they are in the window by UID.

Removing containers now no longer blocks final pod deletion in the
API server and are handled as background cleanup. Node shutdown
no longer marks pods as failed as they can be restarted in the
next step.

See https://docs.google.com/document/d/1Pic5TPntdJnYfIpBeZndDelM-AbS4FN9H2GTLFhoJ04/edit# for details
2021-07-06 15:55:22 -04:00
Elana Hashman
d3fd1362ca
Rename NoSwap to LimitedSwap as workloads may still swap
Also made the options a kubelet type, address API review feedback
2021-06-29 12:08:21 -07:00
Elana Hashman
0deef4610e
Set MemorySwapLimitInBytes for CRI when NodeSwapEnabled 2021-06-29 11:59:02 -07:00
Sascha Grunert
8b7003aff4
Add SeccompDefault feature
This adds the gate `SeccompDefault` as new alpha feature. Seccomp path
and field fallbacks are now passed to the helper functions, whereas unit
tests covering those code paths have been added as well.

Beside enabling the feature gate, the feature has to be enabled by the
`SeccompDefault` kubelet configuration or its corresponding
`--seccomp-default` CLI flag.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>

Apply suggestions from code review

Co-authored-by: Paulo Gomes <pjbgf@linux.com>
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-06-23 10:22:57 +02:00
Kubernetes Prow Robot
13cafd5cb0
Merge pull request #101480 from yuzhiquan/little-nit-for-kubelet
Fix some nit for kubelet
2021-05-24 21:49:05 -07:00
Kubernetes Prow Robot
a49b4a1018
Merge pull request #100608 from pacoxu/fix/poststart-hook
correct messages in post start hook error handling
2021-05-24 21:48:32 -07:00
pacoxu
75c19da843 correct messages in post start hook error handling
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-05-20 15:14:47 +08:00
marosset
fd94032b21 Kubelet updates for Windows HostProcess Containers 2021-05-19 16:24:14 -07:00
Kubernetes Prow Robot
a238eb2fe8
Merge pull request #99748 from rphillips/fixes/check_log_path_for_restart_count
kubelet: fix log files being overwritten on container state loss
2021-05-03 16:14:19 -07:00
yuzhiquan
bebca30309 comment should have function name as prefix 2021-04-28 15:26:46 +08:00
Lee Verberne
29178fff1c Add kubelet managed pod metrics 2021-04-13 14:13:30 +02:00
Quan Tian
a90df057ac Fix panic when killing container fails
Use runningPod for logging as the pod passed in could be nil.
2021-04-12 14:02:53 +08:00
Kubernetes Prow Robot
862aa6d3a0
Merge pull request #99970 from krzysiekg/structured_logging_pkg_kubelet_kuberuntime
Migrate pkg/kubelet/kuberuntime to structured logging
2021-03-17 11:45:31 -07:00
Krzysztof Gibuła
629d5ab213 Migrate pkg/kubelet/kuberuntime to structured logging 2021-03-17 01:53:44 +01:00
Kubernetes Prow Robot
e082d84575
Merge pull request #100196 from ehashman/remains-of-logs
Migrate remaining logs to structured logging
2021-03-16 13:12:55 -07:00
Ryan Phillips
d169c81496 check log directory for restartCount 2021-03-15 15:33:29 -05:00
Elana Hashman
1c95d63df0
Migrate kuberuntime_gc.go to structured logs 2021-03-15 12:39:35 -07:00
Aditi Sharma
461c0c1656 Fix structured logging for kuberuntime_manger.go 2021-03-15 10:13:18 +05:30
Elana Hashman
9fb6e712ff
Override terminationLivenessGracePeriod for probes 2021-03-11 14:38:03 -08:00
Kubernetes Prow Robot
c22f099395
Merge pull request #99841 from adisky/kuberuntime_manager
Migrate pkg/kubelet/kuberuntime/kuberuntime_manager.go to structured logging
2021-03-08 16:27:44 -08:00
Aditi Sharma
45c7608379 Migrate to structured logging
pkg/kubelet/kuberuntime/kuberuntime_manager.go

Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2021-03-08 11:27:44 +05:30
Kubernetes Prow Robot
c193c1b234
Merge pull request #98376 from matthyx/mega
Make all health checks probing consistent
2021-03-06 11:45:41 -08:00
Matthias Bertschy
431e6a7044 Move readinessManager updates handling to kubelet 2021-03-05 07:02:25 +01:00
chenyw1990
68457812f3 Use structured logging to refactor log printing code, and add containerName to log output information 2021-03-05 09:10:05 +08:00
Kubernetes Prow Robot
d85aed6e5b
Merge pull request #99491 from uzuku/2021-feb-fix-typo
Fix typo in comment for purgeInitContainers.
2021-03-01 17:13:21 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
uzuku
8c53bfe1ea Fix typo in comment for purgeInitContainers. 2021-02-26 21:33:31 +08:00
pacoxu
3de4dd841f
remove featuregate for sysctl
Co-authored-by: Skyler Clark <wgahnagl@protonmail.com>
2021-02-22 16:51:43 -05:00
Ryan Phillips
f989adaa18 kubelet: fix create create sandbox delete pod race 2021-02-18 11:22:12 -06:00
Kubernetes Prow Robot
ee2b7a5049
Merge pull request #98049 from pacoxu/enhancements/redir-links
fix all keps links 404 for kep folder migration
2021-02-01 21:48:28 -08:00
pacoxu
a10bdfed09 fix all keps links 404 for kep folder migration
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-02-01 19:41:59 +08:00
ialidzhikov
21608e49a7 Remove WindowsGMSA and WindowsRunAsUserName feature gates
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2021-01-30 02:01:48 +02:00
Kubernetes Prow Robot
6fae18523d
Merge pull request #98019 from cynepco3hahue/specify_resource_during_container_creation_cpu_manager
cpu manager: specify the container CPU set during the creation
2021-01-25 14:15:12 -08:00
Kubernetes Prow Robot
cea1098997
Merge pull request #97715 from changshuchao/files_tmptag
Made some optimizations, including modifying variable names, omitting…
2021-01-21 22:55:26 -08:00
Artyom Lukianov
38dc7509f8 cpu manager: specify the container CPU set during the creation
We can set the container cpuset.cpus diring the creation and it
will not need to call to update resources after the container creation.

Additional side effect of the change, that the runc process that responsible
to create the container will run with the same CPU affinity because the
runc runs on the cpuset provided in the config.json arg.

It will allow to prevent undesirable interupts on isolated CPUs.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-01-20 17:53:33 +02:00
changshuchao
42eb85e4fb Made some optimizations, including modifying variable names, omitting unnecessary parentheses, and conflicting variable names and package names.
Signed-off-by: changshuchao <chang.shuchao1@zte.com.cn>
2021-01-16 17:24:08 +08:00
wawa0210
ea9df6361b
remove windows container hyper-v support 2021-01-14 22:49:34 +08:00