Commit Graph

1934 Commits (4de560389ddb35be2c0f2695c0efae326da7959c)

Author SHA1 Message Date
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
Yu-Ju Hong cadc279505 Revert "kubelet: move all node status related methods to a separate file"
This reverts commit e7d1e47f31.
2015-09-21 11:06:38 -07:00
Yu-Ju Hong d7b9f8905f Revert "Move node information retreival to nodeManager"
This reverts commit 2369cd6401.
2015-09-21 11:00:04 -07:00
Yu-Ju Hong 7bdf9bfdfa Revert "Move and fix nodeManager related unit tests"
This reverts commit 865dc19957.
2015-09-21 10:58:54 -07:00
Scott Dodson 5de183cce7 Bump Container Inspect to loglevel 4 2015-09-21 13:28:43 -04:00
Paul Weil 20361e33f2 use infra container ns for ipc 2015-09-21 12:47:19 -04:00
k8s-merge-robot 843134885e Merge pull request #12470 from simon3z/add-host-ipc
Auto commit by PR queue bot
2015-09-21 09:15:01 -07:00
Quinton Hoole 851e3c1c24 Merge pull request #14218 from kubernetes/revert-13417-kubelet_tolerates_dead_cloud_api
Revert "Update node status even if cloudprovider API dies"
2015-09-18 19:01:41 -07:00
k8s-merge-robot 5d67c2ce1f Merge pull request #12894 from nikhiljindal/PodCondition
Auto commit by PR queue bot
2015-09-18 18:59:51 -07:00
Tim Hockin 6df2139d5a Revert "Update node status even if cloudprovider API dies" 2015-09-18 17:44:24 -07:00
k8s-merge-robot 8d7038eef0 Merge pull request #13825 from rootfs/path_len
Auto commit by PR queue bot
2015-09-18 14:44:33 -07:00
Tim Hockin 9698e957a6 Merge pull request #12717 from tamnd/fixdockercfg
Fix new docker config format for private registries
2015-09-18 14:43:38 -07:00
Federico Simoncelli f21d9ac9e4 Support pods with containers using host ipc
Add a HostIPC field to the Pod Spec to create containers sharing
the same ipc of the host.

This feature must be explicitly enabled in apiserver using the
option host-ipc-sources.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-09-18 21:13:39 +02:00
Huamin Chen 29bd6e738d review feedback
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-09-18 10:50:30 -04:00
Jonathan Wills ad085f78fe If an isolator's request is nil, populate it with the limit and vice versa.
The appc spec isn't currently clear about if both fields are required, and before rkt v0.8.1 if either field
was nil it would result in a crash.  Currently rkt will ignore isolators that don't have both fields set, so
I think this is a reasonable approach to making sure isolators are actually used.
2015-09-18 09:51:32 -04:00
nikhiljindal 6523ec142b Adding more fields to PodCondition 2015-09-18 05:26:13 -07:00
k8s-merge-robot 1a88be1aef Merge pull request #13417 from jfoy/kubelet_tolerates_dead_cloud_api
Auto commit by PR queue bot
2015-09-18 00:56:38 -07:00
k8s-merge-robot 73d71d6a67 Merge pull request #14096 from mvdan/util-duration
Auto commit by PR queue bot
2015-09-18 00:20:43 -07:00
Nikhil Jindal 9e5ed1dc69 Merge pull request #13880 from yujuhong/fix_annotations
Fix source annotation in kubelet
2015-09-17 23:28:41 -07:00
Daniel Martí 586cb9126a Move pkg/util.Time to pkg/api/unversioned.Time
Along with our time.Duration wrapper, as suggested by @lavalamp.
2015-09-17 17:51:27 -07:00
Tim St. Clair 1d0577286f Move the prober test from the docker manager_test.go to prober_test.go 2015-09-17 17:04:20 -07:00
Alex Mohr bdfd469a85 Merge pull request #14137 from caesarxuchao/13823
rebase 13823
2015-09-17 15:25:52 -07:00
Jack Foy ab9b53bdab Update node status even if cloudprovider API dies
kubelet will log errors when the cloudprovider API is unavailable, but
will continue to persist node updates using last-known addresses.

