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
Dawn Chen
d2805c65d6
Fix Kubelet /logs endpoint
2015-10-30 16:19:34 -07:00
Alex Robinson
0eb7243b95
Merge pull request #15994 from dchen1107/docker
...
Failed docker health check and mark the node NotReady when docker version is below 1.6.2 (API ve…
2015-10-30 15:39:04 -07:00
Dawn Chen
a39e1e96dc
Mark NodeNotReady for docker version below 1.6.2
2015-10-30 13:48:51 -07:00
Dawn Chen
b691fd299c
Failed docker health check when docker version is below 1.6.2 (API version: 1.18)
2015-10-30 13:48:50 -07:00
k8s-merge-robot
eb140495ab
Merge pull request #16414 from Random-Liu/put-podname-into-label
...
Auto commit by PR queue bot
2015-10-30 12:45:25 -07:00
Alex Robinson
21a75abfbd
Merge pull request #16489 from mqliang/deleteFmt
...
replace `fmt.Sptintf()` with naive string appending
2015-10-30 09:25:39 -07:00
Lantao Liu
b3585a5209
Move docker label related functions into labels.go and add pod name, pod namespace and pod uid into docker label
2015-10-29 22:42:25 -07:00
Clayton Coleman
2335bfa351
Allow Docker container logs to be tail'd and follow'd
...
Relaxes the very very ancient restriction we put in place to keep the
original API surface area PR small. Better to be consistent with actual
expected use of tail.
2015-10-29 17:12:38 -04:00
k8s-merge-robot
c4b32cc8d8
Merge pull request #16223 from timstclair/status-deadlock
...
Auto commit by PR queue bot
2015-10-29 13:01:31 -07:00
mqliang
5b03cfc92b
replace fmt.Sptintf() with + operator
2015-10-29 16:27:42 +08:00
Tim St. Clair
9a2089adc8
Concurrency fixes in status.Manager
...
- Fix deadlock when syncing deleted pods with full update channel
- Prevent sending stale updates to API server
- Don't delete cached status when sync fails (causes problems for prober)
2015-10-28 17:40:55 -07:00
Sami Wagiaalla
1d352a16b8
Support volume relabling for pods which specify an SELinux label
2015-10-28 09:26:58 -04:00
Jerzy Szczepkowski
1524d7490a
Merge pull request #16294 from aveshagarwal/master-fix-code-duplication
...
Fixes code duplication.
2015-10-28 13:23:06 +01:00
Daniel Smith
8524d392bf
Merge pull request #16178 from madhusudancs/kubelet-out-of-disk-no-master
...
Report node out of disk condition in the kubelet.
2015-10-27 14:28:03 -07:00
k8s-merge-robot
0a7a9f3535
Merge pull request #16340 from timstclair/flaky-prober
...
Auto commit by PR queue bot
2015-10-27 12:10:22 -07:00
Jerzy Szczepkowski
5ef087adab
Merge pull request #16266 from wojtek-t/fix_handshake_reflector
...
Reuse TCP connections in Reflector between resync periods.
2015-10-27 10:36:18 +01:00
k8s-merge-robot
df265b2d6e
Merge pull request #15510 from aveshagarwal/master-selflink-objref
...
Auto commit by PR queue bot
2015-10-27 00:37:21 -07:00
Tim St. Clair
17b0a964f4
Always resync after resyncInterval
2015-10-26 18:50:57 -07:00
Daniel Smith
3cc2ae4da6
Merge pull request #15831 from zhengguoyong/modify_pod_networkplugin_setup_errmsg
...
Modify duplicate err msg
2015-10-26 17:07:18 -07:00
Madhusudan.C.S
9c4424f0bd
Report out of disk as a node condition when node goes out of disk.
...
Define a new out of disk node condition and use it to report when node
goes out of disk.
Make a copy of loop range clause variable in node listers so that it
is available outside the for loop.
Also update/implement unit tests.
2015-10-26 15:01:20 -07:00
Daniel Smith
e42f5af6a1
Merge pull request #16219 from thockin/resolvconf-filter
...
Add a cloud-provider hook to scrub DNS for pods
2015-10-26 12:32:02 -07:00
Avesh Agarwal
e845dba9d2
Fixes code duplication.
2015-10-26 15:24:50 -04:00
Wojciech Tyczynski
d47e21f19f
Reuse TCP connections in Reflector between resync periods.
2015-10-26 19:35:25 +01:00
k8s-merge-robot
bffdd242d8
Merge pull request #16191 from yujuhong/fix_logs
...
Auto commit by PR queue bot
2015-10-26 09:31:35 -07:00
k8s-merge-robot
4f17b4b39c
Merge pull request #15961 from ncdc/stream-protocol-negotiation
...
Auto commit by PR queue bot
2015-10-25 07:26:41 -07:00
k8s-merge-robot
0e1ee14cc8
Merge pull request #15705 from wojtek-t/watch_options_in_client
...
Auto commit by PR queue bot
2015-10-24 17:39:20 -07:00
Abhi Shah
976cc12c8e
Merge pull request #16174 from ArtfulCoder/nilCheck
...
Added Nil Check
2015-10-24 14:16:28 -07:00
k8s-merge-robot
5280540384
Merge pull request #15965 from Random-Liu/use-docker-label
...
Auto commit by PR queue bot
2015-10-24 13:19:40 -07:00
Wojciech Tyczynski
f4d75e0a0a
Support timeout in watch requests
2015-10-24 13:12:49 +02:00
k8s-merge-robot
f3cb757bb6
Merge pull request #16074 from timstclair/prober-cleanup
...
Auto commit by PR queue bot
2015-10-24 03:14:42 -07:00
k8s-merge-robot
e1559e9fb5
Merge pull request #15352 from pmorie/fsgroup
...
Auto commit by PR queue bot
2015-10-24 01:55:45 -07:00
Tim Hockin
42c7fec490
Add a cloud-provider hook to scrub DNS for pods
...
GCE needs this hook and it seems general enough to include.
2015-10-23 17:01:49 -07:00
Yu-Ju Hong
e4f739115f
kubelet: fix getting logs from static pods
...
This change adds the necessary UID translation logic to fix the issue.
2015-10-23 14:31:40 -07:00
Lantao Liu
67a7633202
Put restart count into docker label
2015-10-23 13:02:32 -07:00
Abhishek Shah
4a7b4f2ed2
Nil Check
2015-10-23 11:52:59 -07:00
Filip Grzadkowski
165169ab1c
Merge pull request #16052 from ArtfulCoder/mount_etc_hosts
...
kubelet manages /etc/hosts file
2015-10-23 14:07:34 +02:00
Filip Grzadkowski
edd10d8a83
Merge pull request #15914 from vishh/serialize-pull
...
make kubelet image pulls serialized by default.
2015-10-23 14:04:23 +02:00
Vishnu kannan
0df4b46d4c
Adding a kubelet flag to optionally enable parallel image pulls.
2015-10-22 17:19:51 -07:00
Paul Morie
3cd12f5e05
FSGroup implementation
2015-10-22 16:40:59 -04:00
Abhishek Shah
ba6469d478
kubelet manages /etc/hosts file
2015-10-22 13:27:05 -07:00
Paul Morie
e3642f1b3f
Merge pull request #14705 from pmorie/pod-sc-inline
...
PodSecurityContext with inline fields
2015-10-22 03:12:16 -04:00
Andy Goldstein
ad4f108bfa
Move port forward protocol constant to subpackage
...
Move port forward protocol name constant to a subpackage underneath
pkg/kubelet to avoid flags applicable to the kubelet leaking into
kubectl. Eventually, handlers for specific protocol versions will move
into the new subpackage as well.
2015-10-21 22:37:26 -04:00
Andy Goldstein
ff9883d9ec
Address code review comments
2015-10-21 21:53:51 -04:00
Andy Goldstein
3d1cafc2c3
Add streaming subprotocol negotiation
...
Add streaming subprotocol negotiation for exec, attach, and port
forwarding. Restore previous (buggy) exec functionality as an
unspecified/unversioned subprotocol so newer kubectl clients can work
against 1.0.x kubelets.
2015-10-21 21:53:51 -04:00
Dawn Chen
a702d5f29b
Merge pull request #15983 from yujuhong/hash_pods
...
Stores hash of pod manifest in mirror pod's annotation
2015-10-21 17:08:57 -07:00
Paul Morie
393e2bc019
Inline some SecurityContext fields into PodSecurityContext
2015-10-21 19:01:17 -04:00
Tim St. Clair
07e9892003
Cleanup prober.prober
2015-10-21 15:45:34 -07:00
k8s-merge-robot
6dc3dcf36a
Merge pull request #15414 from thockin/exp-beta-annotations
...
Auto commit by PR queue bot
2015-10-20 17:45:32 -07:00
Yu-Ju Hong
f8aa206ffa
Stores hash of pod manifest in mirror pod's annotation
...
Use the hash to track whether the mirror pod is a truthful representation of
the static pod.
2015-10-20 15:44:31 -07:00
Vishnu kannan
94b45830c3
make kubelet image pulls serialized by default.
2015-10-20 14:50:44 -07:00
k8s-merge-robot
034f7ccb1d
Merge pull request #15885 from ashcrow/fix-import-package-names-15319
...
Auto commit by PR queue bot
2015-10-20 09:37:13 -07:00
k8s-merge-robot
59fdccd122
Merge pull request #15868 from yifan-gu/fix_gc
...
Auto commit by PR queue bot
2015-10-20 07:47:16 -07:00
k8s-merge-robot
f5da178738
Merge pull request #15275 from timstclair/liveness-workers
...
Auto commit by PR queue bot
2015-10-20 06:39:40 -07:00
Steve Milner
8da2d4002f
Fixes remaining imports per #15319
2015-10-20 07:13:13 -04:00
k8s-merge-robot
c4779fbc4f
Merge pull request #15475 from jijun2/fix-cni_test
...
Auto commit by PR queue bot
2015-10-20 01:30:24 -07:00
k8s-merge-robot
48ced9de86
Merge pull request #15612 from jimmidyson/cadvisor-kubelet
...
Auto commit by PR queue bot
2015-10-19 20:10:21 -07:00
eulerzgy
af355df9a4
modify err log msg
2015-10-20 09:08:27 +08:00
Tim St. Clair
a263c77b65
Refactor liveness probing
...
This commit builds on previous work and creates an independent
worker for every liveness probe. Liveness probes behave largely the same
as readiness probes, so much of the code is shared by introducing a
probeType paramater to distinguish the type when it matters. The
circular dependency between the runtime and the prober is broken by
exposing a shared liveness ResultsManager, owned by the
kubelet. Finally, an Updates channel is introduced to the ResultsManager
so the kubelet can react to unhealthy containers immediately.
2015-10-19 15:15:59 -07:00
Yifan Gu
c4de5b7451
kubelet/rkt: do not remove other systemd service.
2015-10-19 11:23:54 -07:00
k8s-merge-robot
02dd86c136
Merge pull request #15472 from zhengguoyong/del_unnessary_var_definition
...
Auto commit by PR queue bot
2015-10-19 03:33:11 -07:00
k8s-merge-robot
75c977d200
Merge pull request #15596 from zhengguoyong/alias_util_errors_packagename
...
Auto commit by PR queue bot
2015-10-19 02:35:37 -07:00
k8s-merge-robot
09a3871506
Merge pull request #15755 from zhengguoyong/del_capatical_packagename_for_cadvisorApi2
...
Auto commit by PR queue bot
2015-10-18 04:04:11 -07:00
eulerzgy
f8f9afb874
alias local packagename for pkg/util/errors
2015-10-18 09:37:46 +08:00
eulerzgy
760b2c901b
del unnessary var definition
2015-10-18 09:05:47 +08:00
k8s-merge-robot
d3ca12f61b
Merge pull request #15053 from smarterclayton/stdin_once
...
Auto commit by PR queue bot
2015-10-17 00:03:32 -07:00
k8s-merge-robot
70b231231b
Merge pull request #15798 from yifan-gu/rkt_gc_service
...
Auto commit by PR queue bot
2015-10-16 23:32:29 -07:00
k8s-merge-robot
d471318aa8
Merge pull request #15799 from dchen1107/podstatus
...
Auto commit by PR queue bot
2015-10-16 19:32:30 -07:00
Clayton Coleman
e929baf91a
Support stdinOnce, which allows run-once STDIN injection
...
This allows containers to wait for input before startup by listening
on STDIN, and after STDIN is closed, continue running. Matches the
Docker syntax.
2015-10-16 20:33:50 -04:00
k8s-merge-robot
916ddbca65
Merge pull request #14182 from jiangyaoguo/distinguish-registry-unavailable-and-pull-failure
...
Auto commit by PR queue bot
2015-10-16 16:22:22 -07:00
Dawn Chen
6f46780cbf
Add tests to reproduce the issue and verify the fix.
2015-10-16 15:16:07 -07:00
Dawn Chen
1b8f851979
Fix PodPhase issue caused by backoff
2015-10-16 15:16:07 -07:00
Yifan Gu
22467d9d33
kubelet/rkt: Fix a typo in container gc.
2015-10-16 15:07:43 -07:00
k8s-merge-robot
6341e1d3e2
Merge pull request #15658 from yifan-gu/rkt_cli
...
Auto commit by PR queue bot
2015-10-16 14:52:14 -07:00
k8s-merge-robot
0a5299cd63
Merge pull request #15114 from yifan-gu/rkt_log
...
Auto commit by PR queue bot
2015-10-16 14:00:39 -07:00
k8s-merge-robot
535090312f
Merge pull request #13180 from samsabed/backoff_e2e
...
Auto commit by PR queue bot
2015-10-16 13:33:36 -07:00
k8s-merge-robot
4736adee8f
Merge pull request #15621 from mesosphere/sttts-send-initial-set-to-get-seen
...
Auto commit by PR queue bot
2015-10-16 08:04:29 -07:00
k8s-merge-robot
6269e22858
Merge pull request #15194 from MikaelCluseau/wip-issue-15187
...
Auto commit by PR queue bot
2015-10-16 06:46:20 -07:00
k8s-merge-robot
668cb5de48
Merge pull request #14983 from dcbw/cni-fixes
...
Auto commit by PR queue bot
2015-10-16 05:28:12 -07:00
k8s-merge-robot
dc685dfee6
Merge pull request #15260 from yifan-gu/rkt_gc_systemd_service
...
Auto commit by PR queue bot
2015-10-15 22:16:11 -07:00
Mikaël Cluseau
0375743241
hairpin: unless the pod is on the host's network
2015-10-16 16:15:35 +11:00
Mikaël Cluseau
2067641284
hairpin: include command output when unable to query container's interface
2015-10-16 16:06:35 +11:00
eulerzgy
31c09bdcb8
Del capatical local packagename for cadvisorApi
2015-10-16 11:03:50 +08:00
Sam Abed
78979c77ce
backoff e2e tests
...
Signed-off-by: Sam Abed <samsabed@gmail.com>
2015-10-16 13:09:29 +11:00
jijun2
bf6e8cbff7
test: using ioutil.TempDir in unit tests per #15176
...
update
update mode
delete /tmp
update
use ioutil.TempDir instead of static tmp dir
use ioutil.TempDir instead of static tmp dir
2015-10-16 09:21:46 +08:00
Yifan Gu
9d01933e94
kubelet/rkt: garbage collect systemd service files in GarbageCollect().
2015-10-15 18:21:26 -07:00
Yifan Gu
0ef6af25c1
kubelet/rkt: update rkt version.
2015-10-15 18:04:07 -07:00
Jimmi Dyson
a5421270e5
cadvisor bump
2015-10-15 21:06:45 +01:00
eulerzgy
ea86e66fbe
Del capatical local packagename for kubeletUtil
2015-10-15 09:58:10 +08:00
Tim Hockin
2f4c3035be
Change to alpha/beta for bandwidth annotations
2015-10-14 15:33:19 -07:00
Yifan Gu
0a81443056
kubelet/rkt: fetch journal logs in json format.
...
This enables more fine-grained control over the things we want to
output. Also by closing the stdout/stderr of the journalctl process
when user hits `Ctrl-C` after `kubectl logs $POD -f`, this enables
the journalctl process to exit.
2015-10-14 12:02:52 -07:00
Dr. Stefan Schimanski
651f02aec2
Add unit tests for first empty SET
2015-10-14 16:35:25 +02:00
Dr. Stefan Schimanski
7dddec6799
Switch to empty ADD PodUpdate for PodConfigNotificationIncremental mode
2015-10-14 15:38:44 +02:00
Dr. Stefan Schimanski
5cfeb53057
Enforce an initial empty SET PodConfig
...
In PodConfigNotificationIncremental PodConfig mode, when no pods are available
for a source, the Merge function correctly concluded that neither ADD, UPDATE nor
REMOVE updates are to be sent to the kubelet. But as a consequence the kubelet will
not mark that source as seen.
This is usually not a problem for the apiserver source. But it is a problem for
an empty "file" source, e.g. by passing an empty directory to the kubelet for
static pods. Then the file source will never be seen and the kubelet will stay
in its special not-all-source-seen mode.
2015-10-14 14:22:44 +02:00
Wojciech Tyczynski
647aa1bc8c
Unify per-resource List for unversioned client
2015-10-14 08:37:57 +02:00
Dawn Chen
a529f6ccdf
Merge pull request #15512 from yujuhong/mv_pod_manager
...
kubelet: move PodManager and MirrorClient to a subpackage
2015-10-13 16:27:15 -07:00
Andy Goldstein
7d02ea9bb7
Fix race condition for consuming podIP via downward API.
2015-10-13 16:39:11 -04:00
Dawn Chen
535246f364
Merge pull request #15396 from derekwaynecarr/kernel_flags
...
Ensure panic_on_oom disabled
2015-10-13 10:24:50 -07:00
derekwaynecarr
0ec36ae210
Ensure panic_on_oom disabled
2015-10-13 11:24:32 -04:00
Yu-Ju Hong
2c76c55bb9
kubelet: move PodManager and MirrorClient to a subpackage
...
This change moves pod_manager.go and mirror_client.go to a separate package.
Also made necessary, minor changes to facilitate testing.
2015-10-12 16:34:18 -07:00
Avesh Agarwal
8e4a8b7260
Addresses issue #6596 .
...
Removes ForTesting_ReferencesAllowBlankSelfLinks.
Fixes controller's persistentvolumes unit tests.
2015-10-12 19:21:48 -04:00
Dawn Chen
5cab5f68e4
Merge pull request #15174 from yujuhong/syncloop_log
...
kubelet logs update source in the sync loop
2015-10-12 12:59:05 -07:00
Yu-Ju Hong
1c015560be
kubelet logs update source in the sync loop
...
This improve the clarity/debuggability.
2015-10-12 10:18:52 -07:00
feisky
296e44cc08
Delete infra container if network plugin fails
2015-10-12 23:23:17 +08:00
k8s-merge-robot
8580804f77
Merge pull request #15138 from mattmoor/limited-beta-rewrite
...
Auto commit by PR queue bot
2015-10-10 11:41:34 -07:00
k8s-merge-robot
3bd7aafcd2
Merge pull request #15082 from samsabed/restartNever
...
Auto commit by PR queue bot
2015-10-10 11:19:44 -07:00
k8s-merge-robot
02ec1fb33c
Merge pull request #13885 from smarterclayton/websocket_exec
...
Auto commit by PR queue bot
2015-10-10 09:52:01 -07:00
Mike Danese
392f33e417
Merge pull request #14054 from mikedanese/register-master
...
register master kubelet with the apiserver
2015-10-09 17:12:37 -07:00
Yifan Gu
ba68b095a9
kubelet/rkt: enable getting logs for exited pods.
2015-10-09 12:01:34 -07:00
Clayton Coleman
363b616908
Expose exec and logs via WebSockets
...
Not all clients and systems can support SPDY protocols. This commit adds
support for two new websocket protocols, one to handle streaming of pod
logs from a pod, and the other to allow exec to be tunneled over
websocket.
Browser support for chunked encoding is still poor, and web consoles
that wish to show pod logs may need to make compromises to display the
output. The /pods/<name>/log endpoint now supports websocket upgrade to
the 'binary.k8s.io' subprotocol, which sends chunks of logs as binary to
the client. Messages are written as logs are streamed from the container
daemon, so flushing should be unaffected.
Browser support for raw communication over SDPY is not possible, and
some languages lack libraries for it and HTTP/2. The Kubelet supports
upgrade to WebSocket instead of SPDY, and will multiplex STDOUT/IN/ERR
over websockets by prepending each binary message with a single byte
representing the channel (0 for IN, 1 for OUT, and 2 for ERR). Because
framing on WebSockets suffers from head-of-line blocking, clients and
other server code should ensure that no particular stream blocks. An
alternative subprotocol 'base64.channel.k8s.io' base64 encodes the body
and uses '0'-'9' to represent the channel for ease of use in browsers.
2015-10-09 14:33:40 -04:00
Yu-Ju Hong
ed382ec0a0
Merge pull request #15386 from yujuhong/rename_kubelettypes
...
Rename imported package local name kubeletTypes to kubetypes
2015-10-09 11:08:30 -07:00
k8s-merge-robot
96a2a95dee
Merge pull request #15276 from yifan-gu/rkt_probe
...
Auto commit by PR queue bot
2015-10-09 10:28:08 -07:00
Yu-Ju Hong
a3e60cc32e
Rename imported package local name kubeletTypes to kubetypes
...
According to the naming guidelines, package name should not include mixedCaps.
2015-10-09 10:24:31 -07:00
k8s-merge-robot
ac6122c562
Merge pull request #15274 from timstclair/results-manager
...
Auto commit by PR queue bot
2015-10-09 10:05:15 -07:00
k8s-merge-robot
273c9ce503
Merge pull request #15177 from timstclair/restart-policy
...
Auto commit by PR queue bot
2015-10-09 09:41:22 -07:00
k8s-merge-robot
45cca144cb
Merge pull request #15167 from yujuhong/sources_seen
...
Auto commit by PR queue bot
2015-10-09 08:35:40 -07:00
k8s-merge-robot
44699f5852
Merge pull request #15238 from mpuncel/mpuncel/cleanup
...
Auto commit by PR queue bot
2015-10-09 08:12:17 -07:00
k8s-merge-robot
b793c3edf1
Merge pull request #14700 from liggitt/kubelet_authz
...
Auto commit by PR queue bot
2015-10-09 03:01:43 -07:00
k8s-merge-robot
538cf72208
Merge pull request #15051 from feiskyer/kubelet/garbage-collection
...
Auto commit by PR queue bot
2015-10-09 02:11:47 -07:00
Jordan Liggitt
9d6b52881d
Add authentication/authorization interfaces to kubelet, always include /metrics with /stats
2015-10-09 03:10:00 -04:00
Mike Danese
fa60bbe8e6
add flag to kubelet to ignore the cidr passed down by the apiserver on the master
2015-10-08 21:21:19 -07:00
feisky
fb04edea3a
Replace rkt --grace-period and --expire-prepared with gcPolicy.MinAge
2015-10-09 06:57:10 +08:00
feisky
d624c7de51
Pass the ContainerGCPolicy in Runtime.GarbageCollect
2015-10-09 06:57:10 +08:00
feisky
69867fb502
Refactor container gc tests
2015-10-09 06:57:09 +08:00
feisky
4c8a836260
Move original container gc to docker runtime
2015-10-09 06:57:09 +08:00
feisky
35cf8ab7d4
Use runtime instread of dockerclient in container gc
2015-10-09 06:54:38 +08:00
Yu-Ju Hong
098ab05997
kubelet: move common types to kubelet/types
...
This would faciliate tasks such as moving code in pkg/kubelet to sub packages.
2015-10-08 14:38:01 -07:00
Yifan Gu
2c318bfee2
kubelet/rkt: return util/exec.ExitError if exec probing fails.
...
This enables the prober to return probe.Failure instead of
probe.Unknown.
2015-10-08 14:14:01 -07:00
Robert Bailey
f828c9a49c
Merge pull request #15185 from yujuhong/fix_annotation
...
kubelet: fix mirror pod creation/deletion
2015-10-08 14:07:45 -07:00
jiangyaoguo
af46c69553
Distinguish image registry unavailable and pull failure
2015-10-09 01:16:31 +08:00
Piotr Szczesniak
726f1e17c4
Merge pull request #14173 from runningwild/PR0
...
If an isolator's request is nil, populate it with the limit and vice versa
2015-10-08 13:07:08 +02:00
Piotr Szczesniak
95b293c615
Merge pull request #13516 from samsabed/backoff-image-reason
...
backoff image pulling on failure
2015-10-08 13:05:32 +02:00
Tim St. Clair
9b8bc50357
Generalize readinessManager to handle liveness
2015-10-07 16:40:30 -07:00
Dan Williams
823242d9a8
Add some more debugging to the CNI testcase
...
Let's attempt to find out why it's failing some small percentage of the time.
2015-10-07 17:24:44 -05:00
Tim St. Clair
551eff63b8
Use strong type for container ID
...
Change all references to the container ID in pkg/kubelet/... to the
strong type defined in pkg/kubelet/container: ContainerID
The motivation for this change is to make the format of the ID
unambiguous, specifically whether or not it includes the runtime
prefix (e.g. "docker://").
2015-10-07 10:58:05 -07:00
Michael Puncel
4921a62f3a
Fix comment typo and remove unnecessary line
2015-10-07 09:53:27 -07:00
Dawn Chen
092dddd12c
Merge pull request #15087 from derekwaynecarr/kernel_overcommit
...
Kubelet sets kernel overcommit_memory flag
2015-10-07 09:47:47 -07:00
Derek Carr
87fe1f4af8
Merge pull request #13939 from pmorie/pod-sc-minimal
...
Add PodSecurityContext and backward compatibility tests
2015-10-07 09:56:58 -04:00
Sam Abed
fdf712cd84
back-off image pull on failure
...
Signed-off-by: Sam Abed <samabed@gmail.com>
2015-10-07 21:12:42 +11:00
k8s-merge-robot
348f0ca335
Merge pull request #14686 from yifan-gu/rkt_gc
...
Auto commit by PR queue bot
2015-10-07 00:15:48 -07:00
k8s-merge-robot
5979655da1
Merge pull request #14949 from brendandburns/flakes10
...
Auto commit by PR queue bot
2015-10-06 21:01:33 -07:00
Sam Abed
e20d599ace
Apply pod restart policy to Containers that fail to start. Fix Reason and Message for succeeding or failing containers
...
Signed-off-by: Sam Abed <samsabed@gmail.com>
2015-10-07 12:20:28 +11:00
Matt Moore
eeb4eeb17c
Move pause and fluentd-elasticsearch to GCR v2.
...
This scopes down the initially ambitious PR:
https://github.com/kubernetes/kubernetes/pull/14960 to replace just
`pause` and `fluentd-elasticsearch` to come through `beta.gcr.io`.
The v2 versions have been pushed under new tags, `pause:2.0` and
`fluentd-elastisearch:1.12`.
NOTE: `beta.gcr.io` will still serve images using v1 until they are repushed with v2. Pulls through `gcr.io` will still work after pushing through `beta.gcr.io`, but will be served over v1 (via compat logic).
2015-10-06 16:39:07 -07:00
Yu-Ju Hong
53e65b0826
kubelet: fix mirror pod creation/deletion
...
When annotating the mirror pod, make a new copy of the annotations map from the
static pod, so that the change wouldn't be in the static pod.
2015-10-06 14:45:44 -07:00
Tim St. Clair
f67879eac7
Check pod RestartPolicy before restarting unhealthy containers
2015-10-06 13:17:45 -07:00
derekwaynecarr
970c369f31
Kubelet sets kernel overcommit_memory flag
2015-10-06 14:28:46 -04:00
Yu-Ju Hong
5abdfcdfe6
kubelet: fix all sources ready condition
...
The current implementation considers a source seen when it receives a SET at
kubelet/config/config.go. However, the main kubelet sync loop may not have
received the pod update from the source via the channel. This change ensures
that kubelet would consider all sources are ready only after the sync loop has
seen all the sources.
2015-10-06 10:13:04 -07:00
Paul Morie
227dd82119
Add PodSecurityContext and backward compatibility tests
2015-10-05 21:05:27 -04:00
Alex Robinson
99936383b0
Merge pull request #15079 from gmarek/fix-kubemark
...
Turn on smarter FakeDockerClient in HollowNode.
2015-10-05 17:00:49 -07:00
Yifan Gu
b42d2311c3
kubelet/rkt: add container/image gc for rkt.
2015-10-05 14:22:19 -07:00
Alex Robinson
2218ad0f86
Merge pull request #14845 from derekwaynecarr/kubectl_besteffort
...
Fix missing display of BestEffort resources in kubectl describe
2015-10-05 13:40:03 -07:00
Alex Robinson
d8120f5425
Merge pull request #14221 from timstclair/readiness-workers
...
Refactor readiness probing
2015-10-05 13:26:54 -07:00
gmarek
22b318fc5c
Turn on smarter FakeDockerClient in HollowNode.
2015-10-05 21:36:54 +02:00
derekwaynecarr
f062a29e34
Fix missing display of BestEffort resources in kubectl describe
2015-10-05 13:38:04 -04:00
Tim St. Clair
52ece0c34e
Refactor readiness probing
...
Each container with a readiness has an individual go-routine which
handles periodic probing for that container. The results are cached, and
written to the status.Manager in the pod sync path.
2015-10-02 15:37:10 -07:00
k8s-merge-robot
13382b30c4
Merge pull request #14950 from yujuhong/sync_type
...
Auto commit by PR queue bot
2015-10-02 12:39:00 -07:00
k8s-merge-robot
1d73382b83
Merge pull request #14958 from madhusudancs/fix-kubelet-messages
...
Auto commit by PR queue bot
2015-10-02 11:55:42 -07:00
k8s-merge-robot
6ca515c312
Merge pull request #14820 from gmarek/playground
...
Auto commit by PR queue bot
2015-10-02 07:37:45 -07:00
k8s-merge-robot
1bcdd56cf3
Merge pull request #12283 from ncdc/gh8766-port-forward-not-closing-correctly
...
Auto commit by PR queue bot
2015-10-02 04:48:12 -07:00
k8s-merge-robot
1b158fc466
Merge pull request #14706 from yifan-gu/rkt_get_status
...
Auto commit by PR queue bot
2015-10-02 02:25:44 -07:00
Madhusudan.C.S
7a709b09c3
Messages should be appended to "messages" slice.
...
Network configuration error message while setting Kubelet status was
being written to "reasons" slice. Write this message to "messages" slice
instead.
Also remove "reasons" slice entirely since it is not used anywhere.
2015-10-01 17:55:45 -07:00
Yu-Ju Hong
889e798ddb
kubelet: pipe SyncPodType to pod workers
...
Now that kubelet has switched to incremental updates, it has complete
information of the pod update type (create, update, sync). This change pipes
this information to pod workers so that they don't have to derive the type
again.
2015-10-01 16:29:46 -07:00
Brendan Burns
2afddde027
Deflake an exec test by removing global paths and making conflicts impossible
2015-10-01 16:16:06 -07:00
k8s-merge-robot
b19837f4e2
Merge pull request #14767 from nikhiljindal/podConditionTransitionTime
...
Auto commit by PR queue bot
2015-10-01 13:01:45 -07:00
gmarek
fc79ce347e
Allow usining FakeOOMAdjuster in Kubelet
2015-10-01 10:55:08 +02:00
Andy Goldstein
ed021fed4c
Port forwarding fixes
...
Correct port-forward data copying logic so that the server closes its
half of the data stream when socat exits, and the client closes its half
of the data stream when it finishes writing.
Modify the client to wait for both copies (client->server,
server->client) to finish before it unblocks.
Fix race condition in the Kubelet's handling of incoming port forward
streams. Have the client generate a connectionID header to be used to
associate the error and data streams for a single connection, instead of
assuming that streams n and n+1 go together. Attempt to generate a
pseudo connectionID in the server in the event the connectionID header
isn't present (older clients); this is a best-effort approach that only
really works with 1 connection at a time, whereas multiple concurrent
connections will only work reliably with a newer client that is
generating connectionID.
2015-09-30 20:03:49 -04:00
Tim Hockin
5fbcb72241
Merge pull request #14525 from dcbw/cni
...
CNI network plugin
2015-09-29 21:13:26 -07:00
Brendan Burns
5711f6d6e5
Merge pull request #14564 from erictune/fix-mac-test-2
...
Fix "make test" on mac (pkg/kubelet)
2015-09-29 19:29:35 -07:00
k8s-merge-robot
b661cfd21e
Merge pull request #14643 from liguangbo/change_Oom_to_OOM
...
Auto commit by PR queue bot
2015-09-29 18:54:22 -07:00
nikhiljindal
b99d225d19
Setting PodReadyCondition.LastTransitionTime
2015-09-29 17:23:32 -07:00
Dawn Chen
ca3ae476fc
Merge pull request #14599 from feiskyer/kubelet/client-server/image-refator
...
Refactor image manager for client/server container runtime
2015-09-29 09:33:59 -07:00
Yifan Gu
4309cafff1
rkt: return non error if the pod doesn't exist in GetPodStatus().
...
Previously, GetPodStatus() will return error if the pod is never
created. However we've never seen the sync loop fail because in the
beginning of the loop, if the pod is not found, it will be created.
This works fine except the pod that keeps crashing. Because the above
logic will keep restarting the pod as if it's never created.
This PR fixes the bug.
2015-09-28 19:30:57 -07:00
liguangbo
12299087da
Change Oom to OOM
2015-09-28 18:18:04 +08:00
Rajat Chopra
01dd813ce3
CNI network plugin
...
Add an experimental network plugin implementation named "cni" that
uses the Container Networking Interface (CNI) specification for
configuring networking for pods.
https://github.com/appc/cni/blob/master/SPEC.md
2015-09-25 22:30:37 -05:00
feisky
d25ae52d9b
Refactor image manager for client/server implementation of the container runtime
2015-09-26 08:29:08 +08:00
Yu-Ju Hong
d6aea667ba
Remove ContainerList from fakeRuntime
...
Container runtime interface currently doesn't support GetContainers and no
test should be using fakeRuntime.ContainerList. Remove it to prevent accidental
use.
2015-09-25 16:36:51 -07:00
Brian Grant
efd19143f7
Revert "Refactor image manager for client/server implementation of the container runtime"
2015-09-25 15:24:18 -07:00
Brian Grant
2c92672827
Merge pull request #14227 from gmarek/fake_docker
...
Fix 'ContainersMap' feature in fake-docker-client.
2015-09-25 13:20:33 -07:00
Brian Grant
bbc90cd9ff
Merge pull request #14035 from feiskyer/kubelet/client/server
...
Refactor image manager for client/server implementation of the container runtime
2015-09-25 13:18:53 -07:00
Eric Tune
f44e390ec2
Fix "make test" on mac (pkg/kubelet)
2015-09-25 09:26:08 -07:00
Salvatore Dario Minonne
32f56619a7
Partial fix for issue #14263
2015-09-25 15:29:00 +02:00
Brian Grant
bd3a3f1443
Revert "cni network plugin"
2015-09-24 23:24:21 -07:00
Brian Grant
7e42781d40
Merge pull request #14395 from vishh/kubelet-init
...
Require cpu and memory cgroups to be mounted
2015-09-24 22:43:25 -07:00
Brian Grant
17ecefe9f7
Merge pull request #13766 from rajatchopra/cni
...
cni network plugin
2015-09-24 22:42:31 -07:00
Vishnu kannan
77be271ed0
Linux container manager initialization will now fail if cpu and memory cgroups are not mounted.
2015-09-24 15:34:42 -07:00
Eric Tune
1ffa7cbc4f
Merge pull request #14290 from sdodson/container-inspect-ll4
...
Bump Container Inspect to loglevel 4
2015-09-23 16:42:07 -07:00
Eric Tune
c9c5937050
Merge pull request #14435 from yujuhong/runonce_test
...
Replace testDocker with container.fakeRuntime in runonce_test
2015-09-23 16:22:34 -07:00
Eric Tune
de38de0c1a
Merge pull request #14064 from brendandburns/flakes
...
Increase a bunch of timeouts to reduce flakes
2015-09-23 12:56:27 -07:00
Brendan Burns
77fd388485
Increase a bunch of timeouts to reduce flakes
2015-09-23 11:09:03 -07:00
Yu-Ju Hong
8319a5c822
Replace testDocker with container.fakeRuntime in runonce_test
...
runonce_test should not be testing docker-specific logic.
2015-09-23 09:24:51 -07:00
Rajat Chopra
fef621a254
TODO added to optimize Status call to plugin
2015-09-23 09:19:31 -07:00
gmarek
66ca7fcc92
Functionally revert #12894
2015-09-23 12:15:38 +02:00
gmarek
0a3f7787e7
Fix 'ContainersMap' feature in fake-docker-client.
2015-09-23 09:08:18 +02:00
Eric Tune
f92da0c714
Merge pull request #14323 from brendandburns/flakes2
...
Fix a flake in the kubelet test.
2015-09-22 13:36:22 -07:00
Rajat Chopra
4dc7485d94
cni network plugin
2015-09-22 11:16:41 -07:00
k8s-merge-robot
e535e27e82
Merge pull request #14279 from pweil-/ipc-followup
...
Auto commit by PR queue bot
2015-09-22 07:28:07 -07:00
Dawn Chen
a010e91913
Merge pull request #14292 from yujuhong/revert_node
...
Revert node status manager
2015-09-21 23:13:18 -07:00
k8s-merge-robot
c96c76b729
Merge pull request #13780 from smarterclayton/pod_logs
...
Auto commit by PR queue bot
2015-09-21 17:02:47 -07:00
Brendan Burns
e845c6a4e6
Fix a flake in the kubelet test.
2015-09-21 16:45:21 -07:00
Clayton Coleman
c2e90cd154
Support extended pod logging options
...
Increase the supported controls on pod logging. Add validaiton to pod
log options. Ensure the Kubelet is using a consistent, structured way to
process pod log arguments.
Add ?sinceSeconds=<durationInSeconds>, &sinceTime=<RFC3339>, ?timestamps=<bool>,
?tailLines=<number>, and ?limitBytes=<number>
2015-09-21 15:39:32 -04:00
Yu-Ju Hong
077158ef86
Rebase to use unversioned api
2015-09-21 11:14:14 -07:00