Commit Graph

8413 Commits

Author SHA1 Message Date
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Davanum Srinivas
9006b2db69
Fix for API change in cadvisor
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:53:03 -04:00
Kubernetes Prow Robot
e5b8e3ae19
Merge pull request #91106 from RobbinBaauw/fix-fsstats-tag
Add inline tag to FsStats
2020-05-15 23:02:32 -07:00
Kubernetes Prow Robot
8a9206c9b2
Merge pull request #91046 from wawa0210/remove-beta-os-label
kubelet no longer registers "beta.kubernetes.io/os" and "beta.kubernetes.io/arch" node labels to apiserver
2020-05-15 02:48:58 -07:00
Kubernetes Prow Robot
96e13de777
Merge pull request #88980 from tedyu/evict-delay-sorting
Delay sorting of evictUnits slice in kuberuntime_gc
2020-05-14 21:24:58 -07:00
Kubernetes Prow Robot
2b00dd8536
Merge pull request #90409 from rphillips/fixes/add_logging_around_pod_container_deletor
add logging around pod_container_deletor DeleteContainer
2020-05-14 13:38:58 -07:00
Robbin Baauw
77a2a72541
Add inline tag to FsStats
Co-authored-by: Victor Roest <victor@xirion.net>
2020-05-14 14:23:36 +02:00
Kubernetes Prow Robot
dc1934e078
Merge pull request #90477 from rphillips/feat/add_tracing_to_remote_runtime
kubelet: add remote_runtime tracing at log level 10
2020-05-14 00:46:22 -07:00
Kubernetes Prow Robot
f975b4b0df
Merge pull request #91066 from rphillips/fixes/exec-probe_log
kubelet: tweak exec-probe log statement to be more concise
2020-05-13 22:14:35 -07:00
Kubernetes Prow Robot
0d0c400715
Merge pull request #91004 from cwdsuzhou/May/relplace_log
Use klog to replace log to keep them in consistence
2020-05-13 15:59:33 -07:00
Kubernetes Prow Robot
4339ac30a0
Merge pull request #90554 from vboulineau/vboulineau/fix_win_stats_init_containers
kubelet: fix `/stats/summary` endpoint on Windows when init-containers are present on the node
2020-05-13 15:58:51 -07:00
Kubernetes Prow Robot
2ca3347dc0
Merge pull request #90499 from knabben/kubelet-testing-flags
Deprecating Kubelet not used testing flags
2020-05-13 15:58:37 -07:00
Ryan Phillips
348d9941b1 kubelet: tweak exec-probe log statement to be more concise 2020-05-13 11:42:43 -05:00
wawa0210
54c0f8b677
Remove the 'beta' version of the node label (os and arch types) 2020-05-13 22:51:52 +08:00
Kubernetes Prow Robot
fb3009c3c0
Merge pull request #86034 from tahsinrahman/kubeletconfig-tests
Add tests for KubeletConfig
2020-05-13 00:18:26 -07:00
caiweidong
5ed8fb690c Use klog to replace log to keep them in consistence 2020-05-12 13:49:10 +08:00
Kubernetes Prow Robot
e26af96b8e
Merge pull request #90951 from mattjmcnaughton/mattjmcnaughton/clarify-dockershim-no-docker-error-message
Clarify `kubelet_dockershim_nodocker` error message
2020-05-11 18:08:42 -07:00
Kubernetes Prow Robot
751fe16b93
Merge pull request #90927 from BenTheElder/unit-shmunit
remove oom TestStartingWatcher ""unit"" test
2020-05-11 18:08:28 -07:00
mattjmcnaughton
1a63e6fead
Clarify kubelet_dockershim_nodocker error message
Clarify the error message returned when trying to use the docker runtime
on a Kubelet that was compiled without Docker.

