Commit Graph

476 Commits (620af168920b773ade28e27211ad684903a1db21)

Author SHA1 Message Date
Victor Marmol a6d975c929 Remove pullLock from Kubelet.
The lock was only ever used to grab a read lock before container pulls.
2015-02-23 13:27:55 -08:00
Yifan Gu a631252abf Remove outdated const. 2015-02-23 11:00:38 -08:00
Victor Marmol da2f4b6d61 Check Docker init PID is valid before we use it.
This gives us an error if the PID is not returned as we expect.
2015-02-20 13:10:40 -08:00
Andy Goldstein 5bd0e9ab05 Add streaming command execution & port forwarding
Add streaming command execution & port forwarding via HTTP connection
upgrades (currently using SPDY).
2015-02-20 09:57:02 -05:00
Dawn Chen efac150039 Merge pull request #4563 from xiang90/syncpod
pkg/kubelet: recreate infra pod if the pod is changed
2015-02-20 00:29:26 -08:00
Dawn Chen 530c1559e1 Merge pull request #4647 from vmarmol/ooms
Make POD container last OOM victim
2015-02-20 00:25:52 -08:00
Victor Marmol 8649628c6c Make POD container last OOM victim.
Setting the oom_score_adj of the PID of the POD container to -100 which is less
than the default of 0. This ensures that this PID is the last OOM victim
chosen by the kernel.

Fixes #3067.
2015-02-19 19:24:01 -08:00
Daniel Smith b7b537efc7 fix confusing defer 2015-02-19 17:11:32 -08:00
Victor Marmol 40cb417901 Merge pull request #4531 from wojtek-t/batch_requests_in_kubelet
Batch updates of multiple Pods.
2015-02-19 10:50:26 -08:00
Jerzy Szczepkowski d614fc7fcc Fire event for pod when mount fails.
Implemented firing event for pod when mount of external volume fails. Fixes #4540.
2015-02-19 11:08:36 +01:00
Wojciech Tyczynski 702ad7732f Applied comments 2015-02-19 08:01:16 +01:00
Xiang Li 0e20f7d736 pkg/kubelet: recreate infra pod if the pod is changed 2015-02-18 15:05:16 -08:00
Wojciech Tyczynski 25c8f07c67 Batch updates of multiple Pods. 2015-02-18 16:46:16 +01:00
Dawn Chen bafa240187 Add debugging information for #4472 2015-02-17 13:28:15 -08:00
Clayton Coleman 4859aa7cd8 Merge pull request #4453 from derekwaynecarr/make_quota_more_efficient
Make ListWatch work with a ListFunc and WatchFunc
2015-02-17 14:48:11 -05:00
Xiang Li 042dc1faa3 pkg/kubelet: uncaptialize error message 2015-02-16 09:33:20 -08:00
Xiang Li 2437e94248 pkg/kubelet: fix wrong code path in runContainer 2015-02-16 09:32:37 -08:00
derekwaynecarr c0ce15c588 Make list watch take a ListFunc and WatchFunc, provide default funcs from client 2015-02-15 22:26:05 -05:00
Dawn Chen 20dc1c2481 Merge pull request #4410 from brendandburns/fixer
Don't delete the pod infrastructure container on health check failures.
2015-02-13 15:18:27 -08:00
Victor Marmol 5d6ad845cc Use Docker name (not ID) to parse Kubernetes components.
Since the parsing function doesn't return an error all the components
returned empty strings. This caused us to enforce the MaxContainerLimit
as a global limit instead of a per-container limit.