Without this change, all nodes are marked as NotReady, and eventually
controller-manager evicts all pods.
2015-09-17 15:16:18 -07:00
k8s-merge-robot c1eb1a1b2f Merge pull request #13791 from fgrzadkowski/fix_secrets_in_docker
Auto commit by PR queue bot
2015-09-17 15:13:29 -07:00
k8s-merge-robot 0749339357 Merge pull request #14045 from jiangyaoguo/add-message-for-reason-cache
Auto commit by PR queue bot
2015-09-17 14:54:47 -07:00
Kris f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
k8s-merge-robot 7cee028497 Merge pull request #13778 from smarterclayton/unready_endpoints
Auto commit by PR queue bot
2015-09-17 11:36:17 -07:00
k8s-merge-robot 7f68b9bc80 Merge pull request #14090 from yujuhong/node_status
Auto commit by PR queue bot
2015-09-17 11:14:11 -07:00
jiangyaoguo 0d1ca62530 Add message to reason cache in kubelet 2015-09-18 01:19:04 +08:00
feisky f1124eb0b1 Refactor image manager to operate on Runtime 2015-09-17 23:02:00 +08:00
Filip Grzadkowski 7fe34f2050 Introduce nsenter writer for volume plugins 2015-09-17 16:40:29 +02:00
Huamin Chen ad308cdf45 review feedback: remove RemoveAllSkipMountPoints since ReadDirNoExit already filters bad mountpoints
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-09-17 10:04:06 -04:00
Clayton Coleman bf2decce81 Add NotReadyAddresses to Endpoints
In many cases clients may wish to view not ready addresses for endpoints
in order to do set membership prior to a pod being ready. For instance,
a pod that uses the service endpoints to connect to other pods under
the same service, but does not want to signal ready before it has
contacted at least a minimal number of other pods.

