Tim Hockin
fb0a7a9693
Add apiserver proxy support for pods.
...
This is useful for testing mostly.
2014-12-23 12:51:24 -08:00
Daniel Smith
65cf5f29b7
Merge pull request #3095 from derekwaynecarr/events_not_namespace
...
Namespace scope events in storage
2014-12-22 16:01:38 -08:00
Daniel Smith
5b8e91595a
Make pod listing costant-time
...
* move ip cache out of registry/pod
* combine, rationalize, and move pod status logic
* Fix unit and integration tests
2014-12-22 14:14:03 -08:00
derekwaynecarr
b47cde2465
Namespace scope events in storage
2014-12-22 13:01:20 -05:00
Daniel Smith
9fee1b0503
Merge pull request #3051 from brendandburns/flake
...
Add a PodUnknown phase and make ListPods return even when there are errors
2014-12-19 16:45:44 -08:00
Brendan Burns
5e8490d5fe
Add a PodUnknown phase and make ListPods return even when there are errors
...
obtaining info for some pods.
2014-12-19 15:08:48 -08:00
Mike Foley
c4e94efe16
Sticky Session Implementation
...
- Added process to cleanup stale session affinity records
- Automatically set cloud provided load balancer for sticky session if the service requires it - Note, this only works on GCE right now.
- Changed sessionAffinityMap a map to pointers instead of structs to improve performance
- Commented out cookie and protocol from sessionAffinityDetail to avoid confusion as it is not yet implemented.
2014-12-18 18:46:10 -05:00
Brendan Burns
82d0d68571
Merge pull request #3027 from jdef/rest_no_network_settings
...
only log about no network settings for running pods
2014-12-18 10:19:20 -08:00
Brendan Burns
36bc3604b9
Merge pull request #2893 from brendandburns/pd3
...
Make it easier to update nodes, make it possible to update capacity.
2014-12-18 10:18:54 -08:00
Deyuan Deng
677f68ec02
Fix node Get() error code
2014-12-18 23:03:52 +08:00
James DeFelice
b3c7aa8a53
only log about no network settings for running pods
2014-12-18 08:41:56 -05:00
Brendan Burns
cf0b41535f
Make it easier to update nodes, make it possible to update capacity.
2014-12-17 21:50:26 -08:00
Dawn Chen
deafd90280
PodStatus
2014-12-17 11:39:09 -08:00
Clayton Coleman
88715cc6ef
Rename Event.Status to Event.Condition to match v1beta3 agreement
...
Question - should this be a phase? Seems like no, since phase implies
defined lifecycle and this field is explicitly not defined.
2014-12-16 09:43:10 -05:00
Deyuan Deng
45bfcb451b
Enable watch on node changes.
2014-12-16 08:12:31 +08:00
Daniel Smith
f1f20f820a
Merge pull request #2942 from brendandburns/kubelet
...
revert the revert along with fixes to make it pass e2e tests.
2014-12-15 13:17:52 -08:00
Daniel Smith
a2638da2a7
Merge pull request #2899 from derekwaynecarr/update_generic_etcd
...
Update generic etcd to enable namespace scoped resources
2014-12-15 13:10:51 -08: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
derekwaynecarr
92e2c2b302
Updated default function names, keyroot to keyrootfunc
2014-12-15 10:42:13 -05:00
derekwaynecarr
6353612f40
Update generic etcd to enable namespace scoped resources
2014-12-15 10:42:13 -05: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
Brendan Burns
d4b9979382
Add an api object for the kubelet, and a versioned endpoint.
2014-12-12 15:26:28 -08:00
Brian Grant
9b539262a8
Count only non-dead pods in replicationController current state replicas count.
2014-12-12 22:23:14 +00:00
Jordan Liggitt
51bfb50698
Use util.Time consistently in types.go
2014-12-11 11:14:25 -05:00
Brendan Burns
bac915a066
Return an error if a user attempts to create an externalized UDP balancer.
2014-12-10 20:08:03 -08:00
Daniel Smith
272bfc97ed
Merge pull request #2788 from smarterclayton/roundtrip_node_nodelist
...
Rename Minions -> Nodes internally
2014-12-10 11:12:15 -08:00
Clayton Coleman
6ab6c90ce5
Merge pull request #2665 from ddysher/fix-watch-filter
...
Move watch filter into storage level
2014-12-10 12:31:55 -05:00
Clayton Coleman
0d887ae7b3
Change podStatus from Nodes.List() -> Nodes.Get(name)
...
Retrieves a lot less data
2014-12-10 12:08:19 -05:00
Clayton Coleman
d1d7505272
Rename client Minions->Nodes, select the correct path for v1beta3
...
Replaces the client public interface but leaves old references to "minions"
for a later refactor. Selects the path "nodes" for v1beta3 and "minions"
for older versions.
2014-12-10 12:08:19 -05:00
Clayton Coleman
19379b5a38
Internal rename api.Minion -> api.Node
2014-12-10 12:08:18 -05:00
Clayton Coleman
2c27f7d332
Allow an empty service
2014-12-09 12:48:53 -05:00
Brendan Burns
33b3c1b8ce
Fix e2e.
2014-12-08 16:55:56 -08:00
Deyuan Deng
76552423f9
Move watch filter into storage level
2014-12-04 20:15:27 -05:00
Eric Tune
3f285269cc
Rename watch.Mux -> watch.Broadcaster
...
A few reasons:
- Mux is already widely used in the codebase to refer to a http handler mux.
- Original meaning of Mux was something which sent a chose one of several inputs to
and output. This sends one output to all outputs. Broadcast captures that idea
better.
- Aligns with similar class config.Broadcaster (see #2747 )
2014-12-04 00:30:51 -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
6b009f06cd
Merge pull request #2635 from thockin/public-ip
...
Enable public IPs even in not createExternal...
2014-12-01 14:56:22 -08:00
Tim Hockin
89875ef09d
Loosen DNS 952 for labels
2014-12-01 12:30:43 -08:00
Eric Tune
585afa1bae
Merge pull request #2610 from ddysher/node-namespace
...
Fix node namespace.
2014-11-26 13:02:21 -08:00
Tim Hockin
0c03f6e784
Enable public IPs even in not createExternal...
...
This allows the proxier to portal Public IPs even if the
createExternalLoadBalancer flag is not set.
This also fixes what appears to be a bug in the createExternalLoadBalancer path
wherein multiple PublicIPs would get truncated.
2014-11-26 10:54:28 -08:00
Eric Tune
636ffed399
Merge pull request #2515 from thockin/why
...
Add details on Invalid validation errors
2014-11-25 14:04:27 -08:00
Deyuan Deng
c8c7a13ac6
Fix node namespace.
2014-11-25 16:30:55 -05:00
Tim Hockin
ff8c5f9415
Add a Detail field to Validation Error
2014-11-24 17:28:42 -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
derekwaynecarr
039af4a569
Endpoint.Namespace is not being set when it has no resolved pods
2014-11-24 14:15:22 -05: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
bgrant0607
8298308d34
Merge pull request #2525 from erictune/cleanup1
...
Rename makeContainerKey -> make BoundPodsKey.
2014-11-21 14:04:11 -08:00
Eric Tune
20a8e4bf19
Rename makeContainerKey -> make BoundPodsKey.
...
Fix some typos too.
2014-11-21 13:15:08 -08:00
markturansky
8159c8fd25
Refactor PodCondition to PodPhase
2014-11-21 15:28:38 -05:00
markturansky
13cba21c6c
Add old and new DesiredState/Status to podToSelectableFields for watches
2014-11-21 09:46:05 -05:00
Deyuan Deng
a4e7604266
Merge pull request #2478 from smarterclayton/refactor_minion_to_match_v1beta3
...
Move the internal minion representation to match v1beta3
2014-11-20 21:37:43 -05:00
Clayton Coleman
156000ef6d
Move the internal minion representation to match v1beta3
...
Moves to 'Spec' and 'Status' internally and removes duplicate
fields. Moves Capacity into Spec and drops use of NodeResources
2014-11-20 20:53:08 -05: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
markturansky
8af4ccb111
v1beta3 Pod refactor
2014-11-18 09:25:42 -05:00
Deyuan Deng
c20ceea170
Add more validation for updating node.
2014-11-17 13:42:31 -05:00
Deyuan Deng
cc310e0e71
Support node label update.
2014-11-17 13:42:31 -05:00
Brendan Burns
88fa703b8e
Merge pull request #2417 from thockin/ipalloc
...
Cleanups of ipv6 changes.
2014-11-17 09:54:16 -08:00
Brendan Burns
271ed1c21e
Merge pull request #2394 from ddysher/random-fix
...
Exclude service itself when checking conflict.
2014-11-17 09:47:58 -08:00
Tim Hockin
9c218f0a19
Cleanups of ipv6 changes.
...
I was late re-reviewing and some comments did not get resolved.
2014-11-17 09:33:14 -08:00
Deyuan Deng
241f3d702b
Exclude service itself when checking conflict.
2014-11-15 10:40:40 -05:00
Brendan Burns
4a8a2b5a9f
Address comments.
2014-11-14 17:23:13 -08:00
Brendan Burns
2aa52d043b
Add external services v2 support.
2014-11-14 11:32:54 -08:00
Brendan Burns
c2485a4056
Merge pull request #2147 from justinsb/ipv6
...
Initial ipv6 / iptables work
2014-11-14 10:34:37 -08:00
Daniel Smith
de75e5a9bb
Fix server-side namespace handling for events; add validation
2014-11-14 09:43:28 -08:00
Dawn Chen
ff68b75401
Merge pull request #2333 from derekwaynecarr/validate_uid
...
Set uid during object create
2014-11-13 13:56:25 -08:00
derekwaynecarr
15701ff403
Set uid during object create
2014-11-13 15:25:49 -05:00
Deyuan Deng
c83ee59e15
Remove health check when creating node.
2014-11-12 18:55:18 -05:00
Daniel Smith
178d0af795
Fix watch for events; add test for interface implementation so it won't break again.
2014-11-12 15:22:08 -08:00
Daniel Smith
0348a67413
Merge pull request #2195 from smarterclayton/prepare_pod_template_v1beta3
...
Allow an internal pod template reference or object
2014-11-12 10:55:08 -08:00
derekwaynecarr
b326cbbe0c
Centralize minion validation
2014-11-12 12:38:15 -05:00
Daniel Smith
f1b0b64a75
Add 'source' to events field selector.
2014-11-11 15:32:13 -08:00
Clayton Coleman
94c873e7a4
Remaining refactor for PodTemplateSpec and fixing test cases
2014-11-11 17:03:20 -05:00
Deyuan Deng
38abf0c7ad
Return success when registrying unhealthy node.
2014-11-07 15:45:15 -05:00
Justin SB
b19170f335
gofmt
2014-11-07 06:34:18 -08:00
Justin SB
04313ff173
Create ip_allocator that copes with IPv6
...
It uses a set (via a map) of allocated IPs
2014-11-06 21:26:26 -08:00
markturansky
119f654a13
Refactor PodStatus to PodCondition in internal API for v1beta3
2014-11-05 17:26:47 -05:00
Daniel Smith
3bd10d4fb4
Merge pull request #2145 from lavalamp/eventing2
...
Add a placeholder to boundPod's SelfLink
2014-11-05 13:49:53 -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
bgrant0607
c7ff31004b
Merge pull request #2094 from brendandburns/svc
...
Add some validation for externalized service ports.
2014-11-04 13:04:56 -08:00
markturansky
bd7643c033
refactor services to v1beta3
2014-11-04 14:23:53 -05:00
Daniel Smith
724db61c1d
Add a placeholder to boundPod's SelfLink, and test that one can make references to them.
2014-11-03 17:46:33 -08:00
Dawn Chen
c4aa4d28a6
Merge pull request #2120 from brendandburns/uuid
...
Add some blocking so that we don't generate identical UUIDs for API objects.
2014-11-03 15:32:56 -08:00
Brendan Burns
f556f2f82f
Add some validation for externalized service ports.
2014-11-03 13:36:34 -08:00
Brendan Burns
a624630112
Add some blocking so that we don't generate identical UUIDs for API objects.
2014-11-03 13:27:59 -08:00
Brendan Burns
32a04e48fd
Make endpoints return 400 instead of 500
2014-11-02 20:08:06 -08:00
Daniel Smith
7146ec9d49
Implement kubernetes & kubernetes-ro services
2014-10-29 11:29:28 -07:00
Daniel Smith
94e736e286
Merge pull request #2009 from smarterclayton/unify_meta
...
Unify Accessor for ObjectMeta/TypeMeta/ListMeta
2014-10-29 09:58:46 -07:00
deads2k
613bf93eaf
expose ParseWatchResourceVersion for downstream use
2014-10-28 16:29:33 -04:00
Daniel Smith
66b43a5e87
fix build
2014-10-28 12:44:24 -07:00
Clayton Coleman
5cb3c10289
Merge pull request #1782 from smarterclayton/allow_put_to_set_create
...
Allow clients to determine the difference between create or update on PUT
2014-10-28 13:40:41 -04:00
Tim Hockin
bb5ca0f91b
Respect a requested PortalIP if possible
2014-10-27 14:03:52 -07:00
Clayton Coleman
66ace4c270
Begin to unify ResourceVersioner and SelfLinker
...
Create a new MetadataAccessor interface that combines both
and use it where previously latest.ResourceVersioner and SelfLinker
were being used.
Adds Namespace to the get/set interface. Adds TODO about future
fast path for metadata (as per thockin's comment)
2014-10-27 16:00:55 -04:00
Clayton Coleman
d5ee171410
Allow clients to determine the difference between create or update on PUT
...
PUT allows an object to be created (http 201). This allows REST code to
indicate an object has been created and clients to react to it.
APIServer now deals with <-chan RESTResult instead of <-chan runtime.Object,
allowing more data to be passed through.
2014-10-24 14:41:15 -04:00
derekwaynecarr
c6eb371c93
Fixup unit tests
2014-10-24 11:49:04 -04:00
derekwaynecarr
580cb5ea4f
Rework client.Interface
2014-10-24 11:47:30 -04: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
Clayton Coleman
09800643e2
Change validation now that namespace is on ObjectMeta
2014-10-24 11:22:20 -04:00
Haney Maxwell
3160500940
Refactor kubelet access and add SSL
2014-10-22 14:53:59 -07:00
Clayton Coleman
91d9a90e4e
Replace use of "id" in strings with "name"
2014-10-22 15:59:12 -04:00
Clayton Coleman
bb77a5d15f
Rename ID -> Name
2014-10-22 15:00:26 -04:00
deads2k
34b5861b60
add unit tests for rejection of conflicting namespaces
2014-10-21 15:57:02 -04:00
Daniel Smith
f748e2d2c5
Implement redirection & proxying for minions
2014-10-20 11:28:12 -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
8d37319982
Fix borrow and carry in IPAllocator
2014-10-17 17:13:22 -07:00
Daniel Smith
f1e0290605
fix broken test
2014-10-17 15:21:03 -07:00
derekwaynecarr
e2c888795c
Fix typo etcd registry
2014-10-17 16:22:57 -04:00
derekwaynecarr
1d6c937183
Wrong method call to watch service endpoints key
2014-10-17 13:34:42 -04: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
6ae611aedd
Write BoundPods to etcd instead of ContainerManifestList
...
Rename ManifestFactory -> BoundPodFactory and change the general structure
of the call to focus on BoundPod.
2014-10-16 19:29:08 -04:00
derekwaynecarr
085ca40291
Enforce unique constraint at namespace boundary in etcd, make client and server namespace aware
2014-10-16 13:02:52 -04:00
Tim Hockin
e907011111
Core support for ip-per-service
2014-10-16 08:36:47 -07:00
Deyuan Deng
ec46e94dc2
Create MinionController to sync minions from cloudprovider (pkg cloudprovider/controller).
2014-10-14 18:45:25 -04:00
Dawn Chen
f01fd8ff38
After all containers in a pod started. If any one container is still running,
...
or in the process of restarting, mark pod status running.
Fix #1758 .
2014-10-14 10:26:31 -07:00
Daniel Smith
841e9e87ff
Merge pull request #1713 from brendandburns/update
...
Add update to the pod etcd handler.
2014-10-13 17:42:30 -07:00
Brendan Burns
4380637be7
Add update to the pod etcd handler.
2014-10-13 17:27:31 -07:00
Daniel Smith
b1a6b3eee8
Split generic; add test, address other review comments
2014-10-10 15:47:34 -07:00
Daniel Smith
d3d9f7ac8b
ObjectDiff moved after rebase
2014-10-10 15:47:34 -07:00
Daniel Smith
3e076e12fe
Add event registry and type
2014-10-10 15:46:49 -07:00
Daniel Smith
9a9362e896
Add generic registry object so we can stop rewriting this code
2014-10-10 15:46:49 -07:00
Brendan Burns
9ffa69ce15
Merge pull request #1696 from derekwaynecarr/pod_cache_needs_namespace
...
Pod cache needs to be namespace-aware
2014-10-10 08:28:32 -07:00
derekwaynecarr
9e60bf1e43
Pod cache needs to be namespace-aware
2014-10-10 09:35:31 -04: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
Eric Tune
800284164a
Fix format specifiers in Printf-type functions.
2014-10-09 17:06:32 -07:00
Daniel Smith
9b42f62da3
Merge pull request #1705 from erictune/dead
...
Delete unused function.
2014-10-09 17:05:34 -07:00
Eric Tune
8296f038ac
Delete unused function.
2014-10-09 16:40:11 -07:00
Deyuan Deng
15e5b876b8
Change ContainsMinion to GetMinion
2014-10-08 23:41:15 -04: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
Daniel Smith
ee107d3fad
fix extra un-cosmetic extraneous code.
2014-10-07 14:08:18 -07:00
Daniel Smith
4dd3094035
Fix mismatched arg and formatter in Errorf
2014-10-07 14:03:06 -07:00
Deyuan Deng
4de810efb4
Rebase to master, change JSONBase to TypeMeta.
2014-10-07 16:22:36 -04:00
Deyuan Deng
c3d9197a4b
Rename InsertMinion to CreateMinion.
2014-10-07 16:22:35 -04:00
Deyuan Deng
4a35325f29
Use etcd as backend for minion registry.
2014-10-07 16:22:35 -04:00
Clayton Coleman
d3e51a0f24
Rename JSONBase -> TypeMeta in preparation for v1beta3
...
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Brendan Burns
fca26ccc65
Merge pull request #1569 from dchen1107/termination
...
Initial support to propagating the termination reasons and image failures
2014-10-06 16:56:23 -07:00
Brendan Burns
130784bfdf
Merge pull request #1594 from thockin/ipallocator
...
Add an IPAllocator type
2014-10-06 16:56:00 -07:00
Dawn Chen
8d0ed93aa1
Clean unittests
2014-10-06 13:37:22 -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
Brendan Burns
7c694d2cad
Merge pull request #1596 from thockin/unbound
...
Better handling of unbound pods.
2014-10-06 13:31:41 -07:00
Tim Hockin
372aa07b58
Better handling of unbound pods.
...
A small collection of tweaks to better handle pods when they are not currently
bound to a host.
2014-10-06 12:27:18 -07:00
Tim Hockin
8131a5ca6a
Add an IPAllocator type
2014-10-06 09:02:04 -07:00
Deyuan Deng
7bae027604
Fix bug in minion registrytest.
2014-10-05 15:55:26 -04:00
Brendan Burns
1551b48347
Add a resource fit scheduler predicate. Set sensible defaults.
2014-10-03 15:09:59 -07:00
Brendan Burns
a115840e4f
Add a caching layer, so we don't pound cloud providers for ip addresses.
2014-10-02 21:51:09 -07:00
derekwaynecarr
6625e58a20
Updates to review comments
2014-10-01 10:57:50 -04:00
derekwaynecarr
0312d80ffa
Update test cases to use default context
2014-10-01 10:57:50 -04:00
derekwaynecarr
e4ec49ee6b
Require namespace on controller, pod, service objects
2014-10-01 10:57:50 -04:00
Tim Hockin
04cdf286a4
Make and use api.Protocol type
2014-09-27 20:31:37 -07:00
Brendan Burns
17c82606eb
Second step in decoupling the service controller, use the apiserver for writes too.
2014-09-26 16:44:25 -07:00
derekwaynecarr
b7fcc7d3ec
Add ctx to registry test cases
2014-09-26 15:19:22 -04:00
derekwaynecarr
09365fed8d
Add ctx to registry interfaces
2014-09-26 15:18:42 -04:00
derekwaynecarr
ee19ba186d
Update to use api.Context
2014-09-26 11:50:34 -04:00
derekwaynecarr
be85ad7a3d
Add context object in test cases flows
2014-09-26 11:50:34 -04:00
derekwaynecarr
3e685674e7
Add context object to interfaces
2014-09-26 11:50:34 -04:00
Brendan Burns
377a9ac3d7
Merge pull request #1438 from lavalamp/eventing3
...
Event impl supporting changes
2014-09-25 22:01:09 -07: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
Daniel Smith
4d4ebcd38e
Add ttl parameter to CreateObj
2014-09-25 12:08:14 -07:00
Tim Hockin
eea0265598
Merge pull request #1447 from lavalamp/fix
...
Fix type cast problems now that watch can pass errors
2014-09-25 12:06:17 -07:00
Daniel Smith
212f5305a8
Fix type cast problems now that watch can pass errors
2014-09-25 11:42:58 -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
Tim Hockin
b2472d8bec
Fix docker-links-style env vars for services
...
This includes 3 changes:
1) Use the Service.Protocol field, rather than hardcoding TCP.
2) Use Service.Port rather than ContainerPort - ContainerPort can be a string
and has absolutely no meaning to consumers.
3) Beef up tests for these env vars.
2014-09-24 12:29:06 -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
089c5602fd
Add per-service env vars for *_SERVICE_HOST
...
As a replacement of a single SERVICE_HOST variable, offer a FOO_SERVICE_HOST
variable. This will help ease the transition to ip-per-service, where there
is no longer a single service host.
# *** ERROR: *** Some files are missing the required boilerplate
# header from hooks/boilerplate.txt:
# examples/guestbook/redis-slave/run.sh
#
# Your commit will be aborted unless you fix these.
# COMMIT_BLOCKED_ON_BOILERPLATE
2014-09-24 09:07:21 -07:00
Brendan Burns
253bce42fe
Extract the minion registry from the etcd implementation into the pod registry where it belongs.
2014-09-23 15:42:59 -07:00
Daniel Smith
f211e46f20
handle watch errors everywhere
2014-09-22 17:37:12 -07:00
Daniel Smith
bdc8d898fa
Merge pull request #1376 from ddysher/minion-test-fix
...
Fix minion registry test insert.
2014-09-19 12:50:29 -07:00
Brendan Burns
06316f4861
Merge pull request #1375 from ddysher/pod-rest-test
...
Out of place test table
2014-09-19 10:03:01 -07:00
Clayton Coleman
5483333e29
Allow server and client to take api version as argument
...
* Defaults to v1beta1
* apiserver takes -storage_version which controls etcd storage version
and the version of the client used to connect to other apiservers
* Changed signature of client.New to add version parameter
* All controller code and component code prefers the oldest (most common)
server version
2014-09-18 23:27:28 -04:00
Deyuan Deng
0c8d9ba870
Fix minion registry test insert.
2014-09-18 23:04:10 -04:00
Deyuan Deng
f966a51fc0
Out of place test table
2014-09-18 21:44:52 -04:00
Brendan Burns
edf3eb04e2
Fix the build.
2014-09-18 15:29:17 -07:00
Daniel Smith
12b677ad56
Merge pull request #1356 from brendandburns/healthz
...
Adjust the logic, so that if the apiserver restarts, or has no pod info
2014-09-18 15:15:24 -07:00
Joe Beda
4487f311ab
Merge pull request #1326 from lavalamp/scheduler
...
Fix cache to use the "List then Watch" pattern.
2014-09-18 09:00:52 -07:00
Brendan Burns
17cbde0c5a
Adjust the logic, so that if the apiserver restarts, or has no pod info
...
for some other reason, pods on missing machines are still 'terminated'
2014-09-17 21:57:11 -07:00
Brendan Burns
99586b4da4
Fix a problem where if a minion went missing, we still thought the pod was running.
...
Also convert some tests to table driven.
2014-09-17 18:16:52 -07:00
Daniel Smith
4e9cf2ccb4
Add field selector to List, implement for pods.
2014-09-16 16:17:16 -07:00
Clayton Coleman
61e3ce7ddc
Make runtime less global for Codec
...
* Make Codec separate from Scheme
* Move EncodeOrDie off Scheme to take a Codec
* Make Copy work without a Codec
* Create a "latest" package that imports all versions and
sets global defaults for "most recent encoding"
* v1beta1 is the current "latest", v1beta2 exists
* Kill DefaultCodec, replace it with "latest.Codec"
* This updates the client and etcd to store the latest known version
* EmbeddedObject is per schema and per package now
* Move runtime.DefaultScheme to api.Scheme
* Split out WatchEvent since it's not an API object today, treat it
like a special object in api
* Kill DefaultResourceVersioner, instead place it on "latest" (as the
package that understands all packages)
* Move objDiff to runtime.ObjectDiff
2014-09-16 16:26:43 -04:00
Clayton Coleman
154a91cd33
Rename runtime.DefaultScheme to latest.Codec for ease of readability
2014-09-16 16:19:35 -04:00
Clayton Coleman
fe614aeda2
Simple refactor for ease of readability
...
runtime.DefaultCodec -> latest.Codec
2014-09-16 16:12:35 -04:00
derekwaynecarr
0c20fffa06
No DNS in vagrant cross minions, need explicit IP as host
2014-09-11 13:38:50 -04:00
Brendan Burns
e7625c8d91
Add current state to replica controller.
2014-09-09 16:19:18 -07:00
Brendan Burns
4ba4762827
Insert the current state of a replica controller.
2014-09-09 15:23:34 -07:00
Daniel Smith
41754f5bd4
Merge pull request #1192 from smarterclayton/standardize_etcd_errors
...
Return standard API errors from etcd registry by operation
2014-09-08 15:57:08 -07:00
Clayton Coleman
3ffe259ac7
Return standard API errors from etcd registry by operation
...
Adds pkg/api/errors/etcd, which defines default conversions
for common CRUD operations from etcd to api.
2014-09-08 18:46:01 -04:00
Daniel Smith
759c3f9033
Rename all XStorage types to REST for clarity
2014-09-08 15:19:13 -07:00
Dawn Chen
7ace5a3e83
Passing pod UUID to Kubelet.
2014-09-08 14:24:09 -07:00
brendandburns
753b80c9b8
Merge pull request #1105 from lavalamp/proxy
...
Add a generic proxier
2014-09-08 12:51:24 -07:00
Daniel Smith
fc09f988b4
Make tests pass again
2014-09-07 22:26:42 -07:00
Daniel Smith
0d30a656ef
Do interface{} -> runtime.Object rename everywhere
2014-09-07 22:19:24 -07:00
Daniel Smith
1c2b65788d
Rename Codec and ResourceVersioner to add Default in front, to allow for types of those names
2014-09-07 22:19:24 -07:00
Daniel Smith
e2b645ec15
Add a generic proxier
...
To proxy traffic to anything that implements ResourceLocation.
Currently, this is only services. This is easily extensible to minions
(would supercede existing mechanism) and pods.
2014-09-05 13:33:30 -07:00
Clayton Coleman
34c40e4e48
Errors should be part of api/errors, not apiserver
...
Renames constructor methods to be errors.New<name> which changed a few
places.
2014-09-03 17:16:00 -04:00
Clayton Coleman
01e668187c
Services and Endpoints weren't properly sync'ing
...
They need incremental changes and a resync on start.
2014-09-03 16:04:55 -04:00
Daniel Smith
a63966e73c
Combine pkg/apitools and pkg/api/common and call the result pkg/runtime
2014-09-02 11:15:44 -07:00
Daniel Smith
099c8fd36f
Propagate rename; tests pass again.
2014-09-02 10:42:06 -07:00
Vojtech Vitek (V-Teq)
42c656501c
Add several missing pkg Godoc files
...
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:11 +02:00
Vojtech Vitek (V-Teq)
59f58cd043
Unify Godoc formatting, fix various typos
...
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-09-02 13:41:03 +02:00
Deyuan Deng
d528949547
Fix pod status error with List method.
2014-09-01 21:23:50 -04:00
Joe Beda
2d8e160775
Merge pull request #1117 from lavalamp/fixApi
...
Invert api and api/v1beta1 dependencies
2014-08-29 14:59:15 -07:00
Daniel Smith
aa9b9b9fa8
Invert api and api/v1beta1 dependencies
...
This is some cleanup that has been needed for a while.
There's still one more step that could usefully be done, which is to
split up our api package into the part that provides the helper
functions and the part that provides the internal types. That can come
later.
The v1beta1 package is now a good example of what an api plugin should
do to version its types.
2014-08-29 12:15:30 -07:00
Clayton Coleman
bafc422ac0
Add the resource version to api.*List items from etcd
...
Allows clients to watch more easily (can invoke Get, then
Watch).
2014-08-28 23:17:00 -04:00
Brian Waldon
816c4a3c76
Remove unnecessary parameter from NewRegistry
2014-08-28 16:52:45 -07:00
Daniel Smith
4de254444e
Add simple service redirection
2014-08-27 20:51:41 -07:00
Clayton Coleman
083d81b6d7
Expose REST resource for endpoints and watch on services/endpoints
...
Will allow kube-proxies to listen on endpoints.
2014-08-27 15:49:01 -04:00
Clayton Coleman
b5e1e044bc
Move EndpointsController to its own package
...
Avoids recursive loop with endpoint registry defined
2014-08-27 15:49:00 -04:00
Clayton Coleman
52923a1348
Return validation errors from storage create/update
2014-08-26 13:30:55 -04:00
Daniel Smith
72b35816cd
Need to remove pods that change labels.
2014-08-25 15:56:54 -07:00
brendandburns
5155222edc
Merge pull request #961 from lavalamp/removeAssignCall
...
Remove synchronous assignPod call from create pod
2014-08-25 15:25:27 -07:00
Daniel Smith
b8c57ea181
Merge pull request #1006 from satnam6502/master
...
Make validation check for legal service port numbers.
2014-08-25 14:51:22 -07:00
Daniel Smith
98ef76c164
Remove references to scheduler from pod storage.
2014-08-25 11:59:00 -07:00
Daniel Smith
ddba004ad0
Add constraint package to let us reject invalid assignments.
2014-08-25 11:59:00 -07:00
Daniel Smith
0a1dfa366e
Make integration test pass.
2014-08-25 11:59:00 -07:00
Daniel Smith
29e9e13188
Remove synchronous assignPod call from create pod
2014-08-25 11:59:00 -07:00
Brendan Burns
3012c10ae3
Add a log when we drop a minion because of health checks.
2014-08-25 11:43:02 -07:00
Satnam Singh
4105f7ef61
Code review changes to adjust pacakge name for storage_test.go
2014-08-25 10:38:11 -07:00
Clayton Coleman
58f8ac860f
Set creation timestamp on services
2014-08-23 14:33:24 -04:00
Satnam Singh
7fcaf80f67
Make validation check for legal serive port numbers.
2014-08-22 14:44:21 -07:00
Brendan Burns
5839378adc
Add a validation that replicaSelector matches PodTemplate.Labels
2014-08-21 22:18:55 -07:00
brendandburns
8f5dd8cf63
Merge pull request #984 from thockin/make_vs_new
...
Rename a bunch of "Make" functions to "New"
2014-08-20 22:06:57 -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
brendandburns
1bd4ae0c62
Merge pull request #943 from smarterclayton/only_wait_for_acceptance
...
Clients must wait for completion of actions
2014-08-20 21:01:21 -07:00
Tim Hockin
95e0be9a63
Move FakeCloud into its own pkg
2014-08-20 20:16:41 -07:00
Clayton Coleman
493863eb93
Return immediately when controllers/pods are committed
...
Add client waiting conditions.
2014-08-20 18:46:10 -04:00
Brendan Burns
a198bbb0ae
Switch api.Status to *api.Status in a bunch of places.
2014-08-20 10:21:49 -07:00
Deyuan Deng
c104551025
Improve pkg/registry/service code coverage.
2014-08-19 20:13:00 -04:00
brendandburns
88baa52134
Merge pull request #918 from lavalamp/bindImpl
...
Implement bindings
2014-08-18 18:19:33 -07:00
Daniel Smith
d363d5d942
Merge pull request #944 from brendandburns/service
...
Add a better test for service environment variables. Fix bugs.
2014-08-18 16:59:21 -07:00
Daniel Smith
138b560efb
Implement bindings
...
This will effectively cause no changes until we remove the assignPod
call from CreatePod().
2014-08-18 16:55:44 -07:00
Brendan Burns
3eb044b495
Add a better test for service environment variables
...
Fix bugs.
2014-08-18 16:53:59 -07:00
Daniel Smith
4b2867fd8a
Standardize watch usage in registry/storage objects. Fix up extremely confusing pod test object.
2014-08-16 19:07:41 -07:00
Daniel Smith
e40e5b53a7
Add Watch to /pods.
2014-08-16 19:07:29 -07:00
Daniel Smith
26e2256178
Remove unused and not completely correct code
2014-08-15 18:20:37 -07:00
Paul Morie
c69160059b
Change CreationTimestamp to a util.Time and set in each storage implementation
...
Because time.Time doesn't work correctly with our YAML package, it is necessary
to introduce a type, util.Time, which serializes correctly to JSON and YAML.
Eventually we would like timestamping to cut across storage implementations;
for now, we set it in each storage.
2014-08-14 16:26:29 -04:00
Clayton Coleman
231ed95a61
Typo in name
2014-08-13 14:36:23 -04:00
Kelsey Hightower
c21a0ca39f
Breakup the registry package into separate packages.
...
Currently all registry implementations live in a single package,
which makes it bit harder to maintain. The different registry
implementations do not follow the same coding style and naming
conventions, which makes the code harder to read.
Breakup the registry package into smaller packages based on
the registry implementation. Refactor the registry packages
to follow a similar coding style and naming convention.
This patch does not introduce any changes in behavior.
2014-08-11 20:58:09 -07:00
Clayton Coleman
c6dcfd544f
Merge pull request #839 from yugui/fix/api-status
...
Make storage.Delete return *api.Status instead of api.Status
2014-08-11 20:01:28 -04:00
Daniel Smith
c372b74bc8
Merge pull request #847 from thockin/health
...
Use IntOrString for health checks
2014-08-11 16:28:24 -07:00
brendandburns
3222f61bca
Merge pull request #557 from lavalamp/podLocation
...
Prepare for external scheduler
2014-08-11 15:27:24 -07:00
Daniel Smith
b5352a81c7
Use DesiredState rather than CurrentState for Host.
2014-08-11 15:12:51 -07:00
Daniel Smith
b7752a86d4
Add debugging info printing to etcd fake
...
And make tests pass again.
2014-08-11 13:09:24 -07:00
Tim Hockin
7201227cb1
Use IntOrString for HTTP health check ports
...
Clean up code to be more testable. Add test cases for named and numeric
ports in HTTP health checks. Improve tests.
2014-08-10 23:26:42 -07:00
Daniel Smith
7d605467dc
New scheduler API
...
This commit adds a Binding object. The idea is that schedulers can write
these to cause pods to be asssigned to hosts. I'll provide an implementation
along with a rudimentary scheduler plugin.
This continues k8s' tradition of phrasing all APIs as RESTful handlers.
2014-08-10 19:05:03 -07:00
Daniel Smith
5cdce0e35a
Prepare for external scheduler
...
1. Change names of Pod statuses (Waiting, Running, Terminated).
2. Store assigned host in etcd.
3. Change pod key to /registry/pods/<podid>. Container location remains
the same (/registry/hosts/<machine>/kublet).
2014-08-10 15:05:36 -07:00
Yuki Yugui Sonoda
d359f3c396
Make storage.Delete return *api.Status instead of api.Status
...
as apiserver.APIServer.finishReq expects.
This solves the warning in finishReq:
"programmer error: use *api.Status as a result, not api.Status."
2014-08-09 22:18:24 +09:00
Daniel Smith
49cded3800
Simplify ResourceWatcher interface to one function.
2014-08-08 14:09:13 -07:00
Daniel Smith
71709ae09e
Make replication controller use client
2014-08-08 14:09:13 -07:00
Daniel Smith
283fdba6ab
Add more parameters to Watch
...
* Add labels selector (same as List)
* Add fields selector
* Plan to let you select pods by Host and/or Status
* Add resourceVersion to let you resume a watch where you left off.
2014-08-08 14:09:13 -07:00
Clayton Coleman
c9fc0bcf3d
Decouple apiserver from codec implementation
...
The apiserver on initialization must be provided with a codec
for encoding and decoding all handled objects including api.Status
and api.ServerOp. In addition, the RESTStorage Extract() method
has been changed to New(), which returns a pointer object that the
codec must decode into (the internal object). Switched registry
methods to use pointers for Create/Update instead of values.
2014-08-07 13:35:35 -04:00
Clayton Coleman
67dbd15929
Address remaining comments from #756
...
Rename Encoding to Codec, Versioning to ResourceVersioner. Add
GoDoc. Add Delete(key, recursive) to EtcdHelper
2014-08-06 11:25:35 -04:00
Daniel Smith
860050b507
Merge pull request #745 from smarterclayton/add_structured_reason
...
Evolve the api.Status object with Reason/Details
2014-08-05 13:28:19 -07:00
Clayton Coleman
4f88b778a6
Evolve the api.Status object with Reason/Details
...
Contains breaking API change on api.Status#Details (type change)
Turn Details from string -> StatusDetails - a general
bucket for keyed error behavior. Define an open enumeration
ReasonType exposed as Reason on the status object to provide
machine readable subcategorization beyond HTTP Status Code. Define
a human readable field Message which is common convention (previously
this was joined into Details).
Precedence order: HTTP Status Code, Reason, Details. apiserver would
impose restraints on the ReasonTypes defined by the main apiobject,
and ensure their use is consistent.
There are four long term scenarios this change supports:
1. Allow a client access to a machine readable field that can be
easily switched on for improving or translating the generic
server Message.
2. Return a 404 when a composite operation on multiple resources
fails with enough data so that a client can distinguish which
item does not exist. E.g. resource Parent and resource Child,
POST /parents/1/children to create a new Child, but /parents/1
is deleted. POST returns 404, ReasonTypeNotFound, and
Details.ID = "1", Details.Kind = "parent"
3. Allow a client to receive validation data that is keyed by
attribute for building user facing UIs around field submission.
Validation is usually expressed as map[string][]string, but
that type is less appropriate for many other uses.
4. Allow specific API errors to return more granular failure status
for specific operations. An example might be a minion proxy,
where the operation that failed may be both proxying OR the
minion itself. In this case a reason may be defined "proxy_failed"
corresponding to 502, where the Details field may be extended
to contain a nested error object.
At this time only ID and Kind are exposed
2014-08-05 16:17:53 -04:00
Brendan Burns
c27ab18481
Don't use zone for regional load balancers.
2014-08-05 11:38:33 -07:00
Clayton Coleman
325f9ef005
Make create atomic on etcd for Services/ReplControllers
2014-08-05 01:12:27 -04:00
Tim Hockin
7f0d470979
Merge pull request #776 from nyaxt/respectzone
...
ServiceRegistryStorage.Delete should respect zone.
2014-08-04 14:29:46 -07:00
Tim Hockin
471955d310
Merge pull request #775 from nyaxt/misc_cleanup
...
Minor clean ups for readability
2014-08-04 14:29:07 -07:00
Kouhei Ueno
d7fc4637e9
ServiceRegistryStorage.Delete should respect zone.
2014-08-05 06:11:00 +09:00
Kouhei Ueno
c6ebc4859e
Reduce nesting on ServiceRegistryStorage.Create
2014-08-05 05:38:31 +09:00
Brendan Burns
ab4918464e
Switched Set to Create
2014-08-04 12:10:16 -07:00
brendandburns
27426db827
Merge pull request #756 from smarterclayton/expose_encoding_versioning_interfaces
...
Expose an Encoding/Versioning interface for use with etcd
2014-08-04 10:10:54 -07:00
Clayton Coleman
ef1329b6c8
Remove expectNoError from pkg/registry
2014-08-04 09:36:47 -04:00
Clayton Coleman
4448be2d95
Expose an Encoding/Versioning interface for use with etcd
...
etcd_tools.go is not dependent on the specific implementation
(which is provided by pkg/api). All EtcdHelpers are created
with an encoding object which handles Encode/Decode/DecodeInto.
Additional tests added to verify simple atomic flows.
Begins to break up api singleton pattern.
2014-08-03 21:35:33 -04:00
Daniel Smith
7dbb6f02fe
Begin systemizing files in pkg/registry
...
Files that have RESTStorage implementations now end in "storage", and
files that have registries now end in "registry". I removed some
underscores in file names, since it seems to be go style not to have
them. I split minion_registry.go into two files.
We should consider splitting this package into two, to make more clear
the separation between the layers.
2014-07-31 17:24:15 -07:00
Daniel Smith
928092e79e
Etcd watcher verification
...
To make sure the etcd watcher works, I changed the replication
controller to use watch.Interface. I made apiserver support watches on
controllers, so replicationController can be run only off of the
apiserver. I made sure all the etcd watch testing that used to be in
replicationController is now tested on the new etcd watcher in
pkg/tools/.
2014-07-31 14:54:30 -07:00
brendandburns
b0d18b2af0
Merge pull request #571 from lavalamp/master
...
Decode/Encode everywhere
2014-07-29 17:19:33 -07:00
Daniel Smith
e10d85efce
Merge pull request #685 from smarterclayton/error_on_empty_service
...
Cleanly delete service without endpoints key
2014-07-29 09:45:31 -07:00
Daniel Smith
4a1660be7c
Merge pull request #679 from dchen1107/minionlogs
...
Fix #663
2014-07-29 09:37:55 -07:00
Clayton Coleman
a49b331794
Cleanly delete service without endpoints key
...
If a service is deleted before the etcd key corresponding to its
endpoints has been created, a 500 error is returned (etcd key
not found). Instead, key not found should be ignored silently.
There is a potential race condition with the controller creating
endpoints after the service has been deleted which a cleanup task
should handle in the future.
Closes #684
2014-07-29 11:44:46 -04:00
Dawn Chen
58008510a0
Fix #663
...
Return all healthy minions instead of only returning the first several
healthy minions. Without the PR, if the first minion failed with health
check, the machine list is empty, thus GET /api/v1beta1/pods failed
with code 500
2014-07-29 00:24:53 -07:00
Daniel Smith
f87bd6b8f9
Merge pull request #628 from jdef/master
...
named container ports should have sane env var names
2014-07-28 23:05:48 -07:00
Daniel Smith
cd0b25f1e5
Merge pull request #639 from rafael/validate_pods
...
Validate pod on create and update.
2014-07-28 18:49:51 -07:00
Rafael Chacón
c9a3ab168d
Validate pod on create and update.
...
* This commit adds pod validations on when creating and updating a pod.
2014-07-28 18:02:30 -07:00
Daniel Smith
811d710385
Merge pull request #674 from brendandburns/service
...
Don't hard code load balancer zone.
2014-07-28 17:15:22 -07:00
Brendan Burns
c717b872a3
Don't hard code load balancer zone.
2014-07-28 15:54:16 -07:00
Daniel Smith
31a78c3e2b
Merge pull request #619 from brendandburns/controller
...
Make individual controller actions asynchronous.
2014-07-28 15:35:19 -07:00
Brendan Burns
1a3e4f8baf
Add some more synchronization.
2014-07-28 15:05:39 -07:00
Daniel Smith
b3cc696486
All types stored in etcd are now API objects.
...
This means I made an api.ContainerManifestList, and added a JSONBase to
endpoints (and changed Name -> JSONBase.ID).
2014-07-28 11:27:36 -07:00
Clayton Coleman
5bc19584a5
Update Service and ReplControllers to validate
...
Validations are performed on update and on create.
2014-07-27 19:55:03 -04:00
James DeFelice
8e3e65e0f3
named container ports should have sane env var names
2014-07-25 17:55:52 -04:00
Brendan Burns
bf5ae4bb9d
Fork API types.
2014-07-24 21:47:08 -07:00
Jonathan Boulle
c43035088b
assorted formatting and typo fixes
2014-07-24 15:10:36 -07:00
Kelsey Hightower
fce90dc761
Improve test coverage for the health package and remove mocks
...
The current tests for the health package utilize a fake HTTP client
for testing health checks and only cover a limited set of test cases.
This patch removes the need for mocks by using the httptest package
from the standard library. After removing the fake HTTP client a bug
was found in the health.Check function; it incorrectly assumes that
a http.Response is always non-nil. Fix the issue by moving the defer
that closes the http.Response.Body after error handling.
Related tests in the registry package have be refactored to work with
the changes made to the health.Check function. All methods that implement
the health.HTTPGetInterface interface now return a http.Response with
with a noop http.Response.Body.
This patch does not introduce any changes in behavior.
2014-07-21 15:30:29 -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
Daniel Smith
60b6f5b6bd
Merge pull request #524 from brendandburns/service
...
Make the service reconciller use the API, not a PodRegistry
2014-07-18 15:01:09 -07:00
Brendan Burns
c6255afe37
Make the service reconciller use the API, not a PodRegistry
2014-07-18 13:54:33 -07:00
Daniel Smith
d8faca9e81
Merge pull request #512 from smarterclayton/communicate_missing_pod_info
...
PodInfo should indicate when a pod is not found
2014-07-18 13:03:16 -07:00
Jonathan Boulle
9e63c3a633
assorted formatting and typo fixes
2014-07-18 13:02:59 -07:00
Clayton Coleman
a17f0d04d4
PodInfo should indicate when a pod is not found
...
Client should react. Also, dial down the chattiness of errors for
pods which do not exist and stop processing NotFound earlier in
the podinfo chain
2014-07-18 13:32:10 -04:00
Brendan Burns
fa69781b41
Add some more logging to service updates.
2014-07-18 09:29:49 -07:00
Yuki Yugui Sonoda
2aa3de12d4
Make RESTful operations return 404 Not Found when the target resource
...
does not exist.
In the original implementation, GET, DELETE and PUT operations on
non-existent resources used to return 500 but not 404.
2014-07-18 14:16:56 +09:00
Brendan Burns
dceafbadab
Add a caching minion registry.
2014-07-16 14:52:32 -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
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
3cc5ff15cf
Update services to use the internal IP and port, now that its available.
2014-07-14 20:24:58 -07:00
Brendan Burns
0e798bcc3c
Add link env vars.
2014-07-14 16:37:17 -07:00
Kouhei Ueno
12c9a73205
Add comments on registry/etcd_registry.go
2014-07-12 14:44:13 +09:00
brendandburns
cdf75c57df
Merge pull request #411 from nyaxt/lint_registry
...
Fixes go lint errors on pkg/registry/controller_registry.go
2014-07-11 21:41:58 -07:00
Kouhei Ueno
f932891428
removes a comment on New and a typo fix
2014-07-12 13:21:52 +09:00
Tim Hockin
779cb84625
Merge pull request #397 from brendandburns/service
...
Add initial validation of Service objects
2014-07-11 14:43:47 -07:00
Brendan Burns
b59dcbbb80
Fix tests.
2014-07-11 14:24:54 -07:00
Brendan Burns
e9edfc754e
Add initial validation of Service objects
2014-07-11 14:24:54 -07:00
Tim Hockin
1e05d1ac4e
Merge pull request #394 from brendandburns/poddata
...
Try to grab live data if the cache has errors.
2014-07-11 11:55:54 -07:00
Kouhei Ueno
bcbdbf6558
use New instead of Make and add comments to make golint happy
2014-07-11 22:46:22 +09:00
Kouhei Ueno
e53658a3ed
s/controllerId/controllerID/ to make golint happy.
2014-07-11 22:16:51 +09:00
Clayton Coleman
5896ac14da
Ensure pod and manifest always have a UUID
...
* Fixes implication #2 in docs/identifiers.md
* Replication controller lets the apiserver set the pod ID
2014-07-10 18:03:48 -04:00
Brendan Burns
5a4621f451
Try to grab live data if the cache has errors.
2014-07-10 10:26:40 -07:00
Brendan Burns
b4811abbd6
Address Clayton's comment.
2014-07-10 09:24:49 -07:00
Brendan Burns
d5b7c4eb6d
Fix integration tests with a check for nil
...
Add a unit test to validate behavior
2014-07-09 22:31:17 -07:00
Brendan Burns
7b11cbd622
Add PodIP to the info returned for a pod.
2014-07-09 22:13:07 -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
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
Brendan Burns
13d7a5959a
Add sync behavior to the pod registry. Expand tests.
2014-07-01 11:31:21 -07:00
Clayton Coleman
15c96508a9
Use ID instead of Id (go style) everywhere
...
Fixes #278
2014-07-01 13:16:47 -04:00
brendandburns
65a62278b1
Merge pull request #286 from lavalamp/exampleEtcd
...
Separate scheduler from registry
2014-06-30 20:17:07 -07:00
Nan Deng
f99a50ba69
use mutex instead of rwmutex
2014-06-30 11:13:42 -07:00
Nan Deng
3083a33e5f
pkg/registry now passed race detector.
2014-06-30 11:04:57 -07:00
Daniel Smith
0760e9bc2c
Fix up usage and tests, split into multiple files.
...
Doing this in multiple commits in an attempt to preserve the file movement history.
2014-06-29 12:35:43 -07:00
Daniel Smith
21e63cf75a
Move scheduler to own package.
2014-06-29 12:30:49 -07:00
Daniel Smith
3d1e8a92d3
Move stringSet to util.StringSet
2014-06-28 11:46:51 -07:00
Daniel Smith
9a0f89170e
Fix comments. Add timeout to integration test; don't make travis run for 15 minutes any more.
2014-06-27 15:40:23 -07:00
Daniel Smith
999ea50c2a
Cleanup to use AtomicUpdate.
2014-06-27 15:14:57 -07:00
Daniel Smith
529870d121
Generic atomic update code
2014-06-27 15:14:57 -07:00
Brendan Burns
b25f950362
Use etcd compare and swap to update the list of pods, to remove a race.
2014-06-27 11:09:36 -07:00
Brendan Burns
a391b2ff03
Implement sync behavior for controllers.
2014-06-26 19:44:28 -07:00
Daniel Smith
001b07b292
Use net.JoinHostPort
2014-06-26 16:20:37 -07:00
Daniel Smith
de06869d30
Merge pull request #244 from brendandburns/minion
...
Add a minion registry that is backed by a cloud provider.
2014-06-26 13:13:59 -07:00
Brendan Burns
93019b8563
Add a minion registry that is backed by a cloud provider.
2014-06-26 13:00:07 -07:00
Daniel Smith
c9246dc130
Implement required sync changes everywhere.
...
Make requests sync by default, so that usage of them doesn't have to
change.
2014-06-26 10:33:21 -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
Daniel Smith
2cc038298b
Make minion printing prettier; standardize on MinionList.Items like the other list types.
2014-06-24 15:29:17 -07:00
Daniel Smith
c12a3773f5
Add minion types, address other comments
2014-06-23 13:27:52 -07:00
Daniel Smith
79ee5aa250
Implement minion registry. Minions now a first-class object.
2014-06-23 13:27:52 -07:00
Daniel Smith
d460c01ade
Add minion registry
2014-06-23 13:27:52 -07:00
brendandburns
49c25a4e28
Merge pull request #196 from lavalamp/marshal
...
Make api able to marshal its types correctly
2014-06-23 13:22:52 -07:00
Daniel Smith
b850d36166
Fix boilerplate everywhere
2014-06-23 11:32:11 -07:00
Daniel Smith
41534c1cc5
Encode/decode working everywhere now.
2014-06-23 09:54:17 -07:00
Daniel Smith
2bcb44b6bd
make Registry use Encode
2014-06-23 09:54:17 -07:00
Daniel Smith
fb991fb84e
Change type to []byte
2014-06-23 09:54:17 -07:00
Daniel Smith
a718f6fdb8
minor fixes to scheduler_test
2014-06-22 11:17:23 -07:00
Daniel Smith
466be48c74
Merge pull request #166 from brendandburns/sync
...
Part #1 of synchronous requests: Add channels and a mechanism for waiting
2014-06-19 16:40:25 -07:00
Brendan Burns
2640de5c02
Part #1 of synchronous requests: Add channels and a mechanism for waiting on them
2014-06-19 16:13:13 -07:00
brendandburns
e031c193a3
Merge pull request #164 from lavalamp/master
...
Standardize terminology on "selector"
2014-06-19 13:55:27 -07:00
Daniel Smith
5a1a793784
fix after rebase
2014-06-19 13:33:36 -07:00
Daniel Smith
cfce408266
Rename ReplicasInSet to ReplicaSelector
2014-06-19 13:31:42 -07:00
Daniel Smith
bc02b3c21a
Rename [label] query to selector
2014-06-19 13:31:42 -07:00
Daniel Smith
c4649d539b
Separate labels and selector in services for clarity
2014-06-19 13:30:04 -07:00
Brendan Burns
302ec0f37b
Wire in the pod cache. Just used for List for now.
2014-06-18 22:26:35 -07:00
Brendan Burns
4f549aae54
Add a PodCache that is responsible for caching pod information.
...
Not wired in yet.
2014-06-18 20:04:52 -07:00
Brendan Burns
420b2fdd57
Add support for populating host ip address.
2014-06-18 14:57:50 -07:00
Brendan Burns
57869958bc
Add IP look up if the Cloud Provider is not null
...
Add Instance info to the Cloud Provider interface
2014-06-18 14:27:43 -07:00
Brendan Burns
31427d2d6f
Add a fake cloud impl.
...
Update the service registry with unit tests.
2014-06-18 14:22:41 -07:00
Daniel Smith
7e464aa55c
Test controller's synchronize method. Requires fake etcd client to be relocated.
2014-06-18 13:10:39 -07:00
Daniel Smith
65d6280936
Move etcd helper to util so it can be used elsewhere, too
2014-06-18 13:10:39 -07:00
Daniel Smith
a24116c7bd
Move controller to it's own package, it's not part of the registry.
2014-06-18 13:10:39 -07:00
Brendan Burns
77dd0afc26
Fix a bug in pod listing introduced in a recent refactor.
...
Add a test to catch a regression in the future.
2014-06-18 10:39:14 -07:00
Brendan Burns
5f66d33880
Add load balancing support to services.
2014-06-17 21:28:20 -07:00
brendandburns
1b1662d22d
Merge pull request #145 from lavalamp/test_fix
...
Ensure that MockPodRegistry verifies the query it's passed.
2014-06-17 21:00:59 -07:00
Daniel Smith
246db91cb5
Merge pull request #135 from brendandburns/lb
...
Add load balancing support to services.
2014-06-17 18:40:42 -07:00
Daniel Smith
372e7b7727
Ensure that MockPodRegistry verifies the query it's passed.
2014-06-17 18:33:51 -07:00
brendandburns
1fd954b1d3
Merge pull request #138 from lavalamp/master
...
Normalize etcd_registry's storage & error handling
2014-06-17 17:34:42 -07:00
Justin Huff
1bef7fdd04
FirstFitScheduler was triggering a panic by passing nil as the query to
...
EtcdRegistry.ListPods. I think this was just missed during the recent
label refactor.
2014-06-17 15:48:37 -07:00
Daniel Smith
500ef4c46c
Extract yet more redundancy
2014-06-17 13:53:47 -07:00
Daniel Smith
77556a5eb0
Extract more redundancy
2014-06-17 13:53:47 -07:00
Daniel Smith
25ab3b695e
Move duplicated logic into single function.
2014-06-17 13:53:47 -07:00
Brendan Burns
2759b2367f
Add load balancing support to services.
2014-06-17 12:37:39 -07:00
Daniel Smith
c534d070e5
Rename LabelSet labels.Set
2014-06-16 22:05:12 -07:00
Daniel Smith
7d05ba4dc4
Implement new label system
2014-06-16 22:05:12 -07:00
Daniel Smith
ad2ec27e91
Implement label queries for controller registry
2014-06-16 22:05:12 -07:00
Daniel Smith
50b9c34cf1
Fix error recovery.
2014-06-13 18:11:32 -07:00
Daniel Smith
2324dc1510
Merge pull request #102 from brendandburns/errors
...
Make all error strings lower case, for readability.
2014-06-13 15:56:40 -07:00
Brendan Burns
482a360f9e
Make all error strings lower case, for readability.
2014-06-13 15:45:19 -07:00
Daniel Smith
b95eef522b
Add nice(r) error message on api server panic. Fix nil ptr derefs.
2014-06-13 14:59:36 -07:00
Daniel Smith
9cd9754693
Merge pull request #92 from brendandburns/container_info
...
Add status message population.
2014-06-13 10:49:32 -07:00
Brendan Burns
c2c6055d70
Add status message population.
2014-06-13 09:42:04 -07:00
Daniel Smith
f9a5fadf45
Merge pull request #86 from brendandburns/dot
...
Remove dot import syntax from registry package.
2014-06-12 20:58:13 -07:00
Brendan Burns
164160adef
Address package level comments for readability.
2014-06-12 20:26:12 -07:00
Brendan Burns
0c3b9f2b69
fix dot import.
2014-06-12 20:14:41 -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
5563459178
Fix the first fit scheduler to randomize.
2014-06-11 17:11:48 -07:00
Brendan Burns
c96b14aba0
Fixes for task->pod changes & a TODO
2014-06-08 23:29:04 -07:00
Brendan Burns
fdcf273d50
Add pretty printing.
2014-06-08 23:07:29 -07:00
Brendan Burns
5cb4444176
Task -> Pod #4 , the final chapter
2014-06-08 23:00:12 -07:00
Brendan Burns
6018497174
Task -> Pod part #3
2014-06-08 22:38:45 -07:00
Brendan Burns
79b7976cbf
Add pod registry.
2014-06-08 21:43:17 -07:00
Brendan Burns
66e2575f2b
More Task -> Pod
2014-06-08 21:43:17 -07:00
Brendan Burns
c8d493f532
Part one of the grand rename: Task -> Pod
2014-06-08 21:17:53 -07:00
Brendan Burns
0181953242
Add kind in all cases for list.
2014-06-07 21:57:36 -07:00
Brendan Burns
ef7cce5dad
Populate 'Kind' field in all API types being returned.
2014-06-07 21:07:20 -07:00
Joe Beda
2c4b3a562c
First commit
2014-06-06 16:40:48 -07:00