Fixes #4413.
2015-02-13 13:08:15 -08:00
Brendan Burns 4ad3ea438d Revert "Revert "Add an event for health check failures.""
This reverts commit fc4e711a8c.
2015-02-13 09:23:13 -08:00
Saad Ali fc4e711a8c Revert "Add an event for health check failures." 2015-02-13 08:10:45 -08:00
Saad Ali c112f8f1bb Merge pull request #4408 from brendandburns/printing
Add an event for health check failures.
2015-02-13 07:59:26 -08:00
Brendan Burns 5e49a606e1 Address changes. 2015-02-12 21:39:42 -08:00
Brendan Burns 8b7dfc9359 Return logs for failed and succeeded pods too. 2015-02-12 21:36:25 -08:00
Brendan Burns 4dbf98e98f Don't delete the pod infrastructure container on health check failures. 2015-02-12 21:28:32 -08:00
Brendan Burns c03a435501 Add an event for health check failures. 2015-02-12 19:08:23 -08:00
Eric Tune dd8f335380 Merge pull request #4376 from dchen1107/podstatus
Fix podstatus issue caused by docker's resource temporarily unavailable issue
2015-02-12 13:16:09 -08:00
Dawn Chen af54c62766 Fix podstatus issue caused by docker's resource temporarily unavailable error 2015-02-11 23:52:58 -08:00
Vishnu Kannan 922881fcd2 Improve error handling for '/containerLogs' API in kubelet. 2015-02-12 02:22:26 +00:00
Dawn Chen f5f2b6f773 Check if kubelet does know such Pod before querying status. 2015-02-11 10:16:04 -08:00
Mike Danese 3d0cd81feb refactor pkg/probe ProbeRunners to interfaces and move global probers into kubelet field for testability 2015-02-10 08:30:11 -08:00
Mike Danese 043794492e implement readiness. 2015-02-10 08:30:09 -08:00
Brian Grant 175e9caa55 Merge pull request #4194 from dchen1107/podstatus
Kubelet decides podStatus
2015-02-05 17:18:39 -08:00
Mike Danese 14bfec92f2 rename probe.Status to probe.Result. 2015-02-05 15:49:58 -08:00
Dawn Chen f762e062f2 Kubelet decides podStatus 2015-02-05 15:49:41 -08:00
Brendan Burns 8e6f5c7201 Merge pull request #3593 from commonlisp/master
Add timeouts to HealthChecks and retry checks
2015-02-05 15:40:22 -08:00
Brendan Burns 8b25b43039 Merge pull request #4117 from wojtek-t/validate_docker_version
Check Docker version in Kubelet /healthz handler
2015-02-05 10:06:33 -08:00
George Kuan e8c33b7916 Add timeouts to HealthChecks and retry checks
Fixes issue #3532. Added timeouts for HTTP and TCP checks
and enabled kubelet/probe to kubelet#maxRetries times
before declaring Failure.

Added Probe.TimeoutSecs to API

Probe variants now check container.LivenessProbe.TimeoutSeconds
Also added a test for timeouts in http_test.go.
2015-02-05 06:04:45 -08:00
Brendan Burns cfe5b14114 Wait until containers actually finish running before trying to clean up
volumes or pods.
2015-02-04 17:28:41 -08:00
Wojciech Tyczynski ead67108ce Use existing method to get Docker version. 2015-02-04 20:50:21 +01:00
Wojciech Tyczynski 78f66a6ce9 Check Docker version in Kubelet /healthz handler 2015-02-04 18:31:24 +01:00
chakri 9508b2bf12 Fix orphaned pod & volume cleanup order. Volumes need to be unmounted before pod cleanup. 2015-02-04 01:46:28 +00:00
Vishnu Kannan 5e36f63f8b Adding ResourceRequirementSpec to v1beta1, v1beta2, and v1beta3 APIs. The old resource
quantities 'CPU' and 'Memory' will be preserved until support for v1beta1 and v1beta2 APIs are
dropped.
Improved resource validation in the process.
2015-02-01 02:19:55 +00:00
Clayton Coleman 556e59b512 Merge pull request #3810 from ironcladlou/cache-namespacing
Support namespacing in cache.Store
2015-01-30 13:19:41 -05:00
Ye Yin 248624fc1f Add docker's add/drop capabilites 2015-01-30 15:09:31 +08:00
Dan Mace 5ee943d683 Support namespacing in cache.Store implementations
Support namespacing in cache.Store by framing the interface functions
around interface{} and providing a key function to each Store implementation.

