Commit Graph

2270 Commits (9c099bf529333a1f0c30a1176a92af5e3b2f7a8c)

Author SHA1 Message Date
k8s-merge-robot 3680268c52 Merge pull request #18353 from deads2k/gv-use-constants
Auto commit by PR queue bot
2015-12-15 03:25:09 -08:00
k8s-merge-robot 25acc9bafa Merge pull request #18301 from yujuhong/remove_wait
Auto commit by PR queue bot
2015-12-15 02:51:55 -08:00
k8s-merge-robot 1f0e46abb8 Merge pull request #16237 from ZJU-SEL/fix-util
Auto commit by PR queue bot
2015-12-14 18:41:14 -08:00
Prashanth Balasubramanian b5303b9978 Tell kubernetes-master not to wait on flannel. 2015-12-14 09:47:09 -08:00
deads2k d0aaf13920 use constants for group names 2015-12-14 10:04:10 -05:00
Wojciech Tyczynski 960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
harry zhang 5405a5d98d Move atomic_value into folder
Change pkg to atomic
2015-12-14 05:50:29 +00:00
mqliang a21dd8a32b replace OsImage to OSImage 2015-12-12 15:53:34 +08:00
k8s-merge-robot 3d24d25fd8 Merge pull request #17764 from jiangyaoguo/make-containerspecchange-private
Auto commit by PR queue bot
2015-12-11 17:40:34 -08:00
Jeff Lowdermilk 9f3d28c788 Merge pull request #18305 from yujuhong/podfullname
Replace podFullName with format.Pod() in logging messages
2015-12-11 14:31:47 -08:00
Jeff Lowdermilk 9c49cdaa6e Merge pull request #18276 from thockin/airplane_validation_pt6
Validation cleanup parts 5 & 6 together
2015-12-11 13:34:37 -08:00
k8s-merge-robot 23baca87b5 Merge pull request #18232 from pwittrock/fsacct
Auto commit by PR queue bot
2015-12-11 00:48:09 -08:00
k8s-merge-robot 6b8eb902ce Merge pull request #17969 from dgonyeo/rkt_api_get_pods
Auto commit by PR queue bot
2015-12-10 23:13:37 -08:00
k8s-merge-robot caf4b1e47f Merge pull request #18191 from thockin/ingress-egress-annotations
Auto commit by PR queue bot
2015-12-10 23:01:26 -08:00
Tim Hockin 7fb8f60735 Shorten names for better reading 2015-12-10 11:48:19 -08:00
Tim Hockin 87a35047dd Move FieldPath and errors to a sub-package
This makes the naming and reading a lot simpler.
2015-12-10 11:48:16 -08:00
Random-Liu eb551f388c Fix potential data race 2015-12-10 10:35:02 -08:00
k8s-merge-robot 34c32a5615 Merge pull request #18498 from feihujiang/fixDocOfNetworkPluginVersion
Auto commit by PR queue bot
2015-12-10 09:44:32 -08:00
k8s-merge-robot 2ef2544faa Merge pull request #18237 from yifan-gu/refactor_getphase
Auto commit by PR queue bot
2015-12-10 06:55:02 -08:00
k8s-merge-robot 073661514e Merge pull request #18129 from yujuhong/fix_status
Auto commit by PR queue bot
2015-12-10 03:35:33 -08:00
feihujiang 5cfdcfd8f6 Fix the doc of network plugin version 2015-12-10 16:57:27 +08:00
Phillip Wittrock c67ce887f2 Volume Metrics Interface and base implementation.
- Add volume.MetricsProvider function to Volume interface.
- Add volume.MetricsDu for providing metrics via executing "du".
- Add volulme.MetricsNil for unsupported Volumes.
2015-12-09 16:06:24 -08:00
Derek Gonyeo 5a16b4751b rkt: rewrote GetPods to use rkt's api service
This involved adding annotations to the rkt pod's manifest that contain
information about the kubernetes pod, which is later read by the
kubelet.
2015-12-09 14:43:50 -08:00
Tim St. Clair 246442514c Expose Start method, don't call in constructor 2015-12-09 10:58:15 -08:00
Tim St. Clair 32794b18f0 Fix data race in prober test 2015-12-09 10:20:57 -08:00
Wojciech Tyczynski a915b8b29a Merge pull request #18080 from wojtek-t/list_options_in_listwatch
Pass ListOptions to List in ListWatch.
2015-12-09 14:27:51 +01:00
Yu-Ju Hong c646255579 Replace podFullName with format.Pod() in logging messages 2015-12-07 13:41:52 -08:00
Yu-Ju Hong fda73c04ec Change to include UID by default in formatting 2015-12-07 13:32:02 -08:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
Yu-Ju Hong e0d9ccde65 Minor clean up on checking container runtime status
Remove redundant function and consolidate the code.
2015-12-07 11:13:59 -08:00
Fabio Yeon 5457f5ace2 Merge pull request #18240 from timstclair/readiness
Update PodReady condition when updating container readiness
2015-12-07 10:43:22 -08:00
Abhi Shah bb3f49e526 Merge pull request #18089 from ArtfulCoder/oneNSAgain
SkyDNS is the only NS for Pods with DNSPolicy=ClusterFirst
2015-12-07 10:20:29 -08:00
Wojciech Tyczynski b0fcb5adef Pass ListOptions to List in ListWatch. 2015-12-07 11:53:53 +01:00
k8s-merge-robot 316a8ac41c Merge pull request #18073 from ingvagabund/garbage-collector-low-high-threshold-test
Auto commit by PR queue bot
2015-12-07 02:10:57 -08:00
jiangyaoguo 5f77f2b5a9 make PodContainerSpecChange private 2015-12-07 09:28:15 +08:00
k8s-merge-robot 810181fb7b Merge pull request #17278 from ZJU-SEL/fix-nil-tag
Auto commit by PR queue bot
2015-12-06 12:52:39 -08:00
k8s-merge-robot fc92833238 Merge pull request #17973 from liggitt/validate_node_name
Auto commit by PR queue bot
2015-12-05 13:23:26 -08:00
k8s-merge-robot e1230eb57e Merge pull request #17420 from Random-Liu/use-raw-pod-status-in-docker
Auto commit by PR queue bot
2015-12-05 12:16:04 -08:00
k8s-merge-robot 50af1d6550 Merge pull request #17756 from zhengguoyong/check_ref_before_use
Auto commit by PR queue bot
2015-12-05 10:52:56 -08:00
k8s-merge-robot 510949261a Merge pull request #17752 from yujuhong/docker_health
Auto commit by PR queue bot
2015-12-05 10:24:48 -08:00
Jordan Liggitt 7d10fd3591 Validate pod spec.nodeName 2015-12-05 11:34:09 -05:00
k8s-merge-robot 2f4d4d9e94 Merge pull request #17968 from dgonyeo/rkt_api_list_images
Auto commit by PR queue bot
2015-12-05 05:50:06 -08:00
Yifan Gu 4ac6129578 kubelet: Small refactor on GetPhase(). 2015-12-04 18:43:09 -08:00
Random-Liu 3cbdf79f8c Change original PodStatus to APIPodStatus, and start using kubelet internal PodStatus in dockertools 2015-12-04 17:37:39 -08:00
k8s-merge-robot c55b136ae2 Merge pull request #17149 from zhengguoyong/refactor_set_node_status
Auto commit by PR queue bot
2015-12-04 16:10:04 -08:00
Tim St. Clair 2430454eea Update PodReady condition when updating container readiness 2015-12-04 15:40:33 -08:00
Derek Gonyeo 7ae6bf9d39 rkt: rewrote ListImages to use rkt's API service 2015-12-04 11:25:56 -08:00
k8s-merge-robot 37d22999b4 Merge pull request #17572 from yujuhong/kubeutil
Auto commit by PR queue bot
2015-12-04 03:15:54 -08:00
zhengguoyong 08c6bab575 Refactor fun setNodeStatus 2015-12-04 19:00:33 +08:00
Tim Hockin 29a2fded52 Revert "Change to alpha/beta for bandwidth annotations"
This reverts commit 2f4c3035be.
2015-12-03 17:20:23 -08:00
Yu-Ju Hong c8a075ad62 Do not delete pod status entry when apiserver returns NotFound error
The logic doesn't apply to static pods as their corresponding mirror pod may
not have been created yet, or may be in the process of recreation. Deleting the
pod status immediately resets the version of the status for the static pod,
while the apiStatusVersion remains unchanged. This could lead to incorrect
versioning and hence stale pod status in the apiserver.
2015-12-03 13:11:48 -08:00
Yu-Ju Hong a4816b3bcb Make kublet/util/format.go a separate package
The formatting function is used often in logging. This improves the readability
by shortening the length of the call. Also change the fomartted string to
include the pod UID.
2015-12-03 12:47:36 -08:00
Tim Hockin e6df0b1a24 Convert validation to use FieldPath
Before this change we have a mish-mash of ways to pass field names around for
error generation.  Sometimes string fieldnames, sometimes .Prefix(), sometimes
neither, often wrong names or not indexed when it should be.

