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
Yu-Ju Hong
4a72addaeb
Factor out API defaulting from validation logic
...
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).
* This change is based on pull request 2587.
* Most defaulting has been migrated to defaults.go where the defaulting
functions are added.
* validation_test.go and converter_test.go have been adapted to not testing the
default values.
* Fixed all tests with that create invalid objects with the absence of
defaulting logic.
2015-02-03 00:55:42 -08:00
Brian Grant
2903fce2b8
Merge pull request #4031 from jbeda/hyperkube-kubelet
...
Convert kubelet and proxy to hyperkube
2015-02-02 18:08:59 -08:00
Tim Hockin
1ee1702be0
Merge pull request #3808 from brendandburns/master
...
Add a mounter that uses google's safe_format_and_mount.
2015-02-02 16:29:10 -08:00
Brendan Burns
ac21ac24fa
Add a mounter that uses google's safe_format_and_mount.
2015-02-02 16:16:20 -08:00
Tim Hockin
ac399fb354
Merge pull request #3967 from brendandburns/fixer
...
Be a little more careful when removing mount points.
2015-02-02 15:46:18 -08:00
Joe Beda
76df5471b5
Covert the kubelet binary to hyperkube.
...
This leaves `pkg/kubelet/server/server.go` looking a little ugly as there is an extra layer of "config" structs that isn't needed. This is left as a TODO for now.
2015-02-02 14:03:13 -08:00
Joe Beda
d96afdd645
Move 'pkg/standalone' package to 'pkg/kubelet/server'.
...
This paves the way to hyperkube for the kubelet.
2015-02-02 14:03:13 -08:00
Brendan Burns
7f06fbb081
Be a little more careful when removing mount points.
2015-02-02 12:35:24 -08: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
Brian Grant
207d0f5d40
Merge pull request #3878 from thockin/infra_name
...
Use a constant for the pod infra container name
2015-01-30 09:18:00 -08:00
Ye Yin
248624fc1f
Add docker's add/drop capabilites
2015-01-30 15:09:31 +08:00
Brendan Burns
a0b8429d2e
Reverse the order of unmounting and removing the pd disk.
...
This should mean that we retry detaching if the original detach fails for some reason.
2015-01-29 16:13:12 -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
804643a04b
Merge pull request #3818 from mikedanese/probe-refactor
...
break api.Probe out of api.LivenessProbe
2015-01-28 12:41:35 -08:00
Dawn Chen
b0bcee7b40
Increase timeout for all testcases in file_test.go
2015-01-28 11:27:15 -08:00
Mike Danese
78f33e950a
rename api.LivenessProbe to api.Probe and break out Actions
2015-01-28 11:20:44 -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
Tim Hockin
70ab406751
Use a constant for the pod infra container name
...
This is an implementation detail that has leaked out of kubelet. Use a
constant to prevent divergence, for now. Plan to get rid of it.
@dchen1107
2015-01-28 10:13:02 -08:00
Paul Morie
962bdda0dc
Fix typo in kubelet
2015-01-28 12:00:53 -05:00
Tim Hockin
371637a5fc
Merge pull request #3845 from brendandburns/disk
...
Detach the PD disk from the VM in some failure cases.
2015-01-27 15:46:36 -08:00
Tim Hockin
7e6f3af937
Merge pull request #3817 from mrunalp/feature/shared_ipc
...
Shared IPC namespace for containers in a pod
2015-01-27 15:41:34 -08:00
Brendan Burns
bc055d2bd0
Detach the PD disk from the VM in some failure cases.
2015-01-27 13:58:42 -08: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
6eb0b89cbd
add Probers to Probe pkgs.
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
Mike Danese
5ee4071cf1
migrated tests
2015-01-27 11:20:29 -08:00
Mike Danese
ee56a1d3e3
create pkg/probe as successor to pkg/health.
2015-01-27 11:20:29 -08:00
Brendan Burns
7e558a7535
Merge pull request #3813 from mattmoor/master
...
Fix for issue 3797.
2015-01-27 09:56:49 -08:00
Mrunal Patel
b6a0ff1003
IP: Shared IPC.
2015-01-27 09:26:36 -08:00
Brendan Burns
e5c38a825b
Fix unit tests @ main.
2015-01-26 22:12:24 -08:00
Matt Moore
2d396797a9
Fix for issue 3797.
...
Docker's logic for resolving credentials from .dockercfg accepts two kinds of matches:
1. an exact match between the dockercfg entry and the image prefix
2. a hostname match between the dockercfg entry and the image prefix
This change implements the latter, which permits the docker client to take .dockercfg entries of the form:
https://quay.io/v1/
and use them for images of the form:
quay.io/foo/bar
even though they are not a prefix-match.
2015-01-26 14:06:12 -08:00
Tim Hockin
d63162b7e7
Make kubelet's HTTP source go through conversion
2015-01-22 14:09:37 -08:00
Tim Hockin
4ff2865cd1
Make kubelet's file source go through conversion
...
See comments for details. Same problem exists in HTTP source, but I want to
float this for review first.
2015-01-22 13:10:59 -08:00
Tim Hockin
ffb2b62726
Merge pull request #3725 from dchen1107/cleanup
...
Generate pod.Name when pod.Name == "" for both HTTP and file sources.
2015-01-22 13:10:27 -08:00
Dawn Chen
ec77507915
Generate pod.Name when pod.Name == "" for both HTTP and file sources.
...
Fix #3584
2015-01-22 12:53:30 -08:00
Tim Hockin
30219f8dfa
Merge pull request #3664 from thockin/pull-if
...
Pull if
2015-01-21 13:05:28 -08:00
Tim Hockin
81343aac63
Change PullPolicy constants to match
2015-01-21 12:48:56 -08:00
Tim Hockin
819803b79f
Make VolumeSource not be a pointer
...
There's no reason for it to be a pointer.
2015-01-20 17:54:04 -08:00
Brian Grant
dd45246150
Merge pull request #3587 from dchen1107/image
...
Clean up Kubernetes PullPolicy
2015-01-20 17:18:26 -08:00
Tim Hockin
60ec08db93
Rename HostDir to HostPath in v1beta3
2015-01-20 15:56:44 -08:00
Brendan Burns
9192a4ce22
Merge pull request #3642 from dchen1107/clean
...
Remove image GC.
2015-01-20 14:07:00 -08:00
Dawn Chen
d1af520bd0
Merge pull request #3589 from filbranden/fix_nil_interface_pointer_without_reflect1
...
Fix comparison of EtcdClient to nil so that it does not run into the pointer vs. interface issue
2015-01-20 13:55:25 -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
Dawn Chen
aec4594a8d
Introduce validatePullPolicyWithDefault to validation.
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
Andrew Seidl
6dee1d7fa4
Fix typos in user-facing strings
2015-01-18 01:32:34 -06:00
Filipe Brandenburger
79ff06ffa1
Fix comparison of EtcdClient to nil so that it does not run into the pointer vs. interface issue
...
This is a partial rollback of commit 6e6f465a36
("Fix a crash for
kubelet when without EtcdClient") in which we used the `reflect` module
to inspect that the pointer stored inside the interface was `nil`, but
as pointed out by @lavalamp, the correct solution is to make the
function return the interface type, in which case a `return nil` will
return the interface nil and not a nil pointer that turns into a non-nil
value when coerced into an interface.
For more details, see http://golang.org/doc/faq#nil_error and the
discussion in PR #3356 .
Tested by installing a kubelet built from head with this patch into a
containervm instance and confirming it did not crash on standalone.go.
Confirmed that by only removing the `reflect.IsNil()` comparison but not
changing the return type of `EtcdClientOrDie()` did indeed cause that
same crash, so changing the return type does indeed fix the issue.
Signed-off-by: Filipe Brandenburger <filbranden@google.com>
2015-01-16 16:43:05 -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
Eric Tune
5aeda8a5bb
Remove dead code in test.
2015-01-15 14:49:08 -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
2e002b1095
Add second pod to test.
2015-01-15 13:36:49 -08:00
saadali
b57cc6a11c
Increase timeout for TestEtcdSourceExistingBoundPods test
2015-01-14 17:06:04 -08:00
Daniel Smith
46827720b3
Merge pull request #3493 from saad-ali/testFor3467
...
Add test case for EtcdSource ExistingBoundPods
2015-01-14 16:35:26 -08:00
saadali
a1c287ede9
Add test case for EtcdSource ExistingBoundPods
2015-01-14 16:15:08 -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
Daniel Smith
8a764c02d5
Merge pull request #3478 from thockin/uid_type
...
Use a strong type for UID fields
2015-01-14 14:20:22 -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
Dawn Chen
009c5e1129
Using ExtractObj instead of ExtractToList since BoundPods is not a List type
2015-01-14 14:05:47 -08:00
Tim Hockin
e86d4cd3c6
Use a strong type for UID fields
2015-01-14 13:53:43 -08:00
Dawn Chen
0716df8f2b
Fix Event.Source for hostname_override case.
2015-01-14 09:43:13 -08:00
saadali
826b61c76d
Address nits from PR #3423
2015-01-13 23:34:37 -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
Daniel Smith
55653568ae
Merge pull request #3385 from erictune/source_api
...
Added kubelet config source from apiserver.
2015-01-12 15:47:15 -08:00
Eric Tune
18bcef5235
Added kubelet config source from apiserver.
2015-01-12 15:29:16 -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
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
35f54addca
Update more packages, tests, binaries for quantity
...
make etcd registry pass test
fix kubelet config for quantity
fix openstack for quantity
fix controller for quantity
fix last tests for quantity
wire into binaries
fix controller manager
fix build for 32 bit systems
2015-01-07 15:21:35 -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
Dawn Chen
e3c019128e
Add EventSource to api to have both Component and Host information.
2015-01-06 16:08:20 -08:00
Dawn Chen
2b91c1417c
Create selfLink for pods from config files and indicate hostname as part of event source.
2015-01-06 16:08:20 -08:00
Tim Hockin
8b42534f77
Fix kubelet config tests
2015-01-06 13:02:41 -08:00
Tim Hockin
88fe5c6f46
Never set pod.Name in kubelet config code
...
I think it is time to tighten up input requirements. The validation code will
reject a pod that has an empty name field.
2015-01-06 11:14:19 -08:00
Tim Hockin
cae572290b
Merge pull request #3230 from saad-ali/hashingLogging
...
Improve kubelet logging around container being killed due to hash change
2015-01-05 16:48:29 -08:00
saadali
d6d18a32e7
Replace %s with %q to make empty strings more obvious
2015-01-05 16:38:47 -08:00
Tim Hockin
03baa7234a
Merge pull request #3225 from dchen1107/clean
...
Move GetHostName and GetDockerEndpoint methods to pkg/util
2015-01-05 16:21:51 -08:00
saadali
eb831919d9
Improve kubelet logging around container being killed due to hash change
2015-01-05 16:20:40 -08:00
saadali
f92f830e1f
Modify hash to be computed using spew library so that nested object values are used instead of pointer
2015-01-05 15:48:06 -08:00
Dawn Chen
f718957a79
Move GetHostName and GetDockerEndpoint methods to pkg/util
2015-01-05 11:44:21 -08:00
Dawn Chen
78547d9a87
Merge pull request #3194 from vishh/stats
...
Update "/stats" endpoint on kubelet.
2015-01-05 11:23:00 -08:00
Vishnu Kannan
3ef9e404c1
Update "/stats" endpoint on kubelet to take namespace as an argument as part of the API.
2015-01-03 02:17:25 +00: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
Dawn Chen
f073ecf4cc
Understand OOMKilled reason
2014-12-18 15:59:44 -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
Dawn Chen
71fc5940f1
suppress unnecessary stacktrace when http status code is redirect related.
2014-12-17 18:42:11 -08:00
Brendan Burns
928f52056e
Remove HTTP Server support for pushing pods onto the kubelet.
2014-12-17 17:15:36 -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
Brendan Burns
bb28949291
Merge pull request #2831 from jdef/unit_test_for_2815
...
unit test for #2815 , as requested by @brendandburns
2014-12-16 15:08:41 -08:00
Brendan Burns
3a0d16ff35
Add an e2e test for exec liveness probes. Fix the docker exec integration.
2014-12-16 13:53:32 -08:00
Daniel Smith
6902f6ab21
Merge pull request #2844 from brendandburns/fix
...
Handle a missing apiserver flag better.
2014-12-15 17:25:09 -08:00
bgrant0607
9bc8915eeb
Merge pull request #2912 from smarterclayton/small_v1beta3_refactors_2
...
More small refactors for v1beta3 -> internal
2014-12-15 15:16:36 -08:00
Brendan Burns
1a5a7ebd69
Handle a missing apiserver flag better.
2014-12-15 15:14:41 -08:00
Brendan Burns
2c64db5943
Merge pull request #2938 from vishh/exec
...
Updated docker version that supports exec to '1.3.0'.
2014-12-15 14:49:12 -08:00
Clayton Coleman
dadb8431c4
Remove internal PodState in favor of internal PodStatus object
2014-12-15 16:50:05 -05:00
Vishnu Kannan
f4ef05bc20
Updated docker version that supports exec to '1.3.0'.
2014-12-15 20:44:58 +00:00
Brendan Burns
a6f967b6e7
Revert "Revert "Add an api object for the kubelet, and a versioned endpoint.""
...
This reverts commit dcfcf315e5
.
2014-12-15 09:29:04 -08:00
Brendan Burns
dcfcf315e5
Revert "Add an api object for the kubelet, and a versioned endpoint."
...
This reverts commit d4b9979382
.
2014-12-12 21:13:44 -08:00
James DeFelice
3afc9fffba
fixed minor formatting
2014-12-12 20:43:07 -05:00
Brendan Burns
d4b9979382
Add an api object for the kubelet, and a versioned endpoint.
2014-12-12 15:26:28 -08:00
Jordan Liggitt
51bfb50698
Use util.Time consistently in types.go
2014-12-11 11:14:25 -05:00
Federico Simoncelli
4af64b8911
api: add container's id to ContainerStatus
...
Sometimes for external applications it is useful to correlate the pod
containers to the real docker instances.
This patch adds a new entry in the container status (containerID) which
is used to identify the instance.
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-12-10 20:38:41 +00:00
James DeFelice
85b4b4677e
unit test for #2815 , as requested by @brendandburns
2014-12-10 15:33:38 -05:00
Dawn Chen
17475cdbe7
Merge pull request #2821 from lavalamp/fix
...
Allow, when testing, SelfLinks to be unset.
2014-12-10 12:10:51 -08:00
Dawn Chen
5c79668854
Merge pull request #2815 from jdef/inspect_tagged_image
...
inspect the full repo/image:tag name
2014-12-10 11:53:14 -08: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
Saad Ali
9a1fea6927
Merge pull request #2817 from lavalamp/fix
...
Compare containers by name, not by pointer equality.
2014-12-09 17:33:56 -08:00
Daniel Smith
ba62943b8e
Compare containers by name, not by pointer equality.
2014-12-09 17:06:39 -08:00
Brendan Burns
4985f58eb5
Merge pull request #2759 from mikedanese/configure-cadvisor-port
...
make cadvisor port configurable on the kubelet
2014-12-09 15:21:35 -08:00
James DeFelice
ca2840a8e8
inspect the full repo/image:tag name
2014-12-09 15:41:08 -05: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
Mike Danese
722abf1a95
- make cadvisor port configurable on the kubelet.
...
- added cadvisor port documentation.
2014-12-06 09:48:08 -08:00
James DeFelice
76ef747927
avoid panics when docker CT has no name
2014-12-05 15:48:25 -05:00
Victor Marmol
b1c7893916
Merge pull request #2683 from jimmidyson/cadvisor-0.6.2
...
Fixes #2681 : update to cadvisor 0.6.2
2014-12-04 03:48:40 +08:00
Sam Ghods
9a9a1e0939
Move from go-yaml/yaml to ghodss/yaml
2014-12-02 16:24:05 -08:00
Tim Hockin
f4b031d025
Merge pull request #2514 from thockin/label-ns
...
Add label key namespacing
2014-12-02 13:38:46 -08:00
Brendan Burns
993ef88eec
Merge pull request #2689 from brendandburns/standalone
...
Refactor kubelet, standalone k8s and integration test to all use the same code.
2014-12-01 21:53:41 -08:00
Brendan Burns
d47b510104
Refactor kubelet, standalone k8s and integration test to all use the same code.
2014-12-01 15:37:21 -08:00
Tim Hockin
89875ef09d
Loosen DNS 952 for labels
2014-12-01 12:30:43 -08:00
Jimmi Dyson
5109ce3356
Fixes #2681 : update to cadvisor 0.6.2
2014-12-01 11:38:03 +00:00
Eric Tune
54859cf1ea
Remove format specifiers with no options.
2014-11-26 12:05:00 -08:00
Brendan Burns
a5bc6301a4
Revert "Using util.Time for ContainerStatus"
2014-11-24 21:32:31 -08:00
Daniel Smith
610ab9a0db
Merge pull request #2586 from dchen1107/cleanup
...
Using util.Time for ContainerStatus
2014-11-24 15:35:07 -08:00
Dawn Chen
acb0f1198b
Using util.Time for ContainerStatus
2014-11-24 15:15:33 -08:00
Eric Tune
f122fc94bf
Move service enviroment vars code.
...
GetServiceEnvironmentVariables (originally in pkg/registry/service/rest.go)
is split into two parts: one that lists services, and one that turns
a ServiceList into environment vars. This will allow a subsequent PR
to add a call to the latter function with an existing ServiceList.
The former part is moved into pkg/registry/pod/bound_pod_factory.go.
The latter part is put in a new package, pkg/kubelet/envvars/envvars.go.
The new package is under kubelet because the container enviroment is more
associated with kubelet than with registry.
Test code moved too.
2014-11-23 05:50:34 -08:00
Eric Tune
7d3e00c679
Remove never-needed return value.
...
Make some types private.
2014-11-21 15:11:45 -08:00
bgrant0607
9f5ebef3d8
Merge pull request #2513 from lavalamp/verifyNetwork
...
Fix crash (loop?) in kubelet
2014-11-21 10:10:32 -08:00
Daniel Smith
9116c27040
Fix crash (loop?) in kubelet
2014-11-20 18:28:23 -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
Brendan Burns
cea52d7e4f
Merge pull request #2409 from mattmoor/master
...
Implements a credentialprovider library for use by DockerPuller.
2014-11-17 21:53:25 -08:00
Matt Moore
0c5d9ed0d2
Implements a credentialprovider library for use by DockerPuller.
...
This change refactors the way Kubelet's DockerPuller handles the docker config credentials to utilize a new credentialprovider library.
The credentialprovider library is based on several of the files from the Kubelet's dockertools directory, but supports a new pluggable model for retrieving a .dockercfg-compatible JSON blob with credentials.
With this change, the Kubelet will lazily ask for the docker config from a set of DockerConfigProvider extensions each time it needs a credential.
This change provides common implementations of DockerConfigProvider for:
- "Default": load .dockercfg from disk
- "Caching": wraps another provider in a cache that expires after a pre-specified lifetime.
GCP-only:
- "google-dockercfg": reads a .dockercfg from a GCE instance's metadata
- "google-dockercfg-url": reads a .dockercfg from a URL specified in a GCE instance's metadata.
- "google-container-registry": reads an access token from GCE metadata into a password field.
2014-11-17 21:46:54 -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
ce145545b9
Add unittests to test PullPolicy.
2014-11-14 16:09:53 -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
Clayton Coleman
6d31c2bf8a
util.EncodeJSON proven harmful, remove it everywhere
...
People were misusing EncodeJSON in tests when they should be using
runtime.EncodeOrDie(testapi.Codec(), obj). Removing the potential
for cutting self on sharp objects.
2014-11-13 10:38:13 -05:00
jhadvig
f2f1708687
Setting RawTerminal attribute in LogOptions to false
2014-11-12 17:47:52 +01:00
Clayton Coleman
b5a88a4662
Merge pull request #2283 from dchen1107/deathrattle
...
Fixed Eventf with wrong arguments.
2014-11-11 10:41:51 -05:00
Dawn Chen
ada43ae233
Fixed Eventf with wrong arguments.
2014-11-10 23:53:48 -08:00
Brendan Burns
db0d98daa2
Merge pull request #2257 from jhadvig/kubelet_timeout
...
Bumping kubelet write/read timeout
2014-11-10 21:18:25 -08:00
Eric Tune
08c8f2cde1
Record event of kubelet restart re: minion obj.
2014-11-10 13:46:48 -08:00
bgrant0607
3cf17c0094
Merge pull request #2225 from dchen1107/deathrattle
...
Capture application termination messages/output
2014-11-10 11:25:14 -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
8ffbced280
Introduce terminationMessagePath to Container, and update conversion code
...
to assign the default path.
Move default setting for terminationMessagePath to conversion
from validation. Addressed other comments.
2014-11-10 10:55:56 -08:00
jhadvig
dfa076b79a
Dumping kubelet write/read timeout
2014-11-10 17:09:50 +01:00
Dawn Chen
b4ab6e6ecc
Remove dead code.
2014-11-07 11:05:35 -08:00
Mike Danese
1d76452bc2
added support for authentication against the default docker registry when provided in the .dockercfg
...
a
2014-11-06 11:52:25 -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
bgrant0607
fc0dab630c
Merge pull request #2086 from markturansky/v1beta3_refactor
...
Refactor internal API for Services to match v1beta3
2014-11-04 21:48:02 -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
markturansky
bd7643c033
refactor services to v1beta3
2014-11-04 14:23:53 -05:00
Brendan Burns
4ae3e99177
Change a spammy log to V(3)
2014-11-03 08:38:02 -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
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
Deyuan Deng
acf9d23b32
Stop httptest server.
2014-10-30 21:37:08 -04: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
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
Clayton Coleman
7550c146dc
Replace struct initializers for TypeMeta with ObjectMeta
2014-10-24 11:22:21 -04: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
Daniel Smith
91efe51770
Merge pull request #1829 from jhadvig/proxy_flush
...
Flush data periodically instead of their buffering
2014-10-21 17:01:15 -07:00
Johan Euphrosine
14c3b9d900
runonce: handle inspect error
2014-10-21 13:38:11 -07:00
Johan Euphrosine
6cd0c261b3
runonce: better container state detection
2014-10-21 12:00:51 -07:00
Brendan Burns
b47486abe7
Merge pull request #1771 from vishh/native_exec
...
Use native exec support in docker instead of exec'ing nsinit in kubelet.
2014-10-21 07:32:07 -07:00
Brendan Burns
b74854895e
Merge pull request #1921 from smarterclayton/http_listen_err_is_fatal
...
ListenAndServe on Kubelet server should be a fatal error
2014-10-21 07:23:59 -07:00
jhadvig
f759bfdf71
Implementing Flush method to httplog
2014-10-21 09:33:00 +02:00
Clayton Coleman
d0ef3f0596
ListenAndServe on Kubelet server should be a fatal error
2014-10-21 00:10:35 -04:00
Clayton Coleman
3f8d30881c
Sort of pods in test case was incorrect
2014-10-20 17:45:01 -04:00
Tim Hockin
87b0b3ad67
Better config-file logging in kubelet
2014-10-20 08:49:55 -07:00
Michal Fojtik
0bccce4520
Move error about connecting to healthz server to V(1)
2014-10-20 15:31:01 +02:00
Tim Hockin
783c0d7532
Merge pull request #1865 from brendandburns/kubelet
...
Support updates in the kubelet.
2014-10-17 17:21:16 -07:00
Dawn Chen
8858c5f897
Merge pull request #1871 from derekwaynecarr/handle_container_logs_on_alternate_namespace
...
handleContainerLogs needs a namespace to address a pod
2014-10-17 15:42:11 -07:00
Dawn Chen
7611c839e9
Merge pull request #1873 from derekwaynecarr/kubelet_handleRun_namespace_aware
...
Make kubelet handleRun work for pods in non-default namespace
2014-10-17 15:23:40 -07:00
derekwaynecarr
1f094d973d
make kubelet handleRun work for pods in non-default namespace
2014-10-17 16:12:26 -04:00
derekwaynecarr
897f1b3ab5
handleContainerLogs needs a namespace to address a pod
2014-10-17 16:00:50 -04:00
derekwaynecarr
d590af2ce5
Fixup kubelet handlePodInfo to be namespace aware
2014-10-17 14:42:46 -04:00
Brendan Burns
aa55e87ac2
Support updates in the kubelet.
2014-10-17 11:02:21 -07:00
Vishnu Kannan
7b3db4d41b
Use native exec support in docker instead of execing nsinit in kubelet.
2014-10-17 10:04:46 +00:00
Clayton Coleman
26cff8b9bf
Rename the etcd path for pods to be /registry/nodes/<>/boundpods
2014-10-16 19:29:08 -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
Dawn Chen
33ef0ca159
Make watching error logging message less severe since it is expected.
...
Fix #1653
2014-10-14 16:42:28 -07:00
Daniel Smith
a292d8c416
Merge pull request #1667 from hmrm/add-kubelet-disable-flags
...
Allow disabling non-necessary kubelet and apiserver endpoints
2014-10-10 13:38:11 -07: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
Tim Hockin
d84816aaec
Merge pull request #1709 from erictune/move_line
...
Fix format specifiers in Printf-type functions.
2014-10-09 20:40:35 -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
Eric Tune
800284164a
Fix format specifiers in Printf-type functions.
2014-10-09 17:06:32 -07:00
Haney Maxwell
c0bf974871
Allow disabling non-necessary kubelet and apiserver endpoints
2014-10-09 16:49:27 -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
Eric Tune
4e0a72734e
Handle and log errors when reading .dockercfg
2014-10-09 13:22:14 -07:00
Dawn Chen
ed4167a938
Merge pull request #1670 from proppy/fix-kubelet-runonce
...
kubelet: only check for container listed in the manifest
2014-10-09 09:31:12 -07:00
Johan Euphrosine
0fc5e68207
runonce: isPodRunning returns no error
2014-10-08 22:34:40 -07:00
Johan Euphrosine
8f010c3ec0
dockertools: add todo for container lookup
2014-10-08 22:31:59 -07:00
Johan Euphrosine
dbb2342688
runonce: list kubelet container between each iteration
2014-10-08 22:28:41 -07:00
Johan Euphrosine
14c5fd405d
kubelet: only check for container listed in the manifest
...
also wait 1 retryDelay before polling state after syncing.
2014-10-08 17:49:21 -07:00
Daniel Smith
1fc92bef53
Load cadvisor connection in background.
2014-10-08 17:06:41 -07:00
Daniel Smith
e1cb72f1ae
Merge pull request #1643 from smarterclayton/make_resource_version_a_string
...
Make ResourceVersion internally a string instead of uint64
2014-10-08 14:00:37 -07:00
Tim Hockin
2f2ef05fa8
Merge pull request #1646 from dchen1107/termination
...
Fix an issue on GetContainerInfo.
2014-10-07 17:27:56 -07:00
Dawn Chen
300c2c5f6f
Fix an issue on GetContainerInfo.
...
I believe the issue was first introduced when we append namespace to docker
container's name. This is a temporary fix for #160 .
2014-10-07 17:21:24 -07:00
Clayton Coleman
82bcdd3b3b
Make ResourceVersion a string internally instead of uint64
...
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.
This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Tim Hockin
48a9ed3147
Merge pull request #1637 from lavalamp/fix
...
Fix 'go vet' issues
2014-10-07 14:25:41 -07:00
Daniel Smith
2d048bc0f2
fix captured loop variable
2014-10-07 13:57:30 -07:00
Dawn Chen
73c8f41737
Add the missing arg in Errorf.
2014-10-07 13:53:25 -07:00