Implementation of a fix for #2294.
2015-01-29 17:39:49 -05:00
Mrunal Patel 19e0605f5b Replace "net" by "pod infra" in docs and format strings. 2015-01-28 15:03:06 -08:00
Tim Hockin c8f61885df Merge pull request #3695 from mikedanese/ready
refactor pkg/health into more reusable pkg/probe
2015-01-28 11:00:32 -08:00
Paul Morie 962bdda0dc Fix typo in kubelet 2015-01-28 12:00:53 -05:00
Mike Danese 5dc6362f8a rename probe.Healthy to probe.Success and renam probe.Unhealthy to probe.Failure. 2015-01-27 11:20:30 -08:00
Mike Danese a298402bd4 remove pkg/health and move everything over to pkg/probe 2015-01-27 11:20:30 -08:00
Mrunal Patel b6a0ff1003 IP: Shared IPC. 2015-01-27 09:26:36 -08:00
Brian Grant dd45246150 Merge pull request #3587 from dchen1107/image
Clean up Kubernetes PullPolicy
2015-01-20 17:18:26 -08:00
Dawn Chen 2299c04cea Remove image GC.
Fix #3617,#3611, and #3393.
2015-01-20 13:43:08 -08:00
Dawn Chen 3101a33d32 Kubelet stop using api/helper.go for PullPolicy 2015-01-20 11:54:22 -08:00
Tim Hockin 6cb275829f Implement volumes as plugins.
Break up the monolithic volumes code in kubelet into very small individual
modules with a well-defined interface.  Move them all into their own packages
and beef up testing along the way.
2015-01-20 11:45:45 -08:00
Brendan Burns d54242a649 Merge pull request #3552 from commonlisp/master
Replace kubelet logging %s--%s--%s with dockertools.BuildDockerName()
2015-01-16 14:31:43 -08:00
Eric Tune 98bdd3f7c4 Test for and fix crash with nil client in kubelet.
Added test that fails before fix.
Fixed use of nil pointer.
2015-01-16 13:39:31 -08:00
Brendan Burns e86c8f9e53 Merge pull request #3565 from dchen1107/podstatus
Introduce PodStatusResult, and deprecate PodContainerInfo.
2015-01-16 12:05:07 -08:00
Dawn Chen 15e9fa8a9d Introduce PodStatusResult, and deprecate PodContainerInfo. 2015-01-16 09:10:40 -08:00
George Kuan af4bbd1a1b Replace kubelet logging %s--%s--%s with dockertools.BuildDockerName()
Fixes issue #3454
2015-01-15 19:47:54 -08:00
Daniel Smith 46f8a56dba Merge pull request #3376 from erictune/channel_api
Kublet watches Pods.
2015-01-15 14:48:12 -08:00
Eric Tune b759f67ee3 Kublet watches Pods.
Added a kubelet config source for watching pods on apiserver.
The pods are converted to boundpods for merging with other
config sources.

The preferred way to create a kubelet is now to pass an apiserver
client but not an etcd client.  Changed cmd/integration to use
apiserver to talk to kubelets.  And cmd/kubernetes.

Unit, integration, and e2e tests pass, except for a failure of the pd
e2e test which was unrelated.
2015-01-14 15:31:26 -08:00
Tim Hockin 1be3de895c Move util.UID to pkg/types 2015-01-14 15:22:21 -08:00
Daniel Smith c13ae34b02 Merge pull request #3445 from saad-ali/fix3172
Remove CONDITION from event object completely
2015-01-14 15:03:06 -08:00
Eric Tune 88c68e0349 Merge pull request #3331 from pmorie/services
Service visibility w/in namespaces, master services, set env vars in kubelet
2015-01-14 15:01:05 -08:00
saadali 90dfdcecd5 Remove CONDITION from event object completely
# *** ERROR: *** Some files have not been gofmt'd.  To fix these
# errors, run gofmt -s -w <file>, or cut and paste the following:
#   gofmt -s -w pkg/kubecfg/resource_printer.go pkg/proxy/config/config.go pkg/runtime/types.go
#
# Your commit will be aborted unless you override this warning. To
# commit in spite of these format errors, delete the following line:
#   COMMIT_BLOCKED_ON_GOFMT
2015-01-14 14:17:16 -08:00
Paul Morie fd834ae84d Pods should see services only from their own ns 2015-01-14 17:06:36 -05:00
Tim Hockin e86d4cd3c6 Use a strong type for UID fields 2015-01-14 13:53:43 -08:00
Tim Hockin ca89aa6528 Make data dirs for all pods when syncing 2015-01-13 17:18:21 -08:00
saadali 110ab6f1bd Split up kubelet "source seen" logic 2015-01-12 21:48:55 -08:00
Tim Hockin 905514a12b Ensure Namespace and UID are set in kubelet
Make all kubelet config sources ensure that UID and Namespace are defaulted, if
need be.