Instead of that mess, this is part one of a couple of commits that will make it
more strongly typed and hopefully encourage correct behavior.  At least you
will have to think about field names, which is better than nothing.

It turned out to be really hard to do this incrementally.
2015-12-03 08:19:44 -08:00
k8s-merge-robot f9715c6455 Merge pull request #17479 from mqliang/hardcode
Auto commit by PR queue bot
2015-12-03 06:13:15 -08:00
Marek Grabowski ffdfc68d11 Merge pull request #18075 from wojtek-t/only_list_options_in_list
Simplify List() signature in clients.
2015-12-03 10:38:33 +01:00
Marek Grabowski 348e7ecc5d Merge pull request #17349 from PeterLamar/master
Small readability improvements in Kubelet
2015-12-03 10:08:58 +01:00
Wojciech Tyczynski 6dcb689d4e Simplify List() signature in clients. 2015-12-03 09:54:07 +01:00
k8s-merge-robot 106cf2b6b5 Merge pull request #17755 from timstclair/status-manager
Auto commit by PR queue bot
2015-12-02 22:07:44 -08:00
Abhishek Shah 6c3a88cb3a SkyDNS is the only NS for Pods with DNSPolicy=ClusterFirst 2015-12-02 10:26:49 -08:00
k8s-merge-robot 8a8639d7af Merge pull request #17863 from wojtek-t/only_list_options_in_watch
Auto commit by PR queue bot
2015-12-02 06:28:28 -08:00
k8s-merge-robot 689586c6ae Merge pull request #16153 from gmarek/use_api_ports
Auto commit by PR queue bot
2015-12-02 05:57:49 -08:00
Jan Chaloupka 9590b23264 LowThresholdPercent can not be higher than HighThresholdPercent
if LowThresholdPercent > HighThresholdPercent, amountToFree at image_manager.go:208 is negative and image GC will not free memory properly.

