Commit Graph

624 Commits

Author SHA1 Message Date
Paco Xu
acd696266e mark PodOverhead to GA in v1.24; remove in v1.26 2022-03-17 09:30:14 +08:00
Deep Debroy
023d6fb8f4 Pass instrumented runtime service to containergc
Signed-off-by: Deep Debroy <ddebroy@gmail.com>
2022-03-08 14:33:37 +00:00
Kubernetes Prow Robot
0e8e307567
Merge pull request #106570 from odinuge/fix-cpu-shares-on-big-systems
Fix cpu share issues on systems with large amounts of cpu
2022-03-01 10:15:55 -08:00
KeZhang
3946d99904 Ignore container notfound error while getPodstatuses 2022-02-16 08:55:19 +08:00
Kubernetes Prow Robot
64e83a7e43
Merge pull request #107945 from saschagrunert/cri-verbose
Add support for CRI `verbose` fields
2022-02-14 17:58:12 -08:00
Kubernetes Prow Robot
1659924a97
Merge pull request #108070 from jsafrane/remove-selinux
Remove util/selinux package
2022-02-11 18:19:47 -08:00
Jan Safranek
77aa06d0c8 Remove util/selinux package
The package says:

> the libcontainer SELinux package is only built for Linux, so it is
> necessary to have a NOP wrapper which is built for non-Linux platforms

This is not true, Kubernetes now imports
github.com/opencontainers/selinux/go-selinux and it has proper
multiplatform support (i.e. NOOP on non-Linux platforms).

Removing the whole package and calling go-selinux directly.
2022-02-11 15:20:35 +01:00
Sascha Grunert
effbcd3a0a
Add support for CRI verbose fields
The remote runtime implementation now supports the `verbose` fields,
which are required for consumers like cri-tools to enable multi CRI
version support.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-02-10 17:12:26 +01:00
Ciprian Hacman
0819451ea6 Clean up logic for deprecated flag --container-runtime in kubelet
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-02-10 13:26:59 +02:00
cyclinder
07999dac70 Clean up dockershim flags in the kubelet
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-01-14 16:02:50 +02:00
Ciprian Hacman
5bae9b9288 Clean up DockerLegacyService interface
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2021-12-18 12:24:54 +02:00
Sascha Grunert
de37b9d293
Make CRI v1 the default and allow a fallback to v1alpha2
This patch makes the CRI `v1` API the new project-wide default version.
To allow backwards compatibility, a fallback to `v1alpha2` has been added
as well. This fallback can either used by automatically determined by
the kubelet.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-11-17 11:05:05 -08:00
Kubernetes Prow Robot
42d8b2f3b9
Merge pull request #106289 from CatherineF-dev/fix-metrics-AlreadyRegisteredError-in-unit-test
Fix metrics AlreadyRegisteredError on TestRecordOperation and TestGetHistogramVecFromGatherer unit test
2021-11-16 16:36:15 -08:00
CatherineF-dev
5646120fbb Use Reset at first 2021-11-16 18:57:24 +00:00
Kubernetes Prow Robot
463802765d
Merge pull request #104650 from yxxhero/initcontainer_oomkiil_as_a_failure
fix init container oomkilled as a failure
2021-11-15 17:51:25 -08:00
Odin Ugedal
de0ece541c
Fix cpu share issues on systems with large amounts of cpu
On systems where the calculated cpu shares results in a value above the
max value in linux, containers getting that value are unable to start.
This occur on systems with 300+ cpu cores, and where containers are
given such a value.