We can *almost* disable the "if blank" logic for UID, except for tests that
call APIs that do not run through SyncPods.  We really ought to be enforcing
invariants better.
2015-01-12 14:27:34 -08:00
Tim Hockin af0e2fd551 Merge pull request #3403 from thockin/klet-dirs-structure
Apply more structure to pod data dirs
2015-01-12 14:19:22 -08:00
saadali e1917cf900 Fix "Kubelet doesn't kill old pods when BoundPods is empty" issue 2015-01-12 12:39:47 -08:00
Tim Hockin 523a80bec7 Apply more structure to pod data dirs
This is makes it possible to read back "known" pods from disk without
getting other (non-pod) kubelet dirs in the mix.  Ditto for containers
within a pod.  This is just saner overall.  Pods now nest in a pods/
dir.  Likewise containers.
2015-01-12 06:16:32 -08:00
Eric Tune 29d084c4d3 Pass client into Kubelet.
Subsequent PR will make use of it.
2015-01-08 15:35:17 -08:00
Tim Hockin eac982137f Merge pull request #3260 from commonlisp/master
NewMainKubelet validates SyncFrequency, minimum GC age, etc.
2015-01-08 08:20:55 -08:00
George Kuan 06475fc4b4 NewMainKubelet validates Kubelet config parameters
Fixes issue #3202.
* Validates SyncFrequency and minimum GC age and propagates error to RunKubelet
* Defaults for Kubelet config and minor cleanup
* cmd Kubelet MinimumGCAge to 1m instead of 0
2015-01-07 18:50:53 -08:00
Daniel Smith 95dd2d7ca6 reuse function; never ever unlock without defer 2015-01-07 17:07:12 -08:00
Tim Hockin 5f2dae4dd8 Merge pull request #3195 from lavalamp/numericWire
Add numeric type into api
2015-01-07 16:15:52 -08:00
Daniel Smith 7f49ba0dcf Put quantity into packages
kubelet, GCE, validation, client
2015-01-07 15:21:34 -08:00
Clayton Coleman ba53d723d3 Clean up how client is passed to Kubelet in preparation for reading pods
Also fixes how Kubelet server looks up pods by name when there are multiple
sources.
2015-01-07 14:40:37 -05:00
Brendan Burns 7c69570663 Add a lock around the other docker pull.
Fixes e2e (I hope), certainly passes e2e in my client.
2015-01-07 00:17:57 -08:00
Brendan Burns 733e12e19b Revert "Avoid race between image pull and garbage collect"
This reverts commit 6f14e2e210.
2015-01-06 23:23:23 -08:00
Brendan Burns e84b4d03a4 Merge pull request #3183 from anguslees/pull-lock
Avoid race between image pull and garbage collect
2015-01-06 21:23:29 -08:00
saadali d6d18a32e7 Replace %s with %q to make empty strings more obvious 2015-01-05 16:38:47 -08:00
saadali eb831919d9 Improve kubelet logging around container being killed due to hash change 2015-01-05 16:20:40 -08:00
Angus Lees 6f14e2e210 Avoid race between image pull and garbage collect
Hold the pullLock while pulling regular container images, not just the
network container.

Also: previously, the locks were grabbed at too-low a layer in the
callstack, leaving a (narrow) window where images could be pulled and
then garbage collected before being used.

This change takes the existing pullLock a layer higher in the call stack
so the critical regions encompass the entire find+delete and pull+use
operation in both cases.
2014-12-31 11:50:40 +11:00
saadali e8d30f019d Modify "kubectl get events" to print FieldPath so BoundPod events for the same Pod but different containers can be differentiated 2014-12-29 21:32:49 -08:00
Dawn Chen d38613777b Propagate syncPod error as event to upper layer. 2014-12-29 15:42:47 -08:00
Tim Hockin 652479a3b1 Add kubelet DNS flags & api disable for DNS
This adds --cluster_dns and --cluster_domain flags to kubelet.  If
non-empty, kubelet will set docker --dns and --dns-search flags based on
these.  It uses the cluster DNS and appends the hosts's DNS servers.
Likewise for DNS search domains.