Justification:

1) LowThresholdPercent > HighThresholdPercent implies (LowThresholdPercent * capacity / 100) > (HighThresholdPercent * capacity / 100)
2) usage is at least (HighThresholdPercent * capacity / 100)
3) amountToFree = usage - (LowThresholdPercent * capacity / 100)

Combining 1), 2) and 3) implies amountToFree can be negative.

What happens if amountToFree is negative? in freeSpace method, "for _, image := range images " loops at least once
and if everything goes fine, "delete(im.imageRecords, image.id)" is executed.
When checking for condition "if spaceFreed >= bytesToFree", it is always true as bytesToFree is negative
and spaceFreed is positive. The loop is finished, so is image GC.

At the end, only the oldest image is deleted. In situations where there is a lot of dead containers,
each container corresponing to distinct image, number of unused images can get higher.
If two new images get pulled in every 5 minutes, image GC will not work properly and will not free enough space.
Secondly, it will take a lot of time to free all unused images (hours depending on a number of unused images).

This is an incorrect configuration. Image GC should report it and refuse to work.
2015-12-02 14:28:51 +01:00
gmarek 459131fd92 Use KubeletPort reported in NodeStatus instead of cluster-wide master config, take 2. 2015-12-02 13:38:17 +01:00
k8s-merge-robot ac68536d44 Merge pull request #17832 from wojtek-t/list_options_in_list
Auto commit by PR queue bot
2015-12-02 02:34:17 -08:00
k8s-merge-robot 5e53e281e5 Merge pull request #17545 from yujuhong/no_auto_updates
Auto commit by PR queue bot
2015-12-02 02:03:08 -08:00
Fabio Yeon 7100d278e3 Revert "SkyDNS is the only NS for Pods with DNSPolicy=ClusterFirst" 2015-12-01 20:58:27 -08:00
k8s-merge-robot 4602220ad0 Merge pull request #15645 from ArtfulCoder/oneNS
Auto commit by PR queue bot
2015-12-01 13:51:37 -08:00
rob boll 81b9097a80 kubelet runonce: create data dirs 2015-12-01 14:03:02 -05:00
k8s-merge-robot 355ac2c58d Merge pull request #17581 from swagiaal/correct-management-predicates
Auto commit by PR queue bot
2015-12-01 06:42:15 -08:00
Wojciech Tyczynski 8343c8ce6c Pass ListOptions to List() methods. 2015-12-01 15:00:36 +01:00
Wojciech Tyczynski d2dfc912e6 Simplify Watch() signature in clients. 2015-12-01 14:19:26 +01:00
k8s-merge-robot a836b1e261 Merge pull request #17326 from caesarxuchao/grooupVersion-lastest
Auto commit by PR queue bot
2015-12-01 05:05:40 -08:00
Chao Xu 6e192760e3 refactoring latest.go GroupVersion;
clean up latest.go GroupVersions;
remove latest.GroupMeta.Group;
remove latest.GroupMeta.Version.
2015-11-30 11:30:21 -08:00
Sami Wagiaalla a7fc99933b Fix predicates for SELinux and ownership management 2015-11-30 10:31:28 -05:00
Harry Zhang 5552d7007c Add default when latest not claimed 2015-11-30 17:10:50 +08:00
harry zhang 121c7046aa Move parsers into util 2015-11-29 22:15:11 -08:00
jiangyaoguo f4c5d00b0c Implement a cachedNodeInfo in predicates 2015-11-27 21:49:14 +08:00
k8s-merge-robot 7cc83b347e Merge pull request #17607 from yifan-gu/rm_rkt_image_manager
Auto commit by PR queue bot
2015-11-27 01:49:00 -08:00
k8s-merge-robot 4eb010b1f7 Merge pull request #17694 from hongchaodeng/ratelimit
Auto commit by PR queue bot
2015-11-26 13:12:26 -08:00
Clayton Coleman 1d592e4c28 Unversioned types should not use ambiguous go-int
All external types that are not int64 are now marked as int32,
including
IntOrString. Prober is now int32 (43 years should be enough of an initial
probe time for anyone).