This is backwards compatible with old servers and clients. There is
an additional cost in size of endpoints before services ramp up, which
will add minor CPU and memory use for services that have a significant
number of pods which have not become ready.
2015-09-17 09:41:56 -04:00
feihujiang 51f59f3c78 Fix the wrong path of document 2015-09-17 20:38:08 +08:00
k8s-merge-robot 445fde3dc5 Merge pull request #13447 from pweil-/pid-mode
Auto commit by PR queue bot
2015-09-16 23:34:35 -07:00
k8s-merge-robot d680ea2444 Merge pull request #13542 from yujuhong/backoff_restarts
Auto commit by PR queue bot
2015-09-16 23:11:42 -07:00
k8s-merge-robot d5a6466349 Merge pull request #14056 from yifan-gu/rkt_image
Auto commit by PR queue bot
2015-09-16 20:52:20 -07:00
k8s-merge-robot 2da93a48b1 Merge pull request #13864 from feiskyer/logs-follow
Auto commit by PR queue bot
2015-09-16 19:27:44 -07:00
Yu-Ju Hong 865dc19957 Move and fix nodeManager related unit tests 2015-09-16 17:41:40 -07:00
Yu-Ju Hong 2369cd6401 Move node information retreival to nodeManager
nodeManager should handle most node object interaction with apiserver. This
moves exsiting node-watching and GetNodes() methods to nodeManager.
2015-09-16 17:17:42 -07:00
Yu-Ju Hong e7d1e47f31 kubelet: move all node status related methods to a separate file
The methods for registering a node and syncing node status to the apiserver
have grown large enough that it makes sense for them to live in a separate
place. This change adds a nodeManager to handle such interaction with the
apiserver.
2015-09-16 17:17:42 -07:00
k8s-merge-robot 4c46bc3243 Merge pull request #13989 from yujuhong/sync_first
Auto commit by PR queue bot
2015-09-16 17:16:23 -07:00
Yifan Gu ad33db1a84 kubelet/rkt: bump rkt version for rkt image list fix. 2015-09-16 11:31:59 -07:00
k8s-merge-robot 22f698f5b0 Merge pull request #13953 from liguangbo/change_iff_to_if_and_only_if
Auto commit by PR queue bot
2015-09-16 08:35:20 -07:00
feisky 800e8fb54c Fix kubelet logs --follow bug 2015-09-16 22:06:50 +08:00
liguangbo 4df68f03a3 change iff to if and only if to improve annotation readability 2015-09-16 08:29:36 +00:00
k8s-merge-robot f6fb0a58b6 Merge pull request #13874 from timstclair/status-manager
Auto commit by PR queue bot
2015-09-16 00:46:01 -07:00
Jeff Lowdermilk a92c8b6886 Merge pull request #13384 from ZJU-SEL/portsbindings
Allow multiple host ports map to the same container port
2015-09-15 17:57:57 -07:00
Yu-Ju Hong 8f8541b4cd kubelet: make sure sync loop is run before performing housekeeping
Otherwise, kubelet may kill the existing pods before having a chance to update
the desired pods.
2015-09-15 13:11:55 -07:00
gmarek 4b8ddf3d7e Add information about ports opened by Kubelet to API 2015-09-15 14:24:55 -04:00
Paul Weil ed80c2b940 pid mode 2015-09-15 13:51:44 -04:00
k8s-merge-robot 27e8a11378 Merge pull request #13916 from tmrts/refactor/iota
Auto commit by PR queue bot
2015-09-14 21:11:58 -07:00
k8s-merge-robot 8189460809 Merge pull request #13844 from tummychow/label-deps-2
Auto commit by PR queue bot
2015-09-14 12:56:24 -07:00
Huamin Chen 45d4f7d6c2 Opening Pod volume dir could fail if for instance the directory has stale handle or directory is busy.
In such case, don't exit if the directory cannot be opened.

Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-09-14 14:43:44 -04:00
Yu-Ju Hong fb270779b5 kubelet: fix the config unit tests 2015-09-14 11:07:27 -07:00
Huamin Chen adf59896e0 when kubelet removes pod dir, it should skip those that still have unmounted volumes
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-09-14 13:50:08 -04:00
k8s-merge-robot 83fc0b783f Merge pull request #13923 from wojtek-t/fix_rv_0_errors
Auto commit by PR queue bot
2015-09-14 10:21:41 -07:00
Jeff Lowdermilk e25ae7fdb2 Merge pull request #13833 from caesarxuchao/central-latest
[WIP] Making a generic latest package
2015-09-14 09:26:58 -07:00
Wojciech Tyczynski 5da52558e6 Fix watch with RV=0 in Kubelet. 2015-09-14 16:45:58 +02:00
Tamer Tas 6908790410 Add a default value to PodConfigNotificationMode 2015-09-14 15:00:01 +03:00
tummychow a21c52a766 Move util/validation files to their own package 2015-09-13 00:46:52 -07:00
k8s-merge-robot 960b9e9564 Merge pull request #13867 from JanetKuo/qos-policy-bug
Auto commit by PR queue bot
2015-09-11 19:13:18 -07:00
Chao Xu 0b6fd8c5c4 fixing tests 2015-09-11 17:33:22 -07:00
Chao Xu dd6c121d7f massive changes 2015-09-11 17:31:47 -07:00
Yu-Ju Hong 2816c9df78 config_test: clean up unused function arguements 2015-09-11 17:18:29 -07:00
Yu-Ju Hong 69c3aa0872 Fix source annotation in kubelet
kubelet relies on source annotation to distinguish pods from different sources.
It should always annotate the source when receiving the pod to avoid any
confusion. This commit fixes that and also make sure we don't overwrite the
first seen time.
2015-09-11 14:52:16 -07:00
Mikaël Cluseau b76abf10cc hairpin: fix tests 2015-09-12 08:43:45 +11:00
Mikaël Cluseau 1ab520a59b pkg/util/exec: allow mocking of LookPath 2015-09-12 08:43:45 +11:00
Mikaël Cluseau 99a1cfa8ff hairpin support 2015-09-12 08:43:45 +11:00
k8s-merge-robot 6f01200188 Merge pull request #13727 from jiangyaoguo/fix-reason-reporting-in-kubelet
Auto commit by PR queue bot
2015-09-11 12:32:20 -07:00
Tim St. Clair 1f91fffb57 Move kubelet.statusManager to status.Manager
This refactor is in preparation for moving more state handling to the
status manager. It will become the canonical cache for the latest
information on running containers and probe status, as part of the
prober refactoring.
2015-09-11 12:22:01 -07:00
Janet Kuo 452ebed92b Fix the bug that qos class determination be incorrect with small numbers 2015-09-11 10:26:44 -07:00
k8s-merge-robot bff6ee8e4a Merge pull request #12695 from JanetKuo/kubectl-describe-pod-podstatus
Auto commit by PR queue bot
2015-09-11 08:08:32 -07:00
k8s-merge-robot bfc60709b1 Merge pull request #13468 from yifan-gu/rkt_doc
Auto commit by PR queue bot
2015-09-10 20:32:08 -07:00
jiangyaoguo 62c0c35307 Fix reporting reason in kubelet
1. Make reason field of StatusReport objects in kubelet in CamelCase format.
2. Add Message field for ContainerStateWaiting to describe detail about Reason.
3. Make reason field of Events in kubelet in CamelCase format.
4. Update swagger,deep-copy and so on.
2015-09-11 10:01:08 +08:00
Janet Kuo edc75cd565 Fix the bug that determining guaranteed qos won't work well with small numbers 2015-09-10 18:21:51 -07:00
Janet Kuo 22a794cc22 List resource QoS tier of each container when describing pods; Re-order resource table 2015-09-10 18:21:50 -07:00
Daniel Smith b225c1d47a Run gofmt (separate commit for easy rebases) 2015-09-10 17:17:59 -07:00
Daniel Smith 15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
k8s-merge-robot ee7168d868 Merge pull request #13815 from robertabbott/abbott/kubelet_get_instead_of_list
Auto commit by PR queue bot
2015-09-10 15:59:01 -07:00
Yifan Gu e7b9c50ba1 kubelet/rkt: add support for different stage1 image.
Also enable grace stop for service files.
2015-09-10 14:58:03 -07:00
tummychow 78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
Bobby Abbott 9a5f43e16d Kubelet#GetNode now uses GetNodeInfo instead of List
Both GetNode and the cache.ListWatch listfunc in the
kubelet package call List unnecessary.

