Commit Graph

184 Commits

Author SHA1 Message Date
Kubernetes Submit Queue
60ec6bf359
Merge pull request #64867 from dixudx/missing_container_ready_ltt
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

add missing LastTransitionTime of ContainerReady condition

**What this PR does / why we need it**:
add missing LastTransitionTime of ContainerReady condition

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
xref #64646

**Special notes for your reviewer**:
/cc freehan yujuhong

**Release note**:

```release-note
add missing LastTransitionTime of ContainerReady condition
```
2018-09-08 17:22:30 -07:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Di Xu
8285a26589 add missing LastTransitionTime of ContainerReady condition 2018-06-07 14:51:14 +08:00
Minhan Xia
370268f123 Inject ContainersReady 2018-06-05 11:10:38 -07:00
Minhan Xia
176f34ea07 Generate ContainersReady condition 2018-06-05 11:10:38 -07:00
Minhan Xia
ac4e015e12 trigger kubelet sync pod on reconciliation 2018-06-04 12:17:04 -07:00
Minhan Xia
d46cdbed6c Generate pod ready status with readiness gates 2018-06-04 12:16:56 -07:00
Minhan Xia
35777c31ea change kubelet status manager to use patch instead of put to update pod status 2018-05-30 11:15:47 -07:00
vikaschoudhary16
cedbd93255 Make 'pod' package to use unified checkpointManager
Signed-off-by: vikaschoudhary16 <choudharyvikas16@gmail.com>
2018-04-16 01:30:20 -04:00
Lantao Liu
19a1bd8b99 Fix PodScheduled bug for static pod.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-22 01:04:08 +00:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Dr. Stefan Schimanski
bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Joel Smith
5f6c022737 Prevent successful containers from restarting with OnFailure restart policy 2017-10-27 10:08:09 -06:00
Kevin
4c8539cece use core client with explicit version globally 2017-10-27 15:48:32 +08:00
Seth Jennings
449fc027d9 check for illegal container state transition 2017-10-25 23:06:35 -05:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Dr. Stefan Schimanski
ecb65a6a71 Update generated files 2017-10-07 11:28:47 +02:00
Dr. Stefan Schimanski
ed586da147 apimachinery: remove Scheme.DeepCopy 2017-10-06 14:59:17 +02:00
xiangpengzhao
8719b4a8ea Remove deprecated init-container in annotations 2017-08-25 13:39:29 +08:00
gmarek
0504cfbc25 Make metav1.(Micro)?Time functions take pointers 2017-08-17 11:24:28 +02:00
Ebbe Elsborg
a286f25ff4 Typed static/mirror pod UID translation 2017-08-14 14:51:26 +02:00
Jeff Grafton
a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton
33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Jacob Simpson
a765b8cfca Migrate api.Scheme to scheme.Scheme 2017-07-17 15:05:38 -07:00
Jacob Simpson
29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Shyam Jeedigunta
4425864707 Migrate kubelet configmap management logic to an interface 2017-05-31 10:39:36 +02:00
Yu-Ju Hong
ccfecb1ebd kubelet status manager: short-circut the evaluation if possible
This avoids redundant checks in the `PodResourcesAreReclaimed`, which
also logs misleading "Pod is terminated" messages on every check.
2017-05-30 15:58:40 -07:00
David Ashpole
21fb487245 wait for previous evicted pod to be cleaned up 2017-05-16 14:23:42 -07:00
Andrew Pilloud
b8dca4dd9d Refactor syncPod to fix panics on error 2017-05-04 10:18:24 -07:00
Chao Xu
4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Mike Danese
a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Kubernetes Submit Queue
e2d011e455 Merge pull request #41582 from dashpole/unit_test_status
Automatic merge from submit-queue (batch tested with PRs 42973, 41582)

Improve status manager unit testing

This is designed to simplify testing logic in the status manager, and decrease reliance on syncBatch.  This is a smaller portion of #37119, and should be easier to review than that change.

It makes the following changes:
- creates convenience functions for get, update, and delete core.Action
- prefers using syncPod on elements in the podStatusChannel to using syncBatch to reduce unintended reliance on syncBatch
- combines consuming, validating, and clearing actions into single verifyActions function.  This replaces calls to testSyncBatch(), verifyActions(), and ClearActions
- changes comments in testing functions into log statements for easier debugging

@Random-Liu
2017-04-03 14:05:17 -07:00
David Ashpole
58c32c5228 improve testing 2017-04-03 11:32:53 -07:00
Kubernetes Submit Queue
61f5f842e2 Merge pull request #42662 from wongma7/status
Automatic merge from submit-queue