Did not change the metadata fields for now.
2015-11-26 11:45:25 -05:00
k8s-merge-robot 492782c942 Merge pull request #17401 from aaronlevy/condition_order
Auto commit by PR queue bot
2015-11-26 04:29:34 -08:00
k8s-merge-robot 39cabe3580 Merge pull request #17684 from Random-Liu/cleanup-gc-test
Auto commit by PR queue bot
2015-11-26 03:26:39 -08:00
Phillip Wittrock 6b358e43dd Merge pull request #17747 from saad-ali/fixErrorCreatingPDTry2
Refactor GCE wrapper library to allow execution from E2E test suite
2015-11-25 15:57:42 -08:00
Abhishek Shah 015df14a4a SkyDNS is the only NS for Pods with DNSPolicy=ClusterFirst 2015-11-25 15:02:40 -08:00
Aaron Levy 3dc7c64ce9 kubelet: report NodeReady last in status list
Addresses a version skew issue where the last condition status is always
evaluated as the NodeReady status. As a workaround force the NodeReady
condition to be the last in the list of node conditions.

ref: https://github.com/kubernetes/kubernetes/issues/16961
2015-11-25 11:53:31 -08:00
saadali 42b200a0a0 Refactor GCE wrapper library to allow execution from E2E test suite
This reverts commit 147b6911f5, reversing
changes made to 6fd986065b.
2015-11-25 11:48:06 -08:00
Random-Liu c6d02b83e5 Cleanup container_gc_test.go 2015-11-25 10:37:39 -08:00
k8s-merge-robot 3bd23b185b Merge pull request #17730 from wojtek-t/use_unversioned_list_options_in_client
Auto commit by PR queue bot
2015-11-25 09:10:19 -08:00
k8s-merge-robot ff3f240de2 Merge pull request #17533 from Random-Liu/fix-fake-docker-client
Auto commit by PR queue bot
2015-11-25 08:44:26 -08:00
Marek Grabowski 62009344cc Merge pull request #17761 from gmarek/flannel
Rebase of @bprashant Flannel out of the box
2015-11-25 16:04:35 +01:00
k8s-merge-robot 27c2f5fb52 Merge pull request #17526 from yifan-gu/rkt_api_service
Auto commit by PR queue bot
2015-11-25 06:24:55 -08:00
Prashanth Balasubramanian 9aa0efa393 Turn flannel off by default 2015-11-25 09:43:48 +01:00
Prashanth Balasubramanian ad2d3d4c20 Docs etc 2015-11-25 09:42:59 +01:00
Prashanth Balasubramanian 321bc73264 Flannel server in static pod with private etcd. 2015-11-25 09:42:59 +01:00
Prashanth Balasubramanian 7aa8ebe30f Flannel handshakes with kubelet. 2015-11-25 09:42:59 +01:00
k8s-merge-robot 3e56ce6490 Merge pull request #17327 from deads2k/gv-restmapper
Auto commit by PR queue bot
2015-11-24 19:08:49 -08:00
zhengguoyong 2b5a655a5d check ref before use it 2015-11-25 11:02:14 +08:00
k8s-merge-robot 431c67710b Merge pull request #17247 from thockin/airplane_validation_pt3
Auto commit by PR queue bot
2015-11-24 18:37:09 -08:00
Tim St. Clair d2532b50ce Correct backwards pod mappings
The mapping of static pod <--> mirror pod UIDs was backwards in a couple
places. Fortunately, they canceled each other out. Fixed, and added a
test case.
2015-11-24 18:32:44 -08:00
Yu-Ju Hong 26b6b18fad Remove docker health handler from kubelet /healthz
Docker's health is checked separately from kubelet by the processing monitoring
tool (e.g., supervisord). kubelet should not be killed when docker is down.
This change removes the docker health handler from kubelet's /healthz handler.
2015-11-24 17:22:55 -08:00
k8s-merge-robot d42030170b Merge pull request #15999 from aveshagarwal/master-issue-15624
Auto commit by PR queue bot
2015-11-24 17:07:10 -08:00
Tim St. Clair a1960b0a21 More detailed logging of pod status updates. 2015-11-24 10:48:28 -08:00
Wojciech Tyczynski b6ef62af24 Use unversioned.ListOptions in clients. 2015-11-24 16:52:09 +01:00
Avesh Agarwal 3d5207fd73 This commit adds type information to events.
This addresses issue #15624.
2015-11-24 09:59:54 -05:00
k8s-merge-robot 683e908f0a Merge pull request #17265 from gambol99/rj/node_labels
Auto commit by PR queue bot
2015-11-24 06:55:31 -08:00
deads2k 5077e9b644 make register.GroupVersion use GroupVersion 2015-11-24 09:45:36 -05:00
Hongchao Deng 13d152a873 RateLimiter: change CanAccept() to TryAccept() 2015-11-23 16:42:53 -08:00
Yifan Gu 5b423dd458 rkt: Refactor version check with api-service.
Also mocked systemd interfaces for testing purpose.
2015-11-23 16:30:51 -08:00
Tim Hockin ceee678b29 Rename validation 'New' funcs 2015-11-23 10:01:43 -08:00
Tim Hockin 682f2a5a79 Stronger typing for validation ErrorList 2015-11-23 10:01:43 -08:00
k8s-merge-robot 32c240b350 Merge pull request #17245 from thockin/airplane_validation_pt1
Auto commit by PR queue bot
2015-11-23 06:45:28 -08:00
Jerzy Szczepkowski 8a922e22be Revert "Refactor GCE wrapper library to allow execution from E2E test suite" 2015-11-23 09:24:32 +01:00
Tim Hockin 0ff66da346 Move fielderrors into validation 2015-11-22 20:12:20 -08:00
k8s-merge-robot 3fbf0cb810 Merge pull request #17276 from saad-ali/fixErrorCreatingPD
Auto commit by PR queue bot
2015-11-21 23:32:30 -08:00
k8s-merge-robot 7b281c946b Merge pull request #17270 from timstclair/mirrorpods
Auto commit by PR queue bot
2015-11-21 22:55:26 -08:00
k8s-merge-robot 8a306a7527 Merge pull request #17234 from Random-Liu/move-more-info-to-docker-label
Auto commit by PR queue bot
2015-11-21 10:45:09 -08:00
Yifan Gu 28e78f4fb8 rkt: remove rkt image manager.
This removes the dead code of rkt image manager as the generic
image manager is being used.
2015-11-20 16:30:51 -08:00
Daniel Smith 874b4f85d9 Merge pull request #17259 from yujuhong/raw_pod_status
kubelet: add RawPodStatus and related functions
2015-11-20 14:23:19 -08:00
Yu-Ju Hong 41a9ab388d Use 10s period for image pulling backoff
This is consistent with the container restart backoff period.
2015-11-20 11:57:56 -08:00
saadali 882469dd7b Refactor GCE wrapper library to allow execution from E2E test suite 2015-11-20 11:41:10 -08:00
Lantao Liu 90ac508524 Cleanup fake_docker_client.go and manager_test.go 2015-11-19 19:03:35 -08:00
Yu-Ju Hong dc42d25f4a kubelet: remove background updating thread in RuntimeCache
This feature is no longer useful pods don't sync as often. For batch
creation/deletions/syncs, the cache will be up-to-date for most pods since it
will be updated frequently. For other cases, continue updating for two more
seconds don't usually help, as temporal locality doesn't hold across pod syncs.
2015-11-19 17:25:51 -08:00
Dawn Chen 16fe4a8ada Fix a typo of NodeNotReady event. 2015-11-19 15:35:14 -08:00
Lantao Liu f08097515f Move more things into docke label, and add label test 2015-11-18 23:17:16 -08:00
mqliang 83fc12a8c0 hardcode supportedComputeResources 2015-11-19 13:20:02 +08:00
Yu-Ju Hong 759795592d rkt: correctly copy container status in GetPods() 2015-11-18 18:18:53 -08:00
Rohith c2526c93fa - adding the -node-label flag to the kubelet which allows for a initial tagging / labelling of the node on cluster registration
- the labels can come from a series of key=pair value or file:///path_to_file which contains key pairs
2015-11-18 23:20:58 +00:00
Abhi Shah 8c7c5ec117 Merge pull request #17307 from zhengguoyong/set_no_public_runonce
Use small letter var definition
2015-11-18 14:50:04 -08:00
Yu-Ju Hong 760309f349 kubelet: add RawPodStatus and related functions
RawPodStatus will be the internal status of the pod that kubelet relies on for
syncing.
2015-11-17 17:04:05 -08:00
k8s-merge-robot 9604988537 Merge pull request #16894 from alexhersh/manifest-fix
Auto commit by PR queue bot
2015-11-17 07:39:15 -08:00
k8s-merge-robot 1334401888 Merge pull request #17202 from brendandburns/fix2
Auto commit by PR queue bot
2015-11-17 00:49:13 -08:00
k8s-merge-robot 0c9bc3215d Merge pull request #14469 from thockin/intstr
Auto commit by PR queue bot
2015-11-16 23:20:37 -08:00
k8s-merge-robot 138a78db1f Merge pull request #16580 from jiangyaoguo/check-image-exist-after-pulled
Auto commit by PR queue bot
2015-11-16 22:53:34 -08:00
cephaslr aef7af1ba4 Rename kubelet variable pods to maxPods in kubelet pkg to match pods variable in kubelet cmd.
Remove comment requesting modification of mesos contrib file, dependencies should be maintained in unit tests
2015-11-16 20:15:40 -05:00
Jeff Lowdermilk 70d89a3541 Merge pull request #13571 from yujuhong/lifecycle_v0
kubelet: add a generic pod lifecycle event generator
2015-11-16 14:59:40 -08:00
Tim Hockin ba383bcfeb Refactor IntOrString into a new pkg
pkg/util/intstr is a cleaner encapsulation for this type and supporting
functions.  No behavioral change.
2015-11-16 10:57:52 -08:00
k8s-merge-robot 7fa85d430b Merge pull request #16614 from pmorie/ro-managed
Auto commit by PR queue bot
2015-11-16 10:46:44 -08:00
k8s-merge-robot ebe5649939 Merge pull request #16824 from mattmoor/master
Auto commit by PR queue bot
2015-11-16 09:12:35 -08:00
k8s-merge-robot 14eae4b48e Merge pull request #17303 from zhengguoyong/del_pod_api_selector
Auto commit by PR queue bot
2015-11-16 06:24:15 -08:00
k8s-merge-robot 081b21687e Merge pull request #16261 from zhengguoyong/update_condition
Auto commit by PR queue bot
2015-11-16 02:34:18 -08:00
zhengguoyong d5f2bb00a7 Del unused var 2015-11-16 15:53:20 +08:00
zhengguoyong b18a9baacc Use small letter var definition 2015-11-16 12:12:21 +08:00
Matt Moore b750d1dddc Drop the beta for GCR v2 images.
beta.gcr.io is no longer needed to pull through v2.
2015-11-14 12:19:02 -08:00
Paul Morie 911757486d Refactor volume.Builder.IsReadOnly() to volume.Builder.GetAttributes() 2015-11-13 23:34:48 -05:00
Tim St. Clair fbc5a7d034 Sync status to new mirror pods 2015-11-13 18:09:17 -08:00
Brendan Burns fb576f30c8 Refactor an interface for style 2015-11-13 15:56:27 -08:00
Yu-Ju Hong ac778e8203 Adjust the sync/backoff period
Set resyncInterval to one minute now that we rely on the generic pleg to trigger
pod syncs on container events. When there is an error during syncing, pod
workers need to wake up sooner to retry. Set the sync error backoff period to
10 second in this case.
2015-11-13 09:57:25 -08:00
Yu-Ju Hong bc6414a873 kubelet: add a generic pod lifecycle event generator
This change introduces pod lifecycle event generator (PLEG), and adds a generic
PLEG. The generic PLEG relies on relisting to discover container events, and is
container-runtime-agnostic. Both docker and rkt are changed to use generic
PLEG.
2015-11-13 09:55:36 -08:00
Yu-Ju Hong 3beae6b70b Add Status in the runtime Container type
This is necessary for the generic PLEG to distinguish container events.
2015-11-13 09:55:36 -08:00
k8s-merge-robot 0bb894173c Merge pull request #17187 from Random-Liu/deprecate-container-without-termination-message-path
Auto commit by PR queue bot
2015-11-13 04:49:17 -08:00
k8s-merge-robot 0d9f2dc5fd Merge pull request #17081 from yujuhong/docker_tests
Auto commit by PR queue bot
2015-11-12 22:56:29 -08:00
Alexander Hersh 0584f9ba7a Create mirrorPod in runOnce to update API before syncPod
+ Fix #14992
+ "When deploying a pod using an on-disk kubelet manifest (a la /etc/kubernetes/manifests), it appears that the network plugin setUpPod is notified of the new pod before the apiserver."
2015-11-12 15:35:45 -08:00
Lantao Liu 1018d32d4f Deprecate old containers without TerminationMessagePath label 2015-11-12 15:30:14 -08:00
k8s-merge-robot e88593d788 Merge pull request #14542 from vishh/kubelet-refactor
Auto commit by PR queue bot
2015-11-12 15:24:22 -08:00
k8s-merge-robot fbbc5a85a9 Merge pull request #16782 from Random-Liu/past-active-deadline-check
Auto commit by PR queue bot
2015-11-12 14:01:45 -08:00
k8s-merge-robot e80dd6689f Merge pull request #16866 from justinsb/zone_labels_on_nodes
Auto commit by PR queue bot
2015-11-12 07:25:37 -08:00
k8s-merge-robot 3080e7b3ca Merge pull request #17114 from apeeyush/fix-oom-comment
Auto commit by PR queue bot
2015-11-12 00:32:55 -08:00
Vishnu kannan b1770537ab Make cadvisor startup synchronous with container runtime initialization.
This is hopefully a temporary workaround.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2015-11-11 15:20:13 -08:00
Vishnu kannan 4ad3d6f5fe Move container manager into a separate package.
Inject container manager into Kubelet. This lets us stub out container
manager during integration testing.
2015-11-11 15:00:37 -08:00
Vishnu kannan 129dbc734c avoid requiring runtime to be up while initializing kubelet image manager 2015-11-11 15:00:37 -08:00
Vishnu kannan 89c3cb2f43 refactor podCIDR handling in kubelet to runtime state 2015-11-11 15:00:37 -08:00
Vishnu kannan 5f4570b764 handling locks and update tests. Fail node if network is not initialized 2015-11-11 15:00:37 -08:00
Vishnu kannan cf56f7a8ef Refactoring kubelet to separate object creation from object logical initialization. 2015-11-11 15:00:34 -08:00
k8s-merge-robot 8761ad3ec1 Merge pull request #15464 from jiangyaoguo/bubble-up-reason-when-killing-pod
Auto commit by PR queue bot
2015-11-11 14:17:27 -08:00
Lantao Liu d6b93cdfe1 Move active deadline check into main syncLoop of kubelet. 2015-11-11 10:05:04 -08:00
apeeyush ae259748ef Fix incorrect OOM score description in kubelet/qos
The multiplication factor is 10 and not 100 as clear from some other comments in the same file. Also mentioned at https://lwn.net/Articles/391222/.
2015-11-11 19:12:18 +05:30
k8s-merge-robot 0ee52eb0c8 Merge pull request #17102 from zhengguoyong/add_break
Auto commit by PR queue bot
2015-11-11 03:57:16 -08:00
zhengguoyong 79d97abac4 When find NodeReadyCondition, it can quit the loop 2015-11-11 16:15:01 +08:00
Yu-Ju Hong 543391f1dc Clean up unit tests using FakeDockerClient
Add a helper method to set the container map and list at the same time, without
having to specify them separately. This reduces the effort required for
adding/modifying tests as well as making the code more concise.
2015-11-10 16:51:35 -08:00
Tim St. Clair 67cfed5bf3 Don't wait for sync to update readiness
Push status updates as soon as readiness state changes for containers,
rather than waiting for the sync loop to update the status. In
particular, this should help new containers to come online faster.

