Commit Graph

110 Commits

Author SHA1 Message Date
Davanum Srinivas
50bea1dad8
Move from k8s.gcr.io to registry.k8s.io
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-05-31 10:16:53 -04:00
Wojciech Tyczyński
6088fe4221 Remove no-longer used selflink code from kubelet 2022-01-14 10:38:23 +01: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
Skyler Clark
e9766c2b81
adds pinned field to imageRecords 2021-11-03 14:47:37 -04:00
Skyler Clark
d3ae0a381a
prevents garbage collection from removing pinned images 2021-11-02 14:43:02 -04:00
Kubernetes Prow Robot
cab54856f1
Merge pull request #104933 from vikramcse/automate_mockery
conversion of tests from mockery to mockgen
2021-09-30 18:33:21 -07:00
vikram Jadhav
0de4397490 mockery to mockgen conversion 2021-09-25 16:15:08 +00:00
wojtekt
53ce79a18a Migrate to k8s.io/utils/clock in pkg/kubelet 2021-09-10 12:20:09 +02:00
Kubernetes Prow Robot
5ead6af84e
Merge pull request #99994 from AfrouzMashayekhi/sl-cmd-kubelet
Migrate cmd/kubelet and pkg/kubelet/cadvisor , pkg/kubelet/cri/remote/util , pkg/kubelet/images to structured logging
2021-03-16 14:49:56 -07:00
Elana Hashman
10976cbb43
Migrate image_gc_manager.go to structured logs 2021-03-15 12:39:42 -07:00
afrouz
8f2e927b4a Migrate cmd/kubelet, image, cadvisor and cri to structured logging 2021-03-09 23:12:10 +03:30
Kubernetes Prow Robot
a4025a8462
Merge pull request #98986 from gjkim42/fix-runtime-assert
kubelet: Make the test fail if (*FakeRuntime).Assert fails
2021-03-04 18:34:33 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Geonju Kim
fc4a29da2c kubelet: Make the test fail if (*FakeRuntime).Assert fails 2021-02-26 06:31:54 +09:00
Marek Siarkowicz
7d309e0104 Move Kubelet Summary API to staging repo 2020-09-22 18:23:28 +02:00
Kubernetes Prow Robot
e24a42f07b
Merge pull request #88268 from mattjmcnaughton/mattjmcnaughton/delete-image-manager-TODO
Delete TODO in `image_gc_manager`
2020-06-20 17:12:38 -07:00
Kubernetes Prow Robot
86ad0df820
Merge pull request #92203 from sjenning/add-sjenning-node-approver
Add sjenning as kubelet approver
2020-06-19 21:52:02 -07:00
Kubernetes Prow Robot
d81ff3864c
Merge pull request #91945 from zhipengzuo/master
add namespaces info for logPrefix
2020-06-19 21:51:22 -07:00
Kubernetes Prow Robot
3d78928820
Merge pull request #91563 from SataQiu/fix-kubelet-20200529
Add duration to image pulling event
2020-06-19 21:50:39 -07:00
Seth Jennings
45d2b98aa8 add sjenning as kubelet approver 2020-06-19 13:00:55 -05:00
Kubernetes Prow Robot
677e8d6871
Merge pull request #86223 from dashpole/owners_changes
Add dashpole as kubelet approver
2020-06-18 22:59:58 -07:00
zhipengzuo
bc1e7c6958 add namespaces info for logPrefix 2020-06-09 20:36:09 +08:00
iamchuckss
2ff95f0d6a Add test coverage for throttledImageService 2020-06-09 07:36:40 +08:00
SataQiu
f1729b06d7 add duration to image pulling event 2020-05-29 15:01:02 +08:00
Kubernetes Prow Robot
f4112710f5
Merge pull request #90061 from marosset/runtimehandler-image-spec-annotations
Add annotations to CRI ImageSpec objects
2020-05-18 16:29:36 -07:00
Kubernetes Prow Robot
b170451caa
Merge pull request #90183 from dims/update-kubernetes-to-klog-v2
Update kubernetes to klog v2
2020-05-16 18:59:51 -07:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04: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
drfish
0b715ea690 Scheduler: remove direct import to /pkg/util/parsers 2020-04-26 23:41:52 +08:00
marosset
90367729a3 Adding/updating kubelet/kuberuntime tests 2020-04-20 22:25:05 +00:00
marosset
03479e4d12 kubelet - adding pod annotations to various image calls to get runtime-handler info to CRI 2020-04-17 23:57:09 +00:00
Haowei Cai
462b75388f let image cache do sort on write instead of on read to avoid data
race and improve efficienty
2020-03-10 15:33:34 -07:00
mattjmcnaughton
f5080850fc
Delete TODO in image_gc_manager
I think the TODO here may have actually been unnecessary. There isn't a
ton of interest around merging
https://github.com/kubernetes/kubernetes/pull/87425, which contains a
fix. Delete the TODO so we don't devote time to working on this area in
the future.
2020-02-18 08:35:29 -05:00
David Ashpole
fca84c02bb add dashpole as kubelet approver 2019-12-12 11:10:24 -08:00
mattjmcnaughton
1d2c96ad5e
Improve readability for image manager tests
Use named variables so boolean arguments are more readable.
2019-07-18 10:14:43 -04:00
Kubernetes Prow Robot
c64f81d082
Merge pull request #78653 from sjenning/add-sjenning-owners
kubelet: add sjenning to kubelet subdirectory owners files
2019-06-25 14:47:15 -07:00
Kubernetes Prow Robot
11abb58a5b
Merge pull request #78626 from tedyu/img-cache-mutex
Use Mutex for synchronization in imageCache
2019-06-14 07:59:18 -07:00
Seth Jennings
89dc2c65e4 kubelet: add sjenning to kubelet subdirectory owners files 2019-06-03 08:26:24 -05:00
Ted Yu
f6edee0fe1 Use Mutex for synchronization in imageCache 2019-06-01 15:48:55 -07:00
David Ashpole
a95cf017e1 add dashpole to kubelet owners files 2019-05-29 13:33:48 -07:00
Davanum Srinivas
33081c1f07
New staging repository for cri-api
Change-Id: I2160b0b0ec4b9870a2d4452b428e395bbe12afbb
2019-03-26 18:21:04 -04:00
Clayton Coleman
49250c6efc
Make container create, start, and stop events consistent
The messages for container lifecycle events are subtly inconsistent
and should be unified.