This also adds API support to bypass cluster DNS entirely, needed to
bootstrap DNS.
2014-12-29 09:18:12 -08:00
Brendan Burns b8781c04bb Add support for garbage collecting images. 2014-12-22 16:56:58 -08:00
Vish Kannan c34f2d354c Merge pull request #3035 from dchen1107/master
Update fsouza/go-dockerclient pkg to latest revision and fix some compiling issues.
2014-12-18 14:07:40 -08:00
Dawn Chen 608c3d5046 Update kubelet package on latest go-dockerclient package. 2014-12-18 13:49:13 -08:00
Brendan Burns 845fb5013d Remove some dead code. 2014-12-18 13:32:20 -08:00
Brendan Burns 7da0378f3c Track the sources that the kubelet has seen, and only delete pods
when every source has been seen at least once.
2014-12-17 13:08:43 -08:00
Clayton Coleman dadb8431c4 Remove internal PodState in favor of internal PodStatus object 2014-12-15 16:50:05 -05:00
Daniel Smith e46bfcf699 Allow, when testing, SelfLinks to be unset. Kubelet now makes events in tests. 2014-12-09 17:53:42 -08:00
Daniel Smith ba62943b8e Compare containers by name, not by pointer equality. 2014-12-09 17:06:39 -08:00
Tim Hockin acc6b95c21 Add functions to get kubelet directories.
Gets rid of some magic constants and makes volume plugins (coming later)
cleaner.
2014-12-06 11:00:19 -08:00
Tim Hockin 95a9098311 fix 'go vet' warnings 2014-11-21 09:45:28 +08:00
Tim Hockin ea960711ff Clean up error logs.
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines).  Just accumulated nits.
2014-11-21 09:45:26 +08:00
Dawn Chen 6d3324c3fd Add image related events to kubelet. 2014-11-19 15:16:14 -08:00
Eric Tune 0ca192889f Fix namespace of minion birthcry event. 2014-11-17 15:34:07 -08:00
Daniel Smith eeb4547bec Merge pull request #2392 from dchen1107/upstream1
Generate container related events from kublet
2014-11-17 11:28:52 -08:00
Dawn Chen 736c4ffb0b more events from kublet 2014-11-17 11:00:46 -08:00
Dawn Chen 8a508bcce3 Merge pull request #2391 from lavalamp/fix3
Remove confusing function; add TODO and explanation for (nonfatal) error...
2014-11-14 17:24:18 -08:00
Daniel Smith c412540cf2 Remove confusing function; add TODO and explanation for (nonfatal) error message in integration test. 2014-11-14 17:16:05 -08:00
Dawn Chen f729d748ac If the image with :latest tag specified in Spec, kubelet should try
to pull the latest one even the policy is PullIfNotPresent.
2014-11-14 16:09:53 -08:00
Dawn Chen ada43ae233 Fixed Eventf with wrong arguments. 2014-11-10 23:53:48 -08:00
Eric Tune 08c8f2cde1 Record event of kubelet restart re: minion obj. 2014-11-10 13:46:48 -08:00
Dawn Chen 57454cce81 Add support to capture application termination message and propagate
the message to the upper layer through ContainerStatus.
2014-11-10 10:56:23 -08:00
Dawn Chen e88e490614 Merge pull request #2143 from lavalamp/eventing2.1
Begin putting event emission into kubelet
2014-11-05 15:37:26 -08:00
Brendan Burns 0a1493a5ce Merge pull request #2160 from dchen1107/fix
Restart network container when container's configure is changed.
2014-11-05 15:13:05 -08:00
Daniel Smith dcc111bf13 Start putting event generation into kubelet (not enabled yet) 2014-11-05 15:09:14 -08:00
Daniel Smith 4b16e979e6 Fix nil docker client (how did this ever work???) 2014-11-04 16:58:37 -08:00
Dawn Chen 03958f5049 Restart network container when container's configure is changed.
Fix #2099
2014-11-04 14:38:33 -08:00
Brendan Burns 69ad5c9bff Merge pull request #2077 from dchen1107/cleanup
PodUpdate only has the delta changes, not full snapshot of all desired
2014-10-30 21:46:26 -07:00
Dawn Chen a1e79048a6 Add /podSpecs to Kubelet 2014-10-30 16:38:08 -07:00
Dawn Chen 445ec719c9 PodUpdate only has the delta changes, not full snapshot of all desired
BoundPods on a node. PR #1865 has a wrong assumption, with which any
PodUpdate operation will cause rest of running containers without updates
are killed as an unexpected ones.

Fix #2028
2014-10-30 11:22:59 -07:00
Brendan Burns 51bf451932 Add container garbage collection. 2014-10-28 12:52:06 -07:00
Tim Hockin 0a202354b9 Fix race between syncPod and syncPods 2014-10-23 15:53:26 -07:00
Tim Hockin 099934d49f Cleanups in syncPod 2014-10-23 15:53:26 -07:00
Tim Hockin 76c33a88b6 Remove redundancy in SyncPods 2014-10-23 15:53:26 -07:00
Tim Hockin 36a05ee871 Improve kubelet logging 2014-10-23 15:53:26 -07:00
Tim Hockin 487867bd01 Extract cadvisor code to cadvisor.go 2014-10-23 15:53:26 -07:00
Tim Hockin de3060e4eb Rename httpGetInterface to httpGetter 2014-10-23 15:53:26 -07:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Brendan Burns aa55e87ac2 Support updates in the kubelet. 2014-10-17 11:02:21 -07:00
Clayton Coleman 892942af8f Read BoundPods from etcd instead of ContainerManifestList
There are three values that uniquely identify a pod on a host -
the configuration source (etcd, file, http), the pod name, and the
pod namespace. This change ensures that configuration properly
makes those names unique by changing podFullName to contain both
name (currently ID in v1beta1, Name in v1beta3) and namespace.