Additionally, consolidates prober test helpers into a single file.
2015-11-10 14:00:12 -08:00
k8s-merge-robot 7b3f37a892 Merge pull request #17003 from jiangyaoguo/fix-error-sync-pod-message
Auto commit by PR queue bot
2015-11-10 04:01:28 -08:00
eulerzgy 3f630d8ad7 when pod has successed, update condition to PodCompleted 2015-11-10 15:37:44 +08:00
jiangyaoguo b0f0c294d9 make reasons constants with clarity 2015-11-09 23:42:14 +08:00
jiangyaoguo 55bf786216 adjust container event message 2015-11-09 23:42:13 +08:00
jiangyaoguo 02f8e4277f bubble up reason when killing pod 2015-11-09 23:42:13 +08:00
Wojciech Tyczynski 8a8f394f0d Merge pull request #16945 from kargakis/kubelet-fallback-to-apiserver
kubelet: Fallback to api server for pod status
2015-11-09 16:12:07 +01:00
k8s-merge-robot 5fe3733f95 Merge pull request #16272 from jiangyaoguo/remove-infra-container-event
Auto commit by PR queue bot
2015-11-09 06:05:35 -08:00
jiangyaoguo 85d554bfc4 fix FailSync event message 2015-11-09 15:49:52 +08:00
k8s-merge-robot 9981f99949 Merge pull request #16849 from feihujiang/cleanupDeprecatedV1beta1Content
Auto commit by PR queue bot
2015-11-07 04:15:32 -08:00
kargakis d519741e1b kubelet: Fallback to api server for pod status
This commit fixes getting the logs from complete/failed pods after
a kubelet restart by falling back to the api server in case we fail
to resolve the pod status using the status cache.
2015-11-06 21:15:40 +01:00
Tim St. Clair 1e88a682da Add liveness/readiness probe parameters
- PeriodSeconds - How often to probe
- SuccessThreshold - Number of successful probes to go from failure to success state
- FailureThreshold - Number of failing probes to go from success to failure state

