Commit Graph

8604 Commits

Author SHA1 Message Date
Jordan Liggitt
124a5ddf72 Fix int->string casts 2020-07-24 16:23:12 -04:00
Kubernetes Prow Robot
ae7dce72ce
Merge pull request #91930 from RenaudWasTaken/DisableAcceleratorUsageMetrics
Add DisableAcceleratorUsageMetrics Feature Gate
2020-07-22 09:16:06 -07:00
Jordan Liggitt
d195fc2ec8 Ensure runtimeCache contains all observed started containers on pod delete 2020-07-21 15:54:29 -04:00
Kubernetes Prow Robot
b6174e605f
Merge pull request #93189 from klueska/upstream-fix-bug-topology-manager
Fix a bug whereby reusable CPUs and devices were not being honored
2020-07-21 04:35:17 -07:00
Kubernetes Prow Robot
1fdd8fb213
Merge pull request #93263 from liggitt/windows
Fix windows kubelet startup
2020-07-20 19:51:57 -07:00
wawa0210
aea228f5dd fix no-new-privileges on windows 2020-07-20 16:14:52 -04:00
Jordan Liggitt
886727a4c0 Revert "Add deviceManager in windows container manager"
This reverts commit 056d73b1a1.
2020-07-20 16:13:53 -04:00
Giuseppe Scrivano
ef935bd991
kubelet: clamp cpu shares to max allowed
clamp the max cpu.shares to the maximum value allowed by the kernel.

It is not an issue when using cgroupfs, as the kernel will
anyway make sure the value is not out of range and automatically clamp
it, systemd has an additional check that prevents the cgroup creation.

Closes: https://github.com/kubernetes/kubernetes/issues/92855

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-20 17:18:03 +02:00
Kevin Klues
00df26a985 Fix a bug whereby reusable CPUs and devices were not being honored
Previously, it was possible for reusable CPUs and reusable devices (i.e.
those previously consumed by init containers) to not be reused by
subsequent init containers or app containers if the TopologyManager was
enabled. This would happen because hint generation for the
TopologyManager was not considering the reusable devices when it made
its hint calculation.

As such, it would sometimes:
1) Generate a hint for a differnent NUMA node, causing the CPUs and
devices to be allocated from that node instead of the one where the
reusable devices live; or
2) End up thinking there were not enough CPUs or devices to allocate and
throw a TopologyAffinity admission error

This patch fixes this by ensuring that reusable CPUs and devices are
considered as part of TopologyHint generation. This frunctionality is
difficult to unit test since it spans multiple components, but an e2e
test will be added in a subsequent patch to test this functionality.
2020-07-20 11:41:13 +00:00
Kevin Klues
74fe9364c3 Simplify logic in devicemanager TopologyHint generation 2020-07-20 11:41:13 +00:00
Kevin Klues
9f5f401d60 Add AnySet() to topologymanager bitmask API 2020-07-20 11:41:13 +00:00
Kubernetes Prow Robot
242f3d9dce
Merge pull request #80917 from aarnaud/windows-devicemanager
Port deviceManager to windows container manager to enable GPU access
2020-07-17 21:04:50 -07:00
Kubernetes Prow Robot
d9c3d15018
Merge pull request #92986 from gnufied/fix-in-use-errors
Handle volume-in-use error during volume expansion
2020-07-15 00:30:37 -07:00
Kubernetes Prow Robot
428b500c5a
Merge pull request #90949 from pjbgf/seccomp-least-priv-kuberuntime
Add seccomp least privilege for kuberuntime
2020-07-14 04:35:21 -07:00
Kubernetes Prow Robot
3f8f9998b0
Merge pull request #90948 from pjbgf/seccomp-least-priv-dockershim
Add seccomp least privilege for docker sandbox
2020-07-14 02:23:22 -07:00
Renaud Gaubert
34dc785c0b Add the DisableAcceleratorUsageMetrics feature gate
Signed-off-by: Renaud Gaubert <rgaubert@nvidia.com>
2020-07-13 20:52:06 +00:00
Giuseppe Scrivano
79be8be10e
kubelet, cgroupv2: make hugetlb optional
make the hugetlb controller optional when cgroup v2 is used.

Closes: https://github.com/kubernetes/kubernetes/issues/92933

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-13 09:40:55 +02:00
Kubernetes Prow Robot
6b5dc37708
Merge pull request #92919 from dashpole/update_cadvisor
Update cAdvisor to v0.37.0
2020-07-12 06:59:55 -07:00
Kubernetes Prow Robot
8398bc3b53
Merge pull request #92916 from joelsmith/count-etc-hosts
Include pod /etc/hosts in ephemeral storage calculation for eviction
2020-07-12 06:59:36 -07:00
Kubernetes Prow Robot
63926cf8e7
Merge pull request #92862 from giuseppe/cgroup-fix-leaks
vendor: update github.com/opencontainers/runc
2020-07-11 20:57:11 -07:00
Hemant Kumar
b8c0435bc2 Handle volume-in-use error 2020-07-11 09:02:58 -04:00
Kubernetes Prow Robot
93e76f5081
Merge pull request #92442 from tedyu/grace-period-with-map
Respect grace period when removing mirror pod
2020-07-10 17:49:23 -07:00
Kubernetes Prow Robot
26da0ea91e
Merge pull request #92794 from klueska/upstream-more-tests-get-preferred-allocation
Add more tests for device plugin's GetPreferredAllocation() API
2020-07-10 15:42:21 -07:00
Kubernetes Prow Robot
0cb7e320a5
Merge pull request #92784 from pohly/generic-ephemeral-inline-volumes
generic ephemeral inline volumes
2020-07-10 15:41:46 -07:00
Kubernetes Prow Robot
a6378d8b12
Merge pull request #92779 from fisherxu/patch-2
Return err when create ContainerLogsDir failed
2020-07-10 15:41:37 -07:00
Patrick Ohly
ff3e5e06a7 GenericEphemeralVolume: initial implementation
The implementation consists of
- identifying all places where VolumeSource.PersistentVolumeClaim has
  a special meaning and then ensuring that the same code path is taken
  for an ephemeral volume, with the ownership check