We removed the "w/" and "w/o", which can be confusing abbreviations, and
also add slightly more detail on the actual error.
2020-05-10 10:22:56 -04:00
Kubernetes Prow Robot
ba35704b51
Merge pull request #81443 from mikedanese/socks5
rest.Config: support configuring an explict proxy URL
2020-05-10 06:05:50 -07:00
Kubernetes Prow Robot
423c17d859
Merge pull request #90086 from rvillablanca/fix/handle-error-parseform
Handling error returned by request.Request.ParseForm()
2020-05-09 22:07:50 -07:00
Benjamin Elder
c6c68a73e1 remove oom TestStartingWatcher ""unit"" test 2020-05-08 23:25:28 -07:00
Md Tahsin Rahman
ea15f60328 Add tests for KubeletConfig 2020-05-09 00:06:16 +08:00
mattjmcnaughton
49fc82f7ab
Ensure we only run the cadvisor/docker init in !dockerless
We do not want to run the `cadvisor/docker` init when we are using the
dockerless build tags. We can ensure this by isolating into a separate
file with the proper build tag constraints.
2020-05-07 17:18:51 -04:00
mattjmcnaughton
29fa1f4566
Fix the verify job
Small changes to fix the verify job. Add the proper headers, fix lint
errors, etc...
2020-05-07 17:18:50 -04:00
mattjmcnaughton
b36f637f0d
Add dockerless tags to all files in dockershim
As the final step, add the `dockerless` tags to all files in the
dockershim. Using `-tags=dockerless` in `go build`, we can compile
kubelet without the dockershim.

Once cadvisor no longer depends on `docker/docker`, compiling with
`-tags=dockerless` should be sufficient to compile the Kubelet w/o a
dependency on `docker/docker`.
2020-05-07 17:18:50 -04:00
mattjmcnaughton
7fb6c51822
Move DockerLegacyService interface out of pkg/kubelet/dockershim
DockerLegacyService interface is used throughout `pkg/kubelet`.
It used to live in the `pkg/kubelet/dockershim` package. While we
would eventually like to remove it entirely, we need to give users some form
of warning.

By including the interface in
`pkg/kubelet/legacy/logs.go`, we ensure the interface is
available to `pkg/kubelet`, even when we are building with the `dockerless`
tag (i.e. not compiling the dockershim).
While the interface always exists, there will be no implementations of the
interface when building with the `dockerless` tag. The lack of
implementations should not be an issue, as we only expect `pkg/kubelet` code
to need an implementation of the `DockerLegacyService` when we are using
docker. If we are using docker, but building with the `dockerless` tag, than
this will be just one of many things that breaks.

`pkg/kubelet/legacy` might not be the best name for the package... I'm
very open to finding a different package name or even an already
existing package.
2020-05-07 17:18:49 -04:00
mattjmcnaughton
34c8f51dcb
Remove all uses of dockershim from cmd/kubelet
We can remove all uses of `dockershim` from `cmd/kubelet`, by just
passing the docker options to the kubelet in their pure form, instead of
using them to create a `dockerClientConfig` (which is defined in
dockershim). We can then construct the `dockerClientConfig` only when we
actually need it.
2020-05-07 17:18:49 -04:00
mattjmcnaughton
e0e6d54cdf
Extract running Dockershim into own file
Extract a `runDockershim` function into a file outside of `kubelet.go`.
We can use build tags to compile two separate functions... one which
actually runs dockershim and one that is a no-op.
2020-05-07 17:18:48 -04:00
mattjmcnaughton
53adde65ce
Remove ExperimentalDockershim from kubelet
Remove one of two uses of Dockershim in `cmd/kubelet`. The other is for
creating a docker client which we pass to the Kubelet... we will handle
that refactor in a separate diff.

I'm fairly confident, though need to double check, that no one is
actually using this experimental dockershim behavior. If they are, I
think we will want to find a new way to support it (that doesn't require
using the Kubelet only to launch Dockershim).
2020-05-07 17:18:48 -04:00
Mike Danese
652a48d2e7 wire up proxier in spdy transport
and delete useless function
2020-05-07 09:13:58 -07:00
Kubernetes Prow Robot
dc6c640a12
Merge pull request #90375 from cici37/removeConfigz
move pkg/util/configz to k8s.io/component-base
2020-05-04 13:46:09 -07:00
Vincent Boulineau
3bff11244b
kubelet: fix /stats/summary endpoint on Windows when init-containers are present on the node
Following changes in #87730, Kubelet is directly hcsshim to gather stats.
However, unlike `docker stats` API that was used before, hcsshim does not
keep information about exited containers.