This commit includes to changes in behavior:

1. InitialDelaySeconds now defaults to 10 seconds, rather than the
kubelet sync interval (although that also defaults to 10 seconds).
2. Prober only retries on probe error, not failure. To compensate, the
default FailureThreshold is set to the maxRetries, 3.
2015-11-06 10:46:40 -08:00
k8s-merge-robot a5e4462003 Merge pull request #16825 from Random-Liu/cleanup-pod-worker-test
Auto commit by PR queue bot
2015-11-05 21:51:32 -08:00
feihujiang eac8d6a997 Cleanup the content of deprecated V1beta1 2015-11-06 13:42:51 +08:00
jiangyaoguo 3b512add9c check image present after pulled image with no error 2015-11-06 10:58:55 +08:00
Justin Santa Barbara b2c2d617cf Label nodes with Zone information, if available
This lays the groundwork for simple multizone capabilities.

In a cloud environment, nodes are typically created by the kubelet
registering with the API server.  When creating a new node, we now query
the cloudprovider to see if it can provide Zone information, and if so
we add some well-known labels to the Node we are creating.
2015-11-05 14:35:05 -05:00
Yu-Ju Hong 5863f2a0a5 kubelet: reduce logging frequency for sync loop
Only logs when there are pods to sync.
2015-11-05 10:06:10 -08:00
k8s-merge-robot fb571e3e2e Merge pull request #16545 from timstclair/mirrorpods
Auto commit by PR queue bot
2015-11-05 02:56:23 -08:00
Lantao Liu a35220c321 cleanup pod_workers_test.go to use general runtime interface 2015-11-04 16:55:25 -08:00
Tim St. Clair 858126b42a Clean up static/mirror pod status logic
- status.Manager always deals with the local (static) pod, but gets the
  mirror pod when syncing
  - This lets components like the probe workers ignore mirror pods