GetNodeInfo is sufficient for GetNode and makes looping
through a list of nodes to check for a matching name
unnecessary.

resolves #13476
2015-09-10 10:50:41 -07:00
Chao Xu 002dcc6343 Merge pull request #13737 from wojtek-t/switch_to_node_in_registry
Rename "minion" to "node" in few places.
2015-09-09 17:49:22 -07:00
Wojciech Tyczynski cd1ac360de Rename "minion" to "node" in few places. 2015-09-09 16:18:23 +02:00
jiangyaoguo 1460a1fb9e Rate limit events in kubelet
1. Add EvnetRecordQps and EventBurst parameter in kubelet.
2. If  EvnetRecordQps and EventBurst was set, rate limit events in kubelet
with a independent ratelimiter as setted.
2015-09-09 16:57:21 +08:00
Wojciech Tyczynski b85d0557b4 Revert #13052 2015-09-08 09:40:12 +02:00
feihujiang d713826aa9 Add pod name to error message when getting logs of a container 2015-09-07 17:03:54 +08:00
Harry Zhang 7b2e2e5649 Fix tests and clear fmt mess in manager.go 2015-09-05 04:52:51 +00:00
k8s-merge-robot 2e2def36a9 Merge pull request #13581 from caesarxuchao/APIGroup-testapi-2
Auto commit by PR queue bot
2015-09-04 20:38:45 -07:00
Chao Xu 9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
k8s-merge-robot e6e69e31ec Merge pull request #13363 from mesosphere/abort-kubelet-syncloop
Auto commit by PR queue bot
2015-09-04 17:45:32 -07:00
k8s-merge-robot 24430525ac Merge pull request #13334 from pedro-r-marques/kubelet_annotation_update
Auto commit by PR queue bot
2015-09-04 17:07:31 -07:00
Quinton Hoole e188ea6a61 Merge pull request #13202 from jimmidyson/prometheus-with-no-cadvisor-port
Ensure container metrics are registered with prometheus even without cadvisor http server
2015-09-04 13:58:31 -07:00
James DeFelice de064f4254 fix kubelet syncLoop busy loop upon close of updates chan 2015-09-04 17:56:02 +00:00
Andy Goldstein c83786979c Various exec fixes
If stdin is noninteractive, the io.Copy from stdin to remoteStdin will
unblock when it finishes reading from stdin. In this case, make sure to
close remoteStdin so the server knows the client won't be sending any
more data. This ensures that the remote process terminates. For example:

echo foo | kubectl exec -i <pod> -- cat

Without this change, the `cat` process never terminates and `kubectl
exec` hangs.

Fix interactive exec sessions hanging after you type 'exit'.

Add e2e test to cover noninteractive stdin: `echo a | kubectl exec -i <pod>
cat`

Add e2e test to cover psuedo-interactive stdin: `kubectl exec -i <pod> bash`