- adding a controller that produces the PVCs for each embedded
  VolumeSource.EphemeralVolume
- relaxing the PVC protection controller such that it removes
  the finalizer already before the pod is deleted (only
  if the GenericEphemeralVolume feature is enabled): this is
  needed to break a cycle where foreground deletion of the pod
  blocks on removing the PVC, which waits for deletion of the pod

The controller was derived from the endpointslices controller.
2020-07-09 23:29:24 +02:00
David Ashpole
1f70708f6c update cAdvisor to v0.37.0 2020-07-09 10:23:10 -07:00
Kubernetes Prow Robot
70e09f2c24
Merge pull request #88842 from angao/fit-arg
add args for NodeResourcesFit plugin
2020-07-09 05:04:10 -07:00
Giuseppe Scrivano
0d2a493a8f
kubelet: skip setting the devices cgroup
use the new libcontainer feature of skipping setting the devices
cgroup.  This is necessary on cgroup v2 to avoid leaking a eBPF
program every time the cgroup is re-configured.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-07-09 09:37:46 +02:00
Kubernetes Prow Robot
1e3eeba9fa
Merge pull request #91577 from knabben/kubelet-bootstrap
kubelet: remove the --bootstrap-checkpoint-path feature
2020-07-09 00:03:41 -07:00
Kubernetes Prow Robot
4ee555252c
Merge pull request #83710 from edwardstudy/ed/typo
Fix comment typos in pkg/kubelet/prober
2020-07-09 00:02:58 -07:00
Paulo Gomes
b451563560
Add seccomp least privilege for kuberuntime 2020-07-08 22:03:29 +01:00
Ted Yu
a76a959294 Respect grace period when removing mirror pod
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-07-08 13:38:24 -07:00
Joel Smith
f34b586d01 Include pod /etc/hosts in ephemeral storage calculation for eviction 2020-07-08 12:58:11 -06:00
Anthony ARNAUD
056d73b1a1
Add deviceManager in windows container manager 2020-07-08 18:22:16 +02:00
Kubernetes Prow Robot
5afc42de95
Merge pull request #78373 from tedyu/sort-init-container
Sort init container statuses using non-nested loop
2020-07-07 09:13:58 -07:00
Kubernetes Prow Robot
7e75a5ef43
Merge pull request #87273 from SaranBalaji90/kubelet-log-file
Add support for disabling /logs endpoint in kubelet
2020-07-07 04:09:58 -07:00
Kevin Klues
26cb650655 Remove unnecessary union after call to GetPreferredAllocation()
There is no need to try and allocate already-allocated devices again.
2020-07-07 06:35:57 +00:00
Kevin Klues
67ecc11c44 Harden callGetPreferredAllocationIfAvailable() return value
Previously, we didn't check the contents of the result after calling out
to the plugin endpoint. This could have resulted in errors if the plugin
returned either 'nil' or an empty result. This patch fixes this.
2020-07-07 06:35:57 +00:00
Kevin Klues
d87365494a Fix bug in call to callGetPreferredAllocationIfAvailable()
Previously, we were passing the variable 'devices' to this function,
when we should have been passing 'allocated'. This bug crept in due to a
variable name change that didn't propogate its way through the entire
function. The tests added in the previous commit would have caught this.
2020-07-07 06:35:57 +00:00
Kevin Klues
d551ab1e78 Add tests to check paramaters passed to GetPreferredAllocation()
These tests uncovered some small bugs that will be fixed in a subsequent
set of commits.
2020-07-07 06:35:57 +00:00
Fei Xu
34826c82be Return err when create ContainerLogsDir failed 2020-07-07 09:36:35 +08:00
Kubernetes Prow Robot
a26e5881d8
Merge pull request #92786 from answer1991/feature/enhance-bootstrap-certificate
make Kubelet bootstrap certificate signal aware
2020-07-06 09:52:52 -07:00
Sri Saran Balaji Vellore Rajakumar
05240c9218 Add support for disabling /logs endpoint in kubelet 2020-07-06 07:52:30 -07:00
chenjun.cj
db71941775 make Kubelet bootstrap certificate signal aware 2020-07-06 22:30:27 +08:00
Paulo Gomes
8976e3620f
Add seccomp enforcement and validation based on new GA fields
Adds seccomp validation.

This ensures that field and annotation values must match when present.

Co-authored-by: Sascha Grunert <sgrunert@suse.com>
2020-07-06 09:13:25 +01:00
Kubernetes Prow Robot
efb56da4a5
Merge pull request #92665 from klueska/upstream-add-get-preferred-allocation-api
Add GetPreferredAllocation() call to the v1beta1 device plugin API
2020-07-03 20:31:16 -07:00
Kevin Klues
5bd0db0b1f Add new test cases for GetPreferredAllocation() in allocation path 2020-07-03 13:01:32 +00:00
Kevin Klues
83f18d9975 Remove unnecessary field from TestTopologyAlignedAllocation() test cases 2020-07-03 13:01:32 +00:00
Kevin Klues
bb08fd1135 Add a simple endpoint test for GetPreferredAllocation()
More extensive tests that exercise the allocation logic are to follow.
2020-07-03 13:01:32 +00:00