2015-11-04 11:42:25 -08:00
Yu-Ju Hong b734155954 Clean up housekeeping routine in kubelet
Now that kubelet checks sources seen correctly, there is no need to enforce the
initial order of pod updates and housekeeping. Use a ticker for housekeeping to
simplify the code.
2015-11-04 08:12:18 -08:00
jiangyaoguo 39858db29e add new event when infra-container change 2015-11-04 17:04:32 +08:00
jiangyaoguo 3ce5a51007 remove implicitly required container event 2015-11-04 16:47:17 +08:00
Yu-Ju Hong 2eb17df46b kubelet: independent pod syncs and backoff on error
Currently kubelet syncs all pods every 10s. This is not preferred because
 * Some pods may have been sync'd recently.
 * This may cause all the pods to be sync'd at once, causing undesirable
   CPU spikes.

This PR replaces the global syncs with independent, periodic pod syncs. At the
end of syncing, each pod worker will enqueue itslef with a future timestamp (
current time + sync interval), when it will be due for another sync.
 * If the pod worker encoutners an sync error, it may requeue with a different
   timestamp to retry sooner.
 * If a sync is triggered by the update channel (events or spec changes), the
   pod worker would enqueue a new sync time.

This change is necessary for moving to long or no periodic sync period once pod
lifecycle event generator is completed. We will still rely on the mechanism to
requeue the pod on sync error.