This issue was fixed for the pod and qos control groups in the similar
cm.MilliCPUToShares that also has tests verifying the behavior. Since
this code already has an dependency on kubelet/cm, lets reuse that code
instead.
2021-11-14 19:49:19 +00:00
CatherineF-dev
d9737eabf4 Use HandlerFor 2021-11-12 23:09:51 +00:00
CatherineF-dev
49d341aa2b Use defer in non-loop 2021-11-12 23:03:38 +00:00
CatherineF-dev
a30af261f1 remove lint 2021-11-12 15:03:44 +00:00
Ryan Phillips
d6f9df424a defer close the rotated log open 2021-11-12 08:13:24 -06:00
CatherineF-dev
a8324a3bb7 clean 2021-11-12 03:52:19 +00:00
CatherineF-dev
744785ee40 remove prometheus.DefaultRegisterer 2021-11-12 02:17:28 +00:00
CatherineF-dev
8290400e9c format 2021-11-10 03:29:13 +00:00
CatherineF-dev
ef0b2dfbf4 Fix metrics AlreadyRegisteredError on TestRecordOperation and TestGetHistogramVecFromGatherer unit test 2021-11-10 03:23:54 +00:00
Kubernetes Prow Robot
5d60c8d857
Merge pull request #102393 from mengjiao-liu/fix-sysctl-regex
Upgrade preparation to verify sysctl values containing forward slashes by regex
2021-11-09 18:23:26 -08:00
Mark Rossetti
ef324d6bbd Adding kubelet metrics for started and failed to start HostProcess containers
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2021-11-04 14:39:57 -07:00
Mengjiao Liu
275d832ce2 Upgrade preparation to verify sysctl values containing forward slashes by regex 2021-11-04 11:49:56 +08:00
Tim Hockin
11a25bfeb6
De-share the Handler struct in core API (#105979)
* De-share the Handler struct in core API

An upcoming PR adds a handler that only applies on one of these paths.
Having fields that don't work seems bad.

This never should have been shared.  Lifecycle hooks are like a "write"
while probes are more like a "read". HTTPGet and TCPSocket don't really
make sense as lifecycle hooks (but I can't take that back). When we add
gRPC, it is EXPLICITLY a health check (defined by gRPC) not an arbitrary
RPC - so a probe makes sense but a hook does not.

In the future I can also see adding lifecycle hooks that don't make
sense as probes.  E.g. 'sleep' is a common lifecycle request. The only
option is `exec`, which requires having a sleep binary in your image.

* Run update scripts
2021-10-29 13:15:11 -07:00
Eric Ernst
2c0fad1f52 kuberuntime: populate sandbox resources, overhead
Populate Resources and Overhead fields which, are now part of
LinuxPodSandboxConfig.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-10-20 11:30:23 -07:00
Eric Ernst
ddcf815d12 kuberuntime: refactor linux resources for better reuse
Seperate the CPU/Memory req/limit -> linux resource conversion into its
own function for better reuse.

Elsewhere in kuberuntime pkg, we will want to leverage this
requests/limits to Linux Resource type conversion.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-10-20 11:30:23 -07:00
Eric Ernst
b1361aed93 kuberuntime: augment linux container config unit test
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-10-20 11:30:23 -07:00
Eric Ernst
a73502a0be kuberuntime: augment linux container config unit test
Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2021-10-20 11:29:22 -07:00
Mark Rossetti
99e43bfa8c Stop passing WindowsHostProcessContainer annotations for CRI calls in kubelet
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2021-10-05 10:08:53 -07:00
yxxhero
35df409a7e remove StartedPodsErrorsTotal metrice message
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-09-23 22:18:56 +08:00
yxxhero
c1b94d27d9 fix typo
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-09-14 23:24:14 +08:00
yxxhero
20b3cd5198 fix typo
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-09-14 09:04:59 +08:00
yxxhero
5ba76eb911 fix typo
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-09-14 09:03:29 +08:00
yxxhero
2f448a0789 fix oomkilled description
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-09-03 22:07:46 +08:00
yxxhero
71a91d55cb update func description 2021-09-03 07:20:28 +08:00
yxxhero
afde4c8bc4 fix init container oomkilled as a failure
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-09-03 07:04:57 +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
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