First, the field format for containers is hard to parse for a human,
so include the container name directly in the message for create
and start, and for kill remove the container runtime prefix.

Second, the pulling image event has inconsistent capitalization, fix
that to be sentence without punctuation.

Third, the kill container event was unnecessarily wordy and inconsistent
with the create and start events. Make the following changes:

* Use 'Stopping' instead of 'Killing' since kill is usually reserved for
  when we decide to hard stop a container
* Send the event before we dispatch the prestop hook, since this is an
  "in-progress" style event vs a "already completed" type event
* Remove the 'cri-o://' / 'docker://' prefix by printing the container
  name instead of id (we already do that replacement at the lower level
  to prevent high cardinality events)
* Use 'message' instead of 'reason' as the argument name since this is a
  string for humans field, not a string for machines field
* Remove the hash values on the container spec changed event because no
  human will ever be able to do anything with the hash value
* Use 'Stopping container %s(, explanation)?' form without periods to
  follow event conventions

The end result is a more pleasant message for humans:

```
35m         Normal    Created                       Pod    Created container
35m         Normal    Started                       Pod    Started container
10m         Normal    Killing                       Pod    Killing container cri-o://installer:Need to kill Pod
10m         Normal    Pulling                       Pod    pulling image "registry.svc.ci.openshift.org/openshift/origin-v4.0-2019-02-10-172026@sha256:3da5303d4384d24691721c1cf2333584ba60e8f82c9e782f593623ce8f83ddc5"
```

becomes

```
35m         Normal    Created                       Pod    Created container installer
35m         Normal    Started                       Pod    Started container installer
10m         Normal    Killing                       Pod    Stopping container installer
10m         Normal    Pulling                       Pod    Pulling image "registry.svc.ci.openshift.org/openshift/origin-v4.0-2019-02-10-172026@sha256:3da5303d4384d24691721c1cf2333584ba60e8f82c9e782f593623ce8f83ddc5"
```
2019-02-10 16:39:42 -05:00
Eric Lin
5e2ed11cf7 Pass PodSandboxConfig to PullImage method in CRI
Fix #71745
2018-12-07 10:10:22 +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
chestack
613f572caf Fix the confusing kubelet logs about imageGC 2018-09-29 18:09:37 +08:00
Pingan2017
158552ff35 fix golint failures - /pkg/kubelet/images 2018-09-17 10:52:25 +08:00
fqsghostcloud
21f9ac0e7e
indent error flow
indent error flow
2018-08-13 17:31:31 +08:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -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
Kubernetes Submit Queue
c7b3e163d3
Merge pull request #60448 from Random-Liu/image-cache-return-copy
Automatic merge from submit-queue (batch tested with PRs 59365, 60446, 60448, 55019, 60431). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Let image manager return a copy of image list.

Fixes https://github.com/kubernetes/kubernetes/issues/60443.
/cc @kubernetes/sig-node-pr-reviews 

**Release note**:

```release-note
none
```
2018-02-27 10:50:41 -08:00