This change also makes sure that if a sync does not succeed (either due to
real error or the per-container backoff mechanism), an error would be propagated
back to the pod worker, which is responsible for requeuing.
2015-11-03 13:29:08 -08:00
k8s-merge-robot fe2d44e842 Merge pull request #16653 from Random-Liu/remove-unused-type
Auto commit by PR queue bot
2015-11-03 02:45:22 -08:00
k8s-merge-robot c1d380db94 Merge pull request #16693 from Random-Liu/put-termination-message-path-into-docker-label
Auto commit by PR queue bot
2015-11-02 23:29:35 -08:00
Lantao Liu 894dc5a5a2 Move TerminationMessagePath into docker label. 2015-11-02 14:32:58 -08:00
Lantao Liu eff4533efc Move findPodContainer to docker_test.go 2015-11-02 09:49:07 -08:00
mqliang 3afcbae1a8 remove unnecessary fmt 2015-11-02 21:07:07 +08:00
Lantao Liu b127901871 Remove unused type DockerContainers.
Type DockerContainers and function FindPodContainer() are never used.
Remove them to simplify the docker runtime api.
2015-11-01 18:49:05 -08:00
k8s-merge-robot 7b8bf758f3 Merge pull request #16631 from dchen1107/docker
Auto commit by PR queue bot
2015-10-31 10:55:37 -07:00