When the Kubelet lists containers (`docker_container.go:ListContainers()`),
it sets `All: true`, retrieving non-running containers.

When docker stats is called with such container id, it'll return a valid JSON
with all values set to 0. The non-running containers are filtered later on in the process.

When the hcsshim is called with such container id, it'll return an error, effectively
stopping the stats retrieval for all containers.
2020-05-04 14:42:02 +02:00
Kubernetes Prow Robot
f372c5417b
Merge pull request #90628 from liggitt/pod-ip-status
Fix podIP validation
2020-04-30 19:30:07 -07:00
Amim Knabben
fe9eb1ba46 Migrating Kubelet testing flags to configuration 2020-04-30 22:12:39 -04:00
Jordan Liggitt
23e9fb1bb5 Fix podIP validation 2020-04-30 19:49:45 -04:00
cici37
7f4d19167e Move pkg/util/configz to k8s.io/component-base 2020-04-29 12:17:25 -07:00
Kubernetes Prow Robot
961a5ed144
Merge pull request #90380 from spiffxp/import-boss-test-files
Update import-boss files to yaml, include test files in CI job
2020-04-28 15:58:24 -07:00
Kubernetes Prow Robot
f7907083c2
Merge pull request #89160 from tedyu/symlink-first-seen
Remove potentially unhealthy symlink only for dead containers
2020-04-28 09:58:07 -07:00
Aaron Crickenberger
a7af20922f use forbiddenPrefixes instead of allowedPrefixes 2020-04-28 08:41:36 -07:00
Aaron Crickenberger
f306a0dbb4 convert .import-restrictions to yaml
yaml has comments, so we can explain why we have certain rules or
certain prefixes

for those files that weren't already commented yaml, I converted them to
yaml and took a best guess at comments based on the PRs that introduced
or updated them
2020-04-28 08:41:36 -07:00
Kubernetes Prow Robot
7fdc1275d9
Merge pull request #90377 from cbf123/container_cpuset_fixup_2
Fix exclusive CPU allocations being deleted at container restart
2020-04-27 13:40:04 -07:00
Kubernetes Prow Robot
561b2aba94
Merge pull request #90419 from klueska/upstream-update-reusable-cpus-strategy
Update strategy used to reuse CPUs from init containers in CPUManager
2020-04-27 12:09:23 -07:00
Chris Friesen
ab5870d808 Fix exclusive CPU allocations being deleted at container restart
The expectation is that exclusive CPU allocations happen at pod
creation time. When a container restarts, it should not have its
exclusive CPU allocations removed, and it should not need to
re-allocate CPUs.

There are a few places in the current code that look for containers
that have exited and call CpuManager.RemoveContainer() to clean up
the container.  This will end up deleting any exclusive CPU
allocations for that container, and if the container restarts within
the same pod it will end up using the default cpuset rather than
what should be exclusive CPUs.

Removing those calls and adding resource cleanup at allocation
time should get rid of the problem.

Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
2020-04-27 11:36:54 -06:00
Ryan Phillips
aecddc9f13 kubelet: add remote_runtime tracing at log level 10 2020-04-24 17:37:27 -05:00
Kubernetes Prow Robot
7297fbd0ce
Merge pull request #90413 from PurelyApplied/nil-expiry
Improve error message when refresh token expiry is nil.
2020-04-24 15:32:07 -07:00
Kubernetes Prow Robot
f8297af392
Merge pull request #90284 from wawa0210/kubelet-nodename-clean
Remove duplicate calculation nodename、hostname、hostnameOverridden when kubelet is initialized
2020-04-24 12:15:34 -07:00
Kubernetes Prow Robot
30cefca5a6
Merge pull request #89128 from vincent178/move-runonce-kubeletconfiguration
move runonce from flag to config
2020-04-23 17:20:07 -07:00
wawa0210
40da2c521a
Remove duplicate calculation nodename 、hostname 、hostnameOverridden 2020-04-24 07:49:33 +08:00
Patrick Rhomberg
5ea1cef4c5 gofmt fix. 2020-04-23 23:32:04 +00:00