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
Clayton Coleman
7767c2a2ac
Switch the Kubelet to use kubelet/config
...
Also transfer the Kubelet from using ContainerManifest.ID to source specific
identifiers with namespacing. Move goroutine behavior out of kubelet/ and
into integration.go and cmd/kubelet/kubelet.go for better isolation.
2014-07-21 21:27:26 -04:00
Daniel Smith
f672edd1cf
Merge pull request #457 from dchen1107/minionlogs
...
Add support to query kubelet's logs and cadvisor's stats through apiserver by passing rawquery
2014-07-21 16:02:44 -07:00
Dawn Chen
064237a5b8
Add support to query kubelet's logs and cadvisor's stats through
...
apiserver by passing rawquery.
minor changes
Fixed a minor rebase issues.
Using ioutil.ReadAll instead of httputil.DumpResponse
2014-07-21 11:52:32 -07:00
Victor Marmol
88317efb42
Add a pause image for the net container.
...
The pause image is a 240KB image that simply pauses waiting on a signal.
Use this for the net container which only needs to act as a placeholder.
Current net image is ~2.5MB. From my tests, this reduces startup time
for the net container from ~14s to ~6s.
2014-07-21 10:28:49 -07:00
Kelsey Hightower
dc7ee7c333
normalize -etcd_servers flag across all commands
...
The -etcd_servers flag is used inconsistently by the Kubernetes commands,
both externally and internally.
This patch fixes the issue by using the same type to represent a list of
etcd servers internally, and declares the -etcd_servers flag consistently
across all commands.
This patch should be 100% backwards compatible with no changes in behavior.
2014-07-20 07:48:47 -07:00
Tim Hockin
fda69bcca2
Merge pull request #452 from Sarsate/extvol-hostdir
...
Initial framework for external volumes.
2014-07-18 12:44:38 -07:00
Daniel Smith
e9dbc4e8ad
Merge pull request #509 from xiangli-cmu/kubelet
...
kubelet: cleanup
2014-07-18 10:24:11 -07:00
Xiang Li
86288ca82a
kubelet: cleanup
2014-07-18 10:12:59 -07:00
Tim Hockin
2f593c92fa
Merge pull request #487 from yugui/fix/golint
...
Fixes Go lint errors and a style fix
2014-07-17 22:44:31 -07:00
Danny Jones
bb2843498d
API modified to use source; now supports EmptyDirectory
...
API is now modified to use a Source struct to handle multiple volumes.
Two volume types are supported now, HostDirectory and EmptyDirectory.
2014-07-17 15:25:50 -07:00
Nan Deng
564a58722c
Retrieve machine spec from cAdvisor
2014-07-17 15:21:47 -07:00
Danny Jones
f84ff740f0
Adds initial volumes package; Supports host-dirs
...
Adds the framework for external volume mounts.
Currently supports bare host directory mounts.
Modifies the API to support host directory mounts from Volumes
instead of VolumeMounts.
2014-07-17 10:08:45 -07:00
Clayton Coleman
185a97b037
Make container lookup in the Kubelet cleaner
...
Reduce duplicate calls to list lookups for parallel go routines.
2014-07-16 14:12:13 -04:00
Yuki Sonoda (Yugui)
df9da65939
Rename a function according to go convention
2014-07-16 22:05:06 +09:00
Yuki Sonoda (Yugui)
a702be8e63
Fixes new golint errors in pkg/kubelet after merge
2014-07-16 21:33:26 +09:00
Yuki Sonoda (Yugui)
07b8be4d4c
Merge branch 'master' into fix/golint2
...
Conflicts:
pkg/api/types.go
pkg/health/health_check.go
pkg/kubelet/kubelet.go
pkg/kubelet/kubelet_server.go
pkg/kubelet/kubelet_server_test.go
pkg/kubelet/kubelet_test.go
2014-07-16 21:33:21 +09:00
Daniel Smith
c7d31fabbc
Merge pull request #480 from monnand/cadvisor-update-1
...
Update kubelet package to use most recent cAdvisor's code
2014-07-15 18:25:54 -07:00
Brendan Burns
c331849e69
Add support for CPU limiting to the kubelet.
2014-07-15 16:49:34 -07:00
Daniel Smith
3d63d733e3
Merge pull request #456 from brendandburns/health
...
Move health checking logic out to a utility. Add a minion registry that health checks.
2014-07-15 15:39:21 -07:00
Brendan Burns
c5db874090
Addressed comments.
2014-07-15 15:16:36 -07:00
Nan Deng
30bc2af9f1
gofmt -r "GetContainerStats->GetContainerInfo"
2014-07-15 11:53:00 -07:00
Nan Deng
8c573ee727
Update to latest cAdvisor and use data structures directly from cAdvisor
2014-07-15 11:53:00 -07:00
Clayton Coleman
e02ea37d9f
Move Docker specific function out of the Kubelet
2014-07-15 11:34:48 -04:00
Yuki Yugui Sonoda
edac5ce0b8
Fixes golint errors in pkg/kubelet
2014-07-15 22:56:31 +09:00
Yuki Yugui Sonoda
af38bf1ef7
Fixes golint errors in pkg/api
2014-07-15 22:56:09 +09:00
Clayton Coleman
07fafb1252
Merge pull request #453 from brendandburns/memory
...
Add support for memory limits in the kubelet.
2014-07-15 09:37:42 -04:00
Brendan Burns
62dfc74606
Move health checking logic out to a utility.
...
Add a minion registry that health checks.
2014-07-14 22:38:28 -07:00
Brendan Burns
92d83640c0
Add support for memory limits in the kubelet.
2014-07-14 20:57:26 -07:00
Brendan Burns
ae179121c6
Address comments.
2014-07-14 20:38:43 -07:00
Yifan Gu
3a95572290
Changed the keepChannel to buffered channel.
...
Since the keepChannel is used to send data, not just for synchronizaiton,
so make it a buffered channel can avoid unnecessary goroutine yields.
2014-07-14 14:22:19 -07:00
Claire Li
10de5b12fe
pkg/kubelet: explicitly return nil as error and nil as a result on error
2014-07-12 11:03:08 -07:00
Brendan Burns
1b4dfe7d14
Move from bool to HealthCheckStatus
2014-07-11 10:15:31 -07:00
Brendan Burns
6312ffebcf
Address some comments from thockin@
2014-07-11 10:14:45 -07:00
Tim Hockin
32bcdbeb53
Merge pull request #396 from brendandburns/hostname
...
Add Hostname to the docker run command.
2014-07-10 12:28:30 -07:00
Brendan Burns
dc61547b95
Add Hostname to the docker run command.
2014-07-10 12:25:57 -07:00
Yuki Sonoda (Yugui)
45b48e1668
Fixes golint errors in pkg/kubelet
2014-07-10 21:57:26 +09:00
Tim Hockin
b0b9606aea
Merge pull request #365 from brendandburns/health
...
add http health checks.
2014-07-09 16:14:30 -07:00
brendandburns
4c309862e3
Merge pull request #371 from thockin/valid3
...
Accumulate errors during validation
2014-07-09 13:36:37 -07:00
Tim Hockin
95fb7bc1ae
Merge pull request #379 from brendandburns/host
...
Add support for host up binding to the API (and kubelet)
2014-07-09 12:54:32 -07:00
Brendan Burns
41c6680943
add http health checks.
2014-07-09 12:01:43 -07:00
Dan Mace
00df67b0bf
Namespace "local" volume mounts by ContainerManifest ID on disk
...
Local volume mounts in a pod should result in host mounted directories
which are namespaced by the ContainerManifest ID.
2014-07-09 14:45:22 -04:00
Brendan Burns
4b22f7a462
Add support for host ip binding to the API (and kubelet)
2014-07-09 11:13:38 -07:00
Tim Hockin
54790080b3
Accumulate validation errors
...
Rather than report the first error, accumulate all errors and report them all
at once.
2014-07-09 07:55:15 -07:00
brendandburns
242627eaf0
Merge pull request #358 from thockin/valid2
...
Add validation of VolumeMounts
2014-07-08 21:58:32 -07:00
Dawn Chen
a0f94757a4
Instantiate cAdvisor client for kubelet to query both machine and container
...
information.
2014-07-08 16:37:43 -07:00
Tim Hockin
2eb2784725
Validation of HostPorts and Manifest IDs
...
Check that HostPorts are unique across the whole host and that Manifest IDs
are unique.
2014-07-08 15:22:47 -07:00
Tim Hockin
ad88fa48a5
Add validation of Ports
...
Also do caseless compares for "enum" strings.
2014-07-08 15:22:44 -07:00
Tim Hockin
92cf6662ed
Merge pull request #351 from discordianfish/use-api-for-pull
...
Use api for pulling images instead of shelling out
2014-07-08 09:08:12 -07:00
Johannes 'fish' Ziemke
3fa6c9671d
Use docker client lib instead of binary for pulls
2014-07-08 12:21:39 +02:00
Nan Deng
aa808a6505
fix data race introduced by 1798e0f
2014-07-02 23:23:14 -07:00
brendandburns
bf44347340
Merge pull request #350 from brendandburns/async
...
Fix an error in the async-path that led to dropping pods.
2014-07-02 23:15:35 -07:00
Brendan Burns
0655370ea2
Fix an error in the async-path that led to dropping pods.
2014-07-02 23:05:30 -07:00
brendandburns
d386c02dfd
Merge pull request #328 from monnand/root-container
...
Get root container stats from cAdvisor
2014-07-02 22:57:28 -07:00
Nan Deng
42fd4383a1
Get machine stats from cAdvisor
2014-07-02 16:59:50 -07:00
Daniel Smith
a6144f656c
Move etcd helpers to tools package so they can depend on api package. Add ResourceVersion, hook it up to etcd index to get atomic PUTs.
2014-07-02 15:42:05 -07:00
Tim Hockin
d3da6b168e
nit: s/Id/ID/ for go style
2014-07-02 11:21:29 -07:00
brendandburns
a8a0039a39
Merge pull request #335 from vmarmol/add-kubelet-new
...
Add a New() for Kubelet.
2014-07-01 22:16:24 -07:00
Victor Marmol
e29ff512fc
Add a New() for Kubelet.
...
This will make it easier to add new fields that need to be initialized. Also refactors tests to ease making fake Kubelets.
2014-07-01 19:23:26 -07:00
Daniel Smith
969586a214
Add logging, fix crash
...
Crash was in kublet_server when fake docker client gives it nil pointer.
2014-07-01 17:38:07 -07:00
Daniel Smith
587fb75a7a
rearrange RunKubelet's parameters so that address and port are next to each other
2014-07-01 16:47:37 -07:00
Daniel Smith
11d6451d2a
Change kublet to serve podInfo instead of containerInfo. Plumb through system.
2014-07-01 16:41:10 -07:00
Daniel Smith
049bc6b6d4
Fix interface{} in api/types.go; plumb through system.
2014-07-01 16:41:09 -07:00
brendandburns
664c9faa43
Merge pull request #327 from lavalamp/etcdChanFix
...
Improvements to integration test & logging
2014-07-01 15:40:48 -07:00
Daniel Smith
b820e026f6
Improve logging.
2014-07-01 14:02:14 -07:00
Tim Hockin
a92e1aa1bf
First piece of validation
...
I'm adding pieces incrementally to make sure we get full testing of each
piece.
Make syncLoop() private
2014-07-01 13:48:57 -07:00
Brendan Burns
1798e0fea3
Make each pod synchronization async.
2014-07-01 12:20:13 -07:00
Brendan Burns
7999983311
Added async behavior.
2014-07-01 11:11:10 -07:00
Clayton Coleman
15c96508a9
Use ID instead of Id (go style) everywhere
...
Fixes #278
2014-07-01 13:16:47 -04:00
Tim Hockin
6c79937a42
Reduce logging noise
...
Don't use %#v for errors.
Do use %+v when more detail than %v is needed.
Fix typos Kublet -> Kubelet.
2014-06-28 22:16:26 -07:00
Justin Huff
28afe91855
Allow empty lists when polling manifests via http
2014-06-27 23:46:02 -07:00
Daniel Smith
b21facafb1
Merge pull request #273 from brendandburns/kubelet
...
Make the docker endpoint a flag.
2014-06-27 17:09:25 -07:00
Brendan Burns
f8060c5b3d
Make the docker endpoint a flag.
2014-06-27 17:01:12 -07:00
Justin Huff
8c5562ef77
DockerContaineId->DockerId
2014-06-27 14:03:50 -07:00
Justin Huff
81663fdb80
Introduce a type for docker container ids
2014-06-27 14:03:50 -07:00
Justin Huff
fe0066d2e4
Cleaning up container ID handling inside kubelet
2014-06-27 14:03:50 -07:00
Brendan Burns
78d9538358
Set id width at 8 and pad with zeros.
2014-06-26 19:24:12 -07:00
Justin Huff
6fdebd6560
Watch and Get on the same Etcd key.
...
Kubelet was killing existing pods when creating a new one because new
files were being set as /registry/hosts/<machine>/pods/<id> and
/registry/hosts/<machine>/kubelet.
2014-06-26 18:59:49 -07:00
Daniel Smith
001b07b292
Use net.JoinHostPort
2014-06-26 16:20:37 -07:00
Tim Hockin
3f0e7e790b
Less verbose logging for "normal" things.
...
Don't log things that we expect to happen every sync loop, unless the user
asks for --v > 0.
2014-06-24 22:05:25 -07:00
Tim Hockin
9f9e75f508
Switch to glog for logging, bridge logging to glog.
...
1) imported glog to third_party (previous commit)
2) add support for third_party/update.sh to update just one pkg
3) search-and-replace:
s/log.Printf/glog.Infof/
s/log.Print/glog.Info/
s/log.Fatalf/glog.Fatalf/
s/log.Fatal/glog.Fatal/
4) convert glog.Info.*, err into glog.Error*
Adds some util interfaces to logging and calls them from each cmd, which
will set the default log output to write to glog. Pass glog-wrapped
Loggers to etcd for logging.
Log files will go to /tmp - we should probably follow this up with a
default log dir for each cmd.
The glog lib is sort of weak in that it only flushes every 30 seconds, so
we spin up our own flushing goroutine.
2014-06-24 20:51:57 -07:00
Justin Huff
ddf0fd18f0
Remove extractMultipleFromReader and extractSingleFromReader. Unused now after improvements in #212 and #213
2014-06-24 18:59:57 -07:00
brendandburns
8b44f34e0f
Merge pull request #213 from lavalamp/fix_manifest
...
Better fix of #212
2014-06-24 17:42:22 -07:00
Daniel Smith
f7968ce00b
Make integration test the manifest url feature. Make kubelet's docker pull command testable.
2014-06-24 16:57:35 -07:00
Daniel Smith
fd66a8b59b
Readability fixes & address review comments.
2014-06-24 15:16:21 -07:00
Daniel Smith
9d8a16f180
Make manifest url reader accept both single and multiple manifests.
2014-06-24 15:13:18 -07:00
Tim Hockin
c705593b62
Logging cleanup in Kubelet
...
Make it easier to see the signal when looking at kubelet logs. Make the
signal more consistent and legible.
2014-06-24 13:50:08 -07:00
Tim Hockin
7622bb871b
Rename Kubelet.Client -> EtcdClient
...
All the other *Client members are so named. Makes easier reading.
2014-06-24 13:17:38 -07:00
Justin Huff
4f714dd0fe
Ignore files that start with '.' when processing a config dir.
2014-06-24 12:02:49 -07:00
Tim Hockin
8c2a8b65c3
Escape manifest IDs when hunting the network container.
...
This makes it possible to have manifests with _ in the ID. I'm not sure we
want to allow this, but we do for now. I hope to follow this up with a deeper
change to make this a bit more robust.
2014-06-24 09:52:43 -07:00
brendandburns
e811e24b23
Merge pull request #216 from thockin/logging
...
Minor: log cleanups
2014-06-23 22:38:06 -07:00
Tim Hockin
60ad86c972
Minor: Log cleanups
...
Clean up log messages to be more obvious. Fix a typo (exit -> exist).
2014-06-23 22:11:18 -07:00
Tim Hockin
7218a4d165
Clarify config file code to be clear that it handles directories. ...
...
… Add a check for IsRegular() before reading a config path. Add a comment
about exec.Command("hostname", "-f").
2014-06-23 21:14:15 -07:00
Tim Hockin
228156dbc6
Remove noisy non-error lines from logs
2014-06-23 17:58:21 -07:00
Daniel Smith
77af24e7dc
manifest_url needs to take a single ContainerManifest.
2014-06-23 15:06:28 -07:00
Justin Huff
1441a84673
Cleanup handling of config channels in RunSyncLoop by passing a map
...
instead of a bunch of vars.
2014-06-22 09:32:49 -07:00
Justin Huff
460821e370
Add a k8s prefix to docker containers that we manage
2014-06-21 13:30:10 -07:00
Justin Huff
ecf7d11477
Make config dir handling deterministic
2014-06-20 09:31:52 -07:00
Justin Huff
d5bf045a6c
Make sure that config files are closed properly
2014-06-20 09:31:52 -07:00
Justin Huff
d204f76484
Add config dir support to kubelet
2014-06-20 09:31:52 -07:00
Justin Huff
f49b9c2429
Fix merge conflicts
2014-06-20 09:31:18 -07:00
Daniel Smith
8a13e5300d
Merge pull request #182 from brendandburns/net
...
Update IP assignment to be per-pod, not per-container
2014-06-20 09:06:34 -07:00
Brendan Burns
b46d8d2337
Merge branch 'net' of https://github.com/brendandburns/kubernetes-1 into net
2014-06-20 09:01:17 -07:00
brendandburns
3a9a3b1114
Merge pull request #174 from monnand/kubelet-cadvisor
...
Letting kubelet retrieve container stats from cAdvisor
2014-06-20 08:36:22 -07:00
brendandburns
0c8d556afb
Fix IP affinity to be per-pod, not per-container.
2014-06-19 23:09:21 -07:00
brendandburns
168ec29f54
Merge pull request #178 from vmarmol/add-external-mounts
...
Adding support for external mounts
2014-06-19 21:28:40 -07:00
Victor Marmol
e794f539d8
Adding support for external mounts
2014-06-19 21:14:19 -07:00
Nan Deng
7c7dfe3eeb
style
2014-06-20 04:06:28 +00:00
Brendan Burns
ae9fce1358
Fix the container manifest to so that Command is an array, not a string.
2014-06-19 20:21:20 -07:00
Nan Deng
c7eaa2095c
GOPATH...
2014-06-19 20:44:52 +00:00
Nan Deng
037cfd257f
add /containerStats
2014-06-19 20:44:52 +00:00
Nan Deng
2402e939c2
Add cAdvisor into third_party
2014-06-19 20:44:52 +00:00
Daniel Smith
7e464aa55c
Test controller's synchronize method. Requires fake etcd client to be relocated.
2014-06-18 13:10:39 -07:00
Brendan Burns
2e68d087a9
Add udp support.
2014-06-15 21:19:35 -07:00
Brendan Burns
482a360f9e
Make all error strings lower case, for readability.
2014-06-13 15:45:19 -07:00
Brendan Burns
d393838dfd
Only manage containers with '--' in the name.
2014-06-13 12:09:48 -07:00
Brendan Burns
164160adef
Address package level comments for readability.
2014-06-12 20:26:12 -07:00
brendandburns
f053a49988
Merge pull request #71 from brendandburns/container_info
...
Fix some problems in container info handling if the container's no present.
2014-06-12 20:17:05 -07:00
Brendan Burns
b05bc22a62
Refactor the kubelet for testability.
...
Add unit tests. Test coverage to 56.9%
2014-06-12 14:44:46 -07:00
Johan Euphrosine
4f6bed03ae
gofmt -s pkg/ cmd/
2014-06-12 14:16:19 -07:00
Brendan Burns
c36a7896fd
Added a comment explaining the function.
2014-06-12 11:27:50 -07:00
Daniel Smith
69acbf5a74
Fix build
2014-06-12 09:35:04 -07:00
Daniel Smith
7c17db672e
Move hostname detection logic to allow replacement
2014-06-12 09:35:04 -07:00
Brendan Burns
62f6291377
Fix a bug if the container is non-existent.
2014-06-09 16:45:17 -07:00
Brendan Burns
6018497174
Task -> Pod part #3
2014-06-08 22:38:45 -07:00
Daniel Smith
62aba06180
Change 'this' varable to more sensible abbreviation
2014-06-08 20:35:07 -07:00
Joe Beda
2c4b3a562c
First commit
2014-06-06 16:40:48 -07:00