The Kubelet does not properly handle information requests for
pods not in the default namespace at this time.
2014-10-16 19:29:08 -04:00
Dawn Chen 5f97413dd5 Merge pull request #1663 from smarterclayton/separate_pod_state_for_health_check
Refactor HealthCheck to take podUUID as its own argument
2014-10-10 09:11:59 -07:00
Daniel Smith 7bb1bdd693 Merge pull request #1711 from erictune/vets
Use pointer for struct holding lock.
2014-10-09 17:25:54 -07:00
Eric Tune 42f6324183 Use pointer for struct holding lock. 2014-10-09 17:16:21 -07:00
Clayton Coleman 95cb2e3eb3 Refactor HealthCheck to take podUUID arguments
PodState is going away (won't have podUUID anymore)
2014-10-09 16:42:55 -04:00
Daniel Smith 1fc92bef53 Load cadvisor connection in background. 2014-10-08 17:06:41 -07:00
Dawn Chen 73c8f41737 Add the missing arg in Errorf. 2014-10-07 13:53:25 -07:00
Brendan Burns 7ecd8d7207 Fix a problem with for loops, copy semantics and async routines. 2014-10-06 21:20:00 -07:00
Dawn Chen 4fdfeaa30e Addressed comments. 2014-10-06 14:41:20 -07:00
Dawn Chen 9861eb7c8e Initial support of propogating the termination reasons and image failure
to apiserver. Deprecated docker.Container from API completely.

Conflicts:
	pkg/api/types.go
	pkg/kubelet/kubelet.go
2014-10-06 13:37:22 -07:00
Johan Euphrosine f91162cf78 kubelet: add --runonce flag, exits after starting pod from the manifest 2014-10-03 18:02:30 -07:00
Deyuan Deng a9e7cf8e40 Fix integration test read volume dir error. 2014-10-03 19:51:07 -04:00
Clayton Coleman 6881db64a9 Allow configurable Kubelet net image for isolated networks
Public access to the DockerHub is not guaranteed in all environments,
add a flag to the kubelet that allows it to use a different image (like
one on a private registry) as well as only pull the first time the
image is needed.

Fixes #1545
2014-10-02 15:56:03 -04:00
Tim Hockin db49dc0012 Merge pull request #1458 from brendandburns/dontpull
Add the ability to turn off image pulling.
2014-10-01 12:40:47 -07:00
Brendan Burns 4c456015b6 Add the ability to turn off image pulling. 2014-10-01 12:34:22 -07:00
jhadvig 9b21053188 ListContainer filter 2014-09-30 23:30:32 +02:00
Tim Hockin 04cdf286a4 Make and use api.Protocol type 2014-09-27 20:31:37 -07:00
Tim Hockin badeaef95f Merge pull request #1457 from brendandburns/pull
Add a rate limiter, use it to rate limit docker pulls.
2014-09-26 12:39:25 -07:00
Brendan Burns 3ac706a32e Add a rate limiter, use it to rate limit docker pulls. 2014-09-26 11:55:21 -07:00
Tim Hockin 7a96ed38b3 Merge pull request #1439 from jhadvig/err_handler
Handle invalid pod name
2014-09-25 15:00:47 -07:00
jhadvig e5d8ee3811 Handle invalid pod name 2014-09-25 22:57:05 +02:00
Clayton Coleman 4e56dafecc Introduce some default log verbosity control
Move a lot of common error logging into better buckets:

glog.Errorf() - Always an error
glog.Warningf() - Something unexpected, but probably not an error
glog.V(0) - Generally useful for this to ALWAYS be visible
            to an operator
            * Programmer errors
            * Logging extra info about a panic
            * CLI argument handling
glog.V(1) - A reasonable default log level if you don't want
            verbosity
            * Information about config (listening on X, watching Y)
            * Errors that repeat frequently that relate to conditions
              that can be corrected (pod detected as unhealthy)
glog.V(2) - Useful steady state information about the service
            * Logging HTTP requests and their exit code
            * System state changing (killing pod)
            * Controller state change events (starting pods)
            * Scheduler log messages
glog.V(3) - Extended information about changes
            * More info about system state changes
glog.V(4) - Debug level verbosity (for now)
            * Logging in particularly thorny parts of code where
              you may want to come back later and check it
2014-09-25 16:30:14 -04:00
Clayton Coleman a5ed10235e Merge pull request #1354 from lavalamp/eventing
Add Event to api types
2014-09-25 16:20:49 -04:00
Daniel Smith 283eaf3931 Add new Event type
* replaces previous Event type, which is too limited.
* Remove writing of old event type.
* Fix serialiazation test to automatically test all types.
2014-09-25 11:31:35 -07:00
Brendan Burns 431caa93df Merge pull request #1335 from dchen1107/exit1
Convert existing kubernetes system to use ContainerStatus, instead of
2014-09-24 21:37:24 -07:00
Daniel Smith bb0cd95a83 fix non-gofmt'd things 2014-09-24 14:27:10 -07:00
Dawn Chen 0e6ec3cbfc Convert existing kubernetes system to use ContainerStatus, instead of
docker.Container directly.

Conflicts:
	pkg/kubelet/dockertools/docker.go
	pkg/registry/pod/rest.go
2014-09-24 11:16:46 -07:00
Tim Hockin 0f9cd4301d Merge pull request #1401 from jhadvig/k8s_log_retrieval_update
stdout/stderr writer container log stream
2014-09-22 16:38:11 -07:00
jhadvig 9ba71528e4 stdout/stderr container log stream 2014-09-23 00:15:36 +02:00
Tim Hockin 486dbd165f Merge pull request #1318 from jhadvig/k8s_log_retrieval
Adding endpoint for log retrieval on the minion
2014-09-22 13:21:28 -07:00
Eric Paris a32400f47f Remove all code dealing with cadvisor Percentiles
This was removed upstream beween cadvisor 0.3.0 and 0.4.0
2014-09-22 14:22:40 -04:00
jhadvig f3f5d0200c Using podID+containerName for querying the logs 2014-09-17 21:00:09 +02:00
Brendan Burns dc5a4a8c3f Refactor to clean up names. 2014-09-16 15:19:02 -07:00
Brendan Burns 5b9e2a55b5 Add a flag to reject privileged containers in the apiserver. 2014-09-16 11:22:32 -07:00
jhadvig f351691493 Adding endpoint for log retrieval on the minion 2014-09-15 17:02:56 +02:00
Brendan Burns 46d0cbd645 Add a global flag to enable/disable privileged containers 2014-09-12 09:56:45 -07:00
Dan Mace 3a3fab3f82 FEATURE: Support privileged containers in a pod
Add a Privileged field to containers in a pod, in order to facilitate pods
performing administrative tasks such as builds via Docker-in-Docker.

Discussion: https://github.com/GoogleCloudPlatform/kubernetes/issues/391
2014-09-12 09:38:11 -07:00
Brian Waldon 0bf4fabc19 kubelet: move docker-related code into sub-package 2014-09-11 13:12:28 -07:00
Dawn Chen 15cab4d053 Introduce the simplest RestartPolicy and handling. 2014-09-08 22:41:38 -07:00
Dawn Chen 7ace5a3e83 Passing pod UUID to Kubelet. 2014-09-08 14:24:09 -07:00
Brendan Burns d0884accd7 Add support for the PostStart event handler. 2014-09-05 12:37:57 -07:00
Daniel Smith 099c8fd36f Propagate rename; tests pass again. 2014-09-02 10:42:06 -07:00
Daniel Smith 97b05619f1 Remove deprecated bits from kubelet 2014-08-26 22:39:00 -07:00
Brendan Burns 4f1fa939f7 Switch the hostname in a container to be the pod id. 2014-08-26 11:13:53 -07:00
Vishnu Kannan 2b61831c22 Improve kubelet logging - log the docker container image name when docker pull fails. 2014-08-20 10:30:42 -07:00
Dawn Chen 5a2365b323 Fix #926
Make HostPort a real option without being set to ContainerPort if absent.
2014-08-19 15:44:50 -07:00
Brendan Burns 0caae9c1d4 Add a in container exec based health check. 2014-08-18 12:00:11 -07:00
Brendan Burns 2986db9885 Add container hashing to the container name, and restart containers on changes. 2014-08-08 13:32:07 -07:00
Daniel Smith 2297bf8cea Merge pull request #830 from brendandburns/net
Delete containers for a pod if we have to create the network container.
2014-08-08 13:12:42 -07:00
Brendan Burns 38900a9c58 Delete containers for a pod if we have to create the network container. 2014-08-08 12:34:59 -07:00
Victor Marmol adc57da3f3 Merge pull request #825 from brendandburns/runin
Add support for "run in"
2014-08-07 23:47:19 -07:00
Brendan Burns d31d0781b2 Add support for "run in" 2014-08-07 20:27:58 -07:00
Clayton Coleman d7f46718a8 Kubelet should have a max think time before auto resync
The sync frequency should be part of the syncLoop and resync no
less often than every X seconds.  The current implementation runs
even if a config update was delivered less than X seconds ago.
2014-08-07 10:40:03 -04:00
Danny Jones 7c28e0849f Reorganization; Directory traversal less ugly
Directory traversal is no longer recursive and only goes as deep as it
needs to. Moved GetActiveVolumes to volume packages and added a simple
test.
2014-08-06 11:20:34 -07:00
Danny Jones 3f7f6cb2dc Modifies tests to use new volume objects. 2014-08-06 10:21:59 -07:00
Danny Jones 6191ffc0de Modifies directory walker to use a regex
Now a regex is used to determine active volume properties from
their directory paths.
2014-08-06 10:21:59 -07:00
Danny Jones 47bca30edc Splits volume interface into Builders and Cleaners
Different information is needed to perform setup versus teardown. It
makes sense to separate these two interfaces since when we call teardown
from the reconciliation loop, we cannot rely on having the
information provided by the api definition of the volume.
2014-08-06 10:21:59 -07:00
Danny Jones dfc9cb86f0 Initial reconciliation loop.
Determines the set of active volumes versus the set of valid volumes
defined by the manifests. If there is an active volume that is not
defined in any of the manifests, deletes and cleans up that volume.
2014-08-06 10:21:59 -07:00
Brendan Burns 490bb28bf9 Add TCP socket based health checking. 2014-08-01 14:13:56 -07:00
Dawn Chen 2e8020be8c Update the entire cAdvisor package. There is a version mismatch issue
which cause #707
2014-07-31 10:11:25 -07:00
Dawn Chen 76ec7acf91 bump(github.com/google/cadvisor): bdd574b728e8a1e5eb08649d631197620dd09650 2014-07-31 09:14:04 -07:00
Francisco Souza 2a345ffa9e third_party: update go-dockerclient
math.MaxInt64 represents 8 exabytes, which is a good limit for memory.
Also, this is the type used by Docker, so it's not possible to get any
value bigger than math.MaxInt64 as memory limit (both ram and swap) on a
Docker container.

Relevant discussion at #589 (more precisely,
https://github.com/GoogleCloudPlatform/kubernetes/pull/589#issuecomment-50640605).
2014-07-30 15:18:42 -03:00
Rohit Jnagal fbd3e85e9c Fix handling of default cpu shares. 2014-07-29 18:34:16 +00:00
Daniel Smith 5ae20f9edb Merge pull request #605 from Sarsate/setup-error
SetUp now returns an error.
2014-07-24 14:13:22 -07:00
Danny Jones 1117da4a55 SetUp now returns an error.
SetUp returns an error, kubelet now skips pod if error occurs.
2014-07-24 13:53:44 -07:00
Victor Marmol b131da1cf5 Sync pods asynchronously in the Kubelet.
This makes two main changes:
- Runs syncPod in a separate Go routine (and enforces only one of those
  runs at a time).
- Uses the pod list to determine if a container should be running or
  should be killed (used to use the output of syncPod).

Since Docker pulls are synchronized by the Docker daemon we still block
on that, but pods can now be removed and prepared for starting without
blocking on long pulls.
2014-07-24 13:47:51 -07:00
Daniel Smith 41eb15bcff Merge pull request #527 from Sarsate/rootdir-flag
Adds a flag to specify root working directory.
2014-07-24 13:12:55 -07:00
Danny Jones bfa4642055 Adds a flag to specify root working directory.
--root_dir specifies the directory kubelet will use for it's
procedures. Currently used for volume mounts.
2014-07-24 13:04:05 -07:00
Nan Deng ea4224cbe7 update github.com/fsouza/go-dockerclient 2014-07-23 17:42:03 -07:00
Eric Tune ded67ead1e Make Kubelet type members private and provide New functions. 2014-07-22 14:40:59 -07:00