Prep for sending multiple data frames over multiple streams in remote command
test, which is more likely to find flakes (requires bump of spdystream
once an issue with the frame worker queues not being fully drained when
a goaway frame is received).
2015-09-04 10:40:53 -04:00
Abhi Shah c9f2d3151b Merge pull request #13155 from derekwaynecarr/enforce_limits
Map cpu limits to cpu-quota in docker run
2015-09-03 16:28:04 -07:00
Abhi Shah d923e61dda Merge pull request #13397 from yujuhong/housekeeping
kubelet: define the housekeeping period
2015-09-03 15:46:29 -07:00
derekwaynecarr 5dc74e8dbf Add support for CFS quota in kubelet 2015-09-03 13:44:28 -04:00
markturansky 0e7f73ad67 expand volume.Spec to include full Volume and PV 2015-09-03 08:57:32 -04:00
Yu-Ju Hong 9cdb004851 kubelet: fix erratic restart count caused per-container restart backoff 2015-09-02 18:50:42 -07:00
Abhi Shah 067e76b509 Merge pull request #13348 from thockin/kubelet-masq-rule
Don't name 'eth0' in MASQUERADE rule
2015-09-02 09:54:31 -07:00
Brendan Burns ac958e5320 Merge pull request #12513 from brendandburns/tc2
integrate bandwidth shaping and the kubelet.
2015-09-02 09:44:10 -07:00
k8s-merge-robot f5c2d90c3a Merge pull request #12293 from deads2k/testclient-specific-reaction
Auto commit by PR queue bot
2015-09-02 09:18:24 -07:00
k8s-merge-robot cc811b3519 Merge pull request #13473 from yujuhong/check_volumes
Auto commit by PR queue bot
2015-09-02 07:32:57 -07:00
Marcin Wielgus 3e9932557d Merge pull request #13052 from pmorie/podip-fix
Fix race condition for consuming podIP via downward API
2015-09-02 16:04:01 +02:00
Yu-Ju Hong 08ec796995 kubelet: remove orphaned pod directories properly
PR #13293 added a safety check to not remove a pod directory if the child
volumes directory is not empty. This logic is faulty because kubelet may have
directory structures podUID/volumes/volumeKind/volumeName. E.g.,
`056db95d-50ee-11e5-a2e4-42010af0ba1d/volumes/kubernetes.io~empty-dir/default-token-al3r2`

This change fixes that by properly listing all volumes under a pod.
2015-09-01 15:39:17 -07:00
Brendan Burns 64717962cf Merge pull request #13211 from ashcrow/kubelet-disk-manager-tests
test: improved kubelet disk_manager coverage.
2015-09-01 10:10:07 -07:00
Brendan Burns 43e7c9b211 Merge pull request #13367 from spothanis/cinder
Cinder Volume Plugin
2015-09-01 10:05:15 -07:00
deads2k 7e180c258d update testclient for delegating reaction chain 2015-09-01 12:58:35 -04:00
k8s-merge-robot 5331a26c5b Merge pull request #13293 from yujuhong/pod_dir
Auto commit by PR queue bot
2015-09-01 04:59:55 -07:00
k8s-merge-robot 49475c3431 Merge pull request #13061 from yifan-gu/rkt_patch_events
Auto commit by PR queue bot
2015-09-01 04:10:18 -07:00
Yu-Ju Hong 13b268b378 kubelet: define the minimum housekeeping period
Before, kubelet performs global cleanup tasks every iteration. After the
PR #13003, kubelet performs the tasks on every sync internval (10 seconds).
This PR decouples the housekeeping period with the sync internval to ensure
that kubelet cleans up promptly, while not too often (no more than once every
minimum housekeeping period).
2015-08-31 17:28:20 -07:00
Paul Morie 4ff66bd70a Fix race exposing pod IP via downward API 2015-08-31 19:18:58 -04:00
Harry Zhang 18315db025 Allow multiple host ports map to the same port in container 2015-08-31 15:22:30 +08:00
Brendan Burns 9f3ef68ebc integrate bandwidth shaping and the kubelet. 2015-08-30 22:24:09 -07:00
k8s-merge-robot 4a7115d272 Merge pull request #11955 from pedro-r-marques/flag_resolv_conf
Auto commit by PR queue bot
2015-08-30 21:03:54 -07:00
Sreekanth Pothanis f5da6b34ce Cinder Volume Plugin 2015-08-30 19:56:27 -07:00
k8s-merge-robot 093614ec32 Merge pull request #13320 from yujuhong/fix_restarts
Auto commit by PR queue bot
2015-08-28 23:00:11 -07:00
Tim Hockin 1aca401813 Don't name 'eth0' in MASQUERADE rule
This causes endless loops of adding duplicate rules on machines without "eth0".
2015-08-28 22:32:30 -07:00
Pedro Roque Marques bf170a688c Update annotations in the kubelet.
When the pod annotations are updated in the apiserver, update the pod.
Annotations may be used to convey attributes that are required to the
pod execution, such as networking parameters.
2015-08-28 15:50:13 -07:00
Sami Wagiaalla ccd0fcd1f9 Rmove Hostname health check
The health check is no longer needed since health checks are no longer
run by master but updated by the kubelet; so a host with the incorrect
host name will not be updated and show 'NotReady' status

