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
saadali
110ab6f1bd
Split up kubelet "source seen" logic
2015-01-12 21:48:55 -08:00
Tim Hockin
0d92da6b15
Remove logic to handle if UID is blank
...
This should only have been triggered by tests, and those should now be fixed.
I tested by calling panic() if UID was blank in BuildDockerName() or if number
of fields was < 5 in ParseDockerName(). All errors were fixed.
2015-01-12 14:27:34 -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
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
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
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
Dawn Chen
608c3d5046
Update kubelet package on latest go-dockerclient package.
2014-12-18 13:49:13 -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
Jimmi Dyson
5109ce3356
Fixes #2681 : update to cadvisor 0.6.2
2014-12-01 11:38:03 +00:00
Dawn Chen
ce145545b9
Add unittests to test PullPolicy.
2014-11-14 16:09:53 -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
03958f5049
Restart network container when container's configure is changed.
...
Fix #2099
2014-11-04 14:38:33 -08:00
Brendan Burns
69ca97a41c
Fix a flaky test by draining the worker pool after syncing.
2014-10-31 09:52:01 -07:00
Brendan Burns
51bf451932
Add container garbage collection.
2014-10-28 12:52:06 -07:00
Tim Hockin
2bbd11eda6
Merge pull request #1975 from smarterclayton/split_type_meta
...
Split TypeMeta into ObjectMeta/ListMeta
2014-10-24 08:43:00 -07:00
Clayton Coleman
644eb70085
Refactor tests to split ObjectMeta from TypeMeta
2014-10-24 11:22:21 -04:00
Tim Hockin
76c33a88b6
Remove redundancy in SyncPods
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
Clayton Coleman
bb77a5d15f
Rename ID -> Name
2014-10-22 15:00:26 -04: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
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
Dawn Chen
39f648bda2
Fix rebase issues.
2014-10-06 13:37:23 -07:00
Dawn Chen
8d0ed93aa1
Clean unittests
2014-10-06 13:37:22 -07: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
Eric Tune
9c0769422d
Directory renamed to Dir to match json property
2014-10-01 13:35:21 -07:00
Tim Hockin
1c02af3d16
Kill LivenessProbe.Type
2014-09-27 21:16:30 -07:00
Dawn Chen
01c9015ed3
use _ as the separator for docker container name.
2014-09-26 09:21:21 -07: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
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
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
97b05619f1
Remove deprecated bits from kubelet
2014-08-26 22:39:00 -07:00
Brendan Burns
556eb0f400
Add a run command to the kublet server
2014-08-26 13:57:44 -07:00
Tim Hockin
0f97a73c1b
Rename a bunch of "Make" functions to "New"
...
Also rename some to other names that make better reading. There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things. It seemed that "make" there seemed fine. "New"
is for "constructors".
2014-08-20 21:27:19 -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
Brendan Burns
d31d0781b2
Add support for "run in"
2014-08-07 20:27:58 -07:00
Clayton Coleman
f7149926c0
Remove expectNoError from client, kubelet, and util
2014-08-04 09:39:06 -04:00
Brendan Burns
490bb28bf9
Add TCP socket based health checking.
2014-08-01 14:13:56 -07:00
Jonathan Boulle
c43035088b
assorted formatting and typo fixes
2014-07-24 15:10:36 -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
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
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
Kelsey Hightower
67efa0a53a
Add test cases for Docker image name parsing and cleanup
...
The tests for Docker image name parsing are repetitive and do not
cover enough test cases.
Refactor the tests to use table testing and add additional test cases.
2014-07-20 19:22:54 -07:00
Daniel Smith
05f01a3654
Revert "assorted formatting and typo fixes"
2014-07-18 17:16:30 -07:00
Daniel Smith
211f6b312f
Merge pull request #520 from jonboulle/master
...
assorted formatting and typo fixes
2014-07-18 17:15:30 -07:00
Jonathan Boulle
9e63c3a633
assorted formatting and typo fixes
2014-07-18 13:02:59 -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
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)
c1eee00a57
Correct an error message
2014-07-16 21:33:26 +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
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
Kouhei Ueno
bba23e28c2
Define EtcdErrorCode as constant and reuse EtcdError instances
2014-07-15 20:48:06 +09: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
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
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
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
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
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
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
brendandburns
67eae1f645
Merge pull request #331 from dchen1107/cleanup
...
Fixed the data race found in kubelet_test.go
2014-07-01 15:30:36 -07:00
Dawn Chen
17bad028ce
Fixed the data race found in kubelet_test.go
2014-07-01 15:15:40 -07:00
Clayton Coleman
15c96508a9
Use ID instead of Id (go style) everywhere
...
Fixes #278
2014-07-01 13:16:47 -04:00
Justin Huff
28afe91855
Allow empty lists when polling manifests via http
2014-06-27 23:46:02 -07:00
Daniel Smith
54ad4582e2
Fix unstable map ordering issue in test
2014-06-27 15:40:23 -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
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
be39c3d646
Fix crash in test
2014-06-26 16:56:02 -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
6900431b13
Add kubelet testing to integration test. Test that kubelet makes the requested containers. Check that the url manifest feature works.
2014-06-24 15:14:40 -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
7622bb871b
Rename Kubelet.Client -> EtcdClient
...
All the other *Client members are so named. Makes easier reading.
2014-06-24 13:17:38 -07:00
Daniel Smith
77af24e7dc
manifest_url needs to take a single ContainerManifest.
2014-06-23 15:06:28 -07:00
Daniel Smith
b850d36166
Fix boilerplate everywhere
2014-06-23 11:32:11 -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
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
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
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
d001110df1
gofmt -s -w -l
2014-06-19 20:59:20 +00:00
Nan Deng
1b9cb5d501
more unit test
2014-06-19 20:44:53 +00:00
Nan Deng
b01a12fe34
more unit test for GetContainerStats()
2014-06-19 20:44:53 +00:00
Nan Deng
3080262f12
unit test for cadvisor
2014-06-19 20:44:53 +00:00
Daniel Smith
65d6280936
Move etcd helper to util so it can be used elsewhere, too
2014-06-18 13:10:39 -07:00
Brendan Burns
76148dc85f
gofmt
2014-06-15 21:57:29 -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
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
Joe Beda
353698558d
gofmt -s -w cmd/ pkg/
2014-06-12 18:34:47 -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
d83f407e43
Fix tests.
2014-06-09 16:50:44 -07:00
Joe Beda
2c4b3a562c
First commit
2014-06-06 16:40:48 -07:00