Commit Graph

1869 Commits (236193a26d1c4a3e0646b46c8f0b0653c82a462b)

Author SHA1 Message Date
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
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