Signed-off-by: Sami Wagiaalla <swagiaal@redhat.com>
2015-08-28 16:53:02 -04:00
Yu-Ju Hong f707ca08d5 Fix incorrect restart count for docker containers 2015-08-28 11:54:30 -07:00
Prashanth B 05b205bab6 Revert "Volume Plugin for Cinder; Openstack Block Storage" 2015-08-28 10:56:24 -07:00
Prashanth B 8d0d54ffed Merge pull request #6689 from spothanis/cinder-vol-plugin
Volume Plugin for Cinder; Openstack Block Storage
2015-08-28 10:47:31 -07:00
Yu-Ju Hong 8774f6efa2 kubelet: don't remove any pod directory with non-empty volumes
If the volumes directory is not empty, it implies that volumes may not have
been properly cleaned up yet. Do not attempt to remove the pod directory.
2015-08-27 22:18:51 -07:00
Yu-Ju Hong 697197d383 Kubelet: do not remove pod directory if any container is still running
If there are any running container in the pod, we cannot remove the volume.
Therefore, we should not attempt to remove the pod directory.
2015-08-27 18:19:13 -07:00
Steve Milner 3181e5b913 test: improved kubelet disk_manager coverage. 2015-08-27 15:54:45 -04:00
Pedro Roque Marques 99b1da848d Add kubelet '--resolv-conf' flag.
Allow the user to specify the resolver configuration file that is used
to determine the default DNS parameters. This defaults to the system's
/etc/resolv.conf.
2015-08-26 15:41:36 -07:00
Yu-Ju Hong c7afae75f5 Merge pull request #13103 from yujuhong/restart_count
Kubelet: fix container restart counts
2015-08-26 15:13:10 -07:00
Yu-Ju Hong d839ab2024 Merge pull request #12940 from Miciah/Warning-to-Warningf
glog.Warning -> glog.Warningf
2015-08-26 13:36:05 -07:00
Yifan Gu 67e1589a08 kubelet/rkt: add created/started/failed/killing events.
Also improve the logging for rkt command line commands.
2015-08-26 10:39:10 -07:00
Yu-Ju Hong c237ac4c84 Merge pull request #13003 from yujuhong/decouple_workers
kubelet: trigger pod workers independently
2015-08-26 09:53:25 -07:00
Jimmi Dyson 3a6701c85f Ensure container metrics are registered with prometheus even without
cadvisor http server

Fixes #13200
2015-08-26 13:35:32 +01:00
Yifan Gu 6ced66249d kubelet/dockertools: clear container reference when killing a container. 2015-08-25 18:22:08 -07:00
Yu-Ju Hong b906e34576 kubelet: trigger pod workers independently
Currently, whenever there is any update, kubelet would force all pod workers to
sync again, causing resource contention and hence performance degradation.

This commit flips kubelet to use incremental updates (as opposed to snapshots).
This allows us to know what pods have changed and send updates to those pod
workers only. The `SyncPods` function has been replaced with individual
handlers, each handling an operation (ADD, REMOVE, UPDATE). Pod workers are
still triggered periodically, and kubelet performs periodic cleanup as well.

This commit also spawns a new goroutine solely responsible for killing pods.
This is necessary because pod killing could hold up the sync loop for
indefinitely long amount of time now user can define the graceful termination
period in the container spec.
2015-08-25 17:52:01 -07:00
Yu-Ju Hong 655645eb9c Merge pull request #13041 from yifan-gu/rkt_patch_fix
kubelet/rkt: merge environments instead of overriding.
2015-08-25 16:58:00 -07:00