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