Commit Graph

72 Commits

Author SHA1 Message Date
Rodrigo Campos
ec0410a266
kubelet: Move userns manager to its own package
To that end, we need to add one kubelet getter listPodsFromDisk(). Other
than that, it is a pretty trivial move.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-03-13 22:28:04 +01:00
David Ashpole
64af1adace
Second attempt: Plumb context to Kubelet CRI calls (#113591)
* plumb context from CRI calls through kubelet

* clean up extra timeouts

* try fixing incorrectly cancelled context
2022-11-05 06:02:13 -07:00
Antonio Ojea
9c2b333925 Revert "plumb context from CRI calls through kubelet"
This reverts commit f43b4f1b95.
2022-11-02 13:37:23 +00:00
David Ashpole
f43b4f1b95
plumb context from CRI calls through kubelet 2022-10-28 02:55:28 +00:00
Ryan Phillips
205adec698 kubelet: increase log level for Path does not exist message 2022-09-21 14:16:44 -05:00
Adrian Reber
564f0e9a25
kubelet: add checkpoint/restore infrastructure
This adds the first infrastructure code parts to the kubelet
to support checkpoint/restore.

Signed-off-by: Adrian Reber <areber@redhat.com>
2022-07-14 10:27:40 +00:00
yxxhero
4fac7486d4 remove ioutil in kubelet
Signed-off-by: yxxhero <aiopsclub@163.com>
2022-04-27 21:08:42 +08:00
Lubomir I. Ivanov
7deac5e697 pkg/kubelet: improve the node informer sync check
GetNode() is called in a lot of places including a hot loop in
fastStatusUpdateOnce. Having a poll in it is delaying
the kubelet /readyz status=200 report.

If a client is available attempt to wait for the sync to happen,
before starting the list watch for pods at the apiserver.
2021-04-21 22:46:27 +03:00
afrouz
190b5250ec
Migrate pkg/kubelet/kubeletconfig to Structured Logging
Remove plg/kubelet/kubeletconfig/util/log

Co-authored-by: Elana Hashman <ehashman@redhat.com>
2021-03-15 15:42:34 -07:00
Kubernetes Prow Robot
55626cf2c6
Merge pull request #95301 from lorenz/pr-remove-dangling-volumes
Automatically remove orphaned pod's dangling volumes
2021-02-16 12:53:06 -08:00
Lorenz Brun
65c0229247 Fix comment on getPodVolumeSubpathListFromDisk 2021-01-31 02:42:54 +01:00
Kubernetes Prow Robot
4e93dbcd0d
Merge pull request #94087 from derekwaynecarr/node-sync-once
kubelet waits for node lister to sync at least once
2021-01-12 15:06:35 -08:00
Lorenz Brun
80e9bd30ea Automatically remove orphaned pod's dangling volumes 2020-12-21 19:15:26 +01:00
Dan Winship
971477d9b5 kubelet: Set dual-stack hostNetwork pod IPs on dual-stack nodes
Add nodeutil.GetNodeHostIPs to return dual-stack node IPs (in
dual-stack clusters), and make kubelet use it.
2020-10-07 17:26:04 -04:00
Srini Brahmaroutu
fbe5daed73 Change code to use staging/k8s.io/mount-utils 2020-09-16 21:51:24 -07:00
Derek Carr
752135242e WIP: node sync at least once 2020-09-01 12:17:26 -04:00
Jordan Liggitt
b181c76cbd Deflake TestUpdateNodeStatusWithLease - guard cached machineInfo 2020-08-05 10:00:36 -04:00
David Ashpole
1f70708f6c update cAdvisor to v0.37.0 2020-07-09 10:23:10 -07:00
Kubernetes Prow Robot
14c69640d0
Merge pull request #87166 from jingxu97/Jan/mountcheckfix
Fix issue in kubelet getMountedVolumePathListFromDisk
2020-06-25 09:45:39 -07:00
Jing Xu
7012994a61 Fix issue in kubelet getMountedVolumePathListFromDisk
This PR fixes issue #74650. It adds the extra check for /mount dir under
pod volume dir. It also adds the unit test for this function
2020-06-22 10:00:43 -07:00
Jin Hase
e6c1935355 Change status to status.Phase for removing unnecessary status information 2020-06-02 18:07:37 +09:00
Jin Hase
573e5c6b2f Migrate klog to klog.InfoS in pkg/kubelet 2020-06-01 19:36:55 +09:00
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
Ted Yu
36784331eb Sync the status of static Pods 2019-12-04 13:28:42 -08:00
Travis Rhoden
0c5c3d8bb9
Remove pkg/util/mount (moved out of tree)
This patch removes pkg/util/mount completely, and replaces it with the
mount package now located at k8s.io/utils/mount. The code found at
k8s.io/utils/mount was moved there from pkg/util/mount, so the code is
identical, just no longer in-tree to k/k.
2019-11-15 08:29:12 -07:00
Tim Allclair
f827863128 Inject owner references into mirror pods 2019-10-29 16:14:06 -07:00
Kubernetes Prow Robot
b8f03a12dd
Merge pull request #84294 from denkensk/remove-predicate-nodeinfo-kubelet
Remove predicates.NodeInfo dependency from kubelet
2019-10-28 17:48:56 -07:00
Alex Wang
b1a3fb4988 change kubelte nodeInfo to nodeLister 2019-10-24 22:46:59 +08:00
walter
d9e57861e5 This adds context from for cloud calls for Kubelet.
It continues the propogation started in #59287.
2019-10-14 22:01:22 -07:00
Tim Allclair
8a495cb5e4 Clean up error messages (ST1005) 2019-08-21 10:40:21 -07:00
Tim Allclair
3f510c69f6 Remove dead code from pkg/kubelet/... 2019-08-21 10:40:21 -07:00
Kubernetes Prow Robot
e476a60ccb
Merge pull request #73241 from vikaschoudhary16/selinux-label
Add correct selinux label at plugin socket directory
2019-05-20 11:07:17 -07:00
vikaschoudhary16
58d1b4d564 Add correct selinux label at plugin socket directory 2019-05-18 12:35:17 +05:30
JulienBalestra
27cccad822 Kubelet provides an updated and complete status of local-static Pods 2019-05-09 14:56:31 +02:00
Andrew Kim
84191eb99b replace pkg/util/file with k8s.io/utils/path 2019-01-29 15:20:13 -05:00
danielqsj
8092904e3c Cleanup PathExists callers 2019-01-08 22:16:11 +08:00
Michelle Au
8724b46623 Check for volume-subpaths directory in orpahaned pod cleanup 2018-12-26 10:49:28 -08:00
Renaud Gaubert
229418f261 Update pluginwatcher to ignore CSI metadata dir and non socket files 2018-11-17 01:51:00 +01:00
David Ashpole
630cb53f82 add kubelet grpc server for pod-resources service 2018-11-15 09:43:20 -08:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Derek Carr
a09990cd43 Apply pod name and namespace labels for pod cgroup for cadvisor metrics 2018-05-07 14:51:12 -04:00
Jing Xu
9bd006de40 Fix issue with race condition during pod deletion
This PR fixes two issues
1. When desired_state_populator removes podvolume state, it should check
whether the actual state already has the volume before deleting it to
make sure actual state has a chance to add the volume into the state
2. When checking podVolume still exists, it not only checks the actual
state, but also the volume disk directory because actual state might not
reflect the real world when kubelet starts.
2018-03-15 15:35:37 -07:00
Jing Xu
b2e744c620 Promote LocalStorageCapacityIsolation feature to beta
The LocalStorageCapacityIsolation feature added a new resource type
ResourceEphemeralStorage "ephemeral-storage" so that this resource can
be allocated, limited, and consumed as the same way as CPU/memory. All
the features related to resource management (resource request/limit, quota, limitrange) are avaiable for local ephemeral storage.

This local ephemeral storage represents the storage for root file system, which will be consumed by containers' writtable layer and logs. Some volumes such as emptyDir might also consume this storage.
2018-03-02 15:10:08 -08:00
David Ashpole
960856f4e8 collect metrics on the /kubepods cgroup on-demand 2018-02-17 12:32:40 -08:00
JulienBalestra
493f335830 kubelet: revert the get pod status 2018-02-15 22:24:35 +01:00
JulienBalestra
4c289014a0 Kubelet provides an updated and complete status of local-static Pods 2018-01-20 12:02:31 +01:00
Davanum Srinivas
7568462ec3 Remove hacks added for mesos
Since Mesos is no longer in your main repository and since we have
things like dynamic kubelet configuration in progress, we should
drop these undocumented, untested, private hooks.

cmd/kubelet/app/server.go::CreateAPIServerClientConfig
CreateAPIServerClientConfig::getRuntime
pkg/kubelet/kubelet_pods.go::getPhase

Also remove stuff from Dependencies struct that were specific to
the Mesos integration (ContainerRuntimeOptions and Options)

Also remove stale references in test/e2e and and test owners file
2017-12-03 13:52:30 -05:00
mtanino
8903e8cd85 BlockVolumesSupport: CRI, VolumeManager and OperationExecutor changes
This patch contains following changes.
- container runtime changes for adding block devices
- volumemanager changes
- operationexecutor changes
2017-11-20 14:10:26 -05:00
chentao1596
42845e19bf Delete redundant parameter flag 2017-10-17 08:31:50 +08:00
Davanum Srinivas
2a2b0cbffa Remove cmd/kubelet dependency from pkg/kubelet/volumemanager 2017-10-13 07:06:21 -04:00