Print dereferenced pod status fields when logging status update

Before: "Terminated:0xc421932af0"
After:"Terminated:&ContainerStateTerminated{ExitCode:0,Signal:0,Reason:Completed,Message:,StartedAt:0001-01-01 00:00:00 +0000 UTC,FinishedAt:2017-03-07 14:50:48 -0500 EST,ContainerID:docker://bd453bb969264b3ace2b3934a568af7679a0d51fee543a5f8a82429ff654970e,}"

"Ignoring same status for pod" messages already print status fully, these "Status for pod updated" messages should too IMO

```release-note
NONE
```
2017-03-30 10:33:41 -07:00
Kubernetes Submit Queue
6eaa8610a1 Merge pull request #42226 from timchenxiaoyu/reconciletypo
Automatic merge from submit-queue

fix reconcile typo
2017-03-24 10:25:27 -07:00
Kubernetes Submit Queue
ba25afd278 Merge pull request #40964 from tanshanshan/kubelet-unit-test
Automatic merge from submit-queue (batch tested with PRs 40964, 42967, 43091, 43115)

Improve code coverage for pkg/kubelet/status/generate.go

**What this PR does / why we need it**:

Improve code coverage for pkg/kubelet/status/generate.go  from #39559

Thanks.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-03-15 16:08:23 -07:00
tanshanshan
26ab52a3cb fix 2017-03-13 10:00:19 +08:00
David Ashpole
e3e0bc6ce0 do not skip pods that can be deleted 2017-03-09 09:35:50 -08:00
Matthew Wong
1dabce9815 Print dereferenced pod status fields when logging status update 2017-03-07 15:00:54 -05:00
timchenxiaoyu
4772931e63 fix reconcile typo 2017-02-28 13:50:25 +08:00
David Ashpole
1d38818326 Revert "Merge pull request #41202 from dashpole/revert-41095-deletion_pod_lifecycle"
This reverts commit ff87d13b2c, reversing
changes made to 46becf2c81.
2017-02-15 08:44:03 -08:00
David Ashpole
c612e09acd use the status we modify, not original 2017-02-14 13:36:20 -08:00
David Ashpole
b224f83c37 Revert "[Kubelet] Delay deletion of pod from the API server until volumes are deleted" 2017-02-09 08:45:18 -08:00
David Ashpole
67cb2704c5 delete volumes before pod deletion 2017-02-08 07:34:49 -08:00
Dr. Stefan Schimanski
44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski
79adb99a13 pkg/api: move Semantic equality to k8s.io/apimachinery/pkg/api/equality 2017-01-29 21:41:45 +01:00
Aleksandra Malinowska
74e1d8078e Revert "Delay deletion of pod from the API server until volumes are deleted" 2017-01-27 13:31:02 +01:00
Kubernetes Submit Queue
aace5a7b87 Merge pull request #40449 from deads2k/client-15-types
Automatic merge from submit-queue (batch tested with PRs 40239, 40397, 40449, 40448, 40360)

move the discovery and dynamic clients

Moved the dynamic client, discovery client, testing/core, and testing/cache to `client-go`.  Dependencies on api groups we don't have generated clients for have dropped out, so federation, kubeadm, and imagepolicy.

@caesarxuchao @sttts 

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-26 14:23:42 -08:00
deads2k
9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
David Ashpole
b1b9686c91 periodically check if pod can be deleted 2017-01-25 10:51:48 -08:00
David Ashpole
9094b57570 cleanup volumes before deleting from the api server 2017-01-25 10:21:15 -08:00
Clayton Coleman
be6d2933df
refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
Clayton Coleman
2bb2604f0b
Limit the size of the termination log and allow log input
Enforce the following limits:

12kb for total message length in container status
4kb for the termination message path file
2kb or 80 lines (whichever is shorter) from the log on error

Fallback to log output if the user requests it.
2017-01-23 12:26:38 -05:00
Wojciech Tyczynski
09e4de385c Enable nontrivial secret manager 2017-01-19 19:47:33 +01:00
Clayton Coleman
9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k
77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
NickrenREN
a12dea14e0 fix redundant alias clientset 2017-01-12 10:21:05 +08:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jeff Grafton
20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Mike Danese
161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Chao Xu
03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Mike Danese
c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Wojciech Tyczynski
e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu
bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu
b50367cbdc remove v1.Semantics 2016-11-23 15:53:09 -08:00
Chao Xu
5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
gmarek
795961f7e7 Add more logging around Pod deletion 2016-11-21 11:20:48 +01:00
Mike Danese
3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Yu-Ju Hong
47c49fc77c Log more information on pod status updates
Also bump the logging level to V2 so that we can see them in a non-test
cluster.
2016-10-13 14:07:09 -07:00
Random-Liu
1b1f2766ed Avoid StatusManager.syncPod when there is no corresponding mirror pod for static pod. 2016-09-07 17:03:15 -07:00
Paul Morie
dc8a9ae231 Fix nil in error message due to var shadowing 2016-08-19 11:23:19 -04:00
Ke Zhang
08d01a3879 refractoring findContainerStatus of status_manager 2016-08-05 17:52:02 +08:00
Andrey Kurilin
9f1c3a4c56 Fix various typos in kubelet 2016-08-03 01:14:44 +03:00
Michal Rostecki
59ca5986dd Print/log pointers of structs with %#v instead of %+v
There are many places in k8s where %+v is used to format a pointer
to struct, which isn't working as expected.

Fixes #26591
2016-08-01 22:27:56 +02:00
derekwaynecarr
c162fec94d Move ActiveDeadlineSeconds to use lifecycle observers 2016-07-07 13:43:55 -04:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Oleg Shaldybin
ab6ac7c94e Fix mirror pod identity change test
If mirror pod identity changes it actually doesn't get updated;
previously test was relying on an incorrect record pulled from a fake
clientset.
2016-06-28 11:54:13 -07:00
Tim St. Clair
f2f3caf744 Rename **/manager.go 2016-06-21 15:11:31 -07:00
Łukasz Oleś
2b46aea495 Custom sort function for InitContainersStatuses
Order in init container statuses should be the same as defined in pod.
Statues shoudln't be sorted by name.
2016-06-07 23:57:23 +02:00
Clayton Coleman
205a8b4574
Add init container loading to the kubelet 2016-05-17 00:29:53 -04:00
Random-Liu
cb6fe9e7ef Delete pod with uid as precondition. 2016-05-05 14:34:49 -07:00
Chao Xu
8537095415 use fully qualified resource in fake clients actions 2016-04-20 19:44:40 -07:00
goltermann
32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
goltermann
34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
harry
b0900bf0d4 Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
Yu-Ju Hong
0264ebdda1 kubelet: force status update when the deletion timestamp is set 2016-03-03 16:24:56 -08:00
Tim St. Clair
7b6d843309 Move test-only files to test-only packages 2016-03-01 09:11:32 -08:00
Yu-Ju Hong
866c52c8a9 kubelet: fix duplicated status updates at pod cleanup
cleanupTerminatedPods is responsible for checking whether a pod has been
terminated and force a status update to trigger the pod deletion. However, this
function is called in the periodic clenup routine, which runs every 2 seconds.
In other words, it forces a status update for each non-running (and not yet
deleted in the apiserver) pod. When batch deleting tens of pods, the rate of
new updates surpasses what the status manager can handle, causing numerous
redundant requests (and the status channel to be full).

This change forces a status update only when detecting the DeletionTimestamp is
set for a terminated pod. Note that for other non-terminated pods, the pod
workers should be responsible for setting the correct status after killling all
the containers.
2016-02-28 13:20:40 -08:00
Fabio Yeon
a56a315d99 Revert "kubelet: fix duplicated status updates at pod cleanup" 2016-02-26 14:39:11 -08:00
Yu-Ju Hong
99587b7e3a kubelet: fix duplicated status updates at pod cleanup
cleanupTerminatedPods is responsible for checking whether a pod has been
terminated and force a status update to trigger the pod deletion. However, this
function is called in the periodic clenup routine, which runs every 2 seconds.
In other words, it forces a status update for each non-running (and not yet
deleted in the apiserver) pod. When batch deleting tens of pods, the rate of
new updates surpasses what the status manager can handle, causing numerous
redundant requests (and the status channel to be full).

This change forces a status update only when detecting the DeletionTimestamp is
set for a terminated pod. Note that for other non-terminated pods, the pod
workers should be responsible for setting the correct status after killling all
the containers.
2016-02-24 21:23:41 -08:00
Tim St. Clair
15d44d182a Fix possible data race in prober 2016-02-22 10:27:57 -08:00
Wojciech Tyczynski
93a0eac476 Revert "kubelet: fix duplicated status updates at pod cleanup" 2016-02-22 14:27:49 +01:00
k8s-merge-robot
6716344d24 Merge pull request #21438 from yujuhong/terminated_pods
Auto commit by PR queue bot
2016-02-22 03:05:01 -08:00