Commit Graph

85 Commits

Author SHA1 Message Date
Jan Chaloupka
4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
Prashanth Balasubramanian
589b7fdc92 Don't handshake with watch interrupt in proxy unittests. 2016-02-04 10:55:25 -08:00
Prashanth Balasubramanian
f9b96d2c71 Make sure at least one interrupt is buffered before dropping. 2016-02-03 19:23:17 -08:00
Prashanth Balasubramanian
e1fa6e9fb8 kube-proxy applies latest snapshot of endpoints and services. 2016-02-03 12:58:37 -08:00
Wojciech Tyczynski
960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
Wojciech Tyczynski
b0fcb5adef Pass ListOptions to List in ListWatch. 2015-12-07 11:53:53 +01:00
Wojciech Tyczynski
b6ef62af24 Use unversioned.ListOptions in clients. 2015-11-24 16:52:09 +01:00
Wojciech Tyczynski
d47e21f19f Reuse TCP connections in Reflector between resync periods. 2015-10-26 19:35:25 +01:00
qiaolei
718d7df276 Fixed some typos 2015-10-03 00:33:35 +08:00
Daniel Smith
b225c1d47a Run gofmt (separate commit for easy rebases) 2015-09-10 17:17:59 -07:00
Daniel Smith
15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
Kris Rousey
ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Tim Hockin
f1a48574a6 Clean up logging, make initial sync faster 2015-08-17 20:52:06 -07:00
Kris Rousey
565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
BenTheElder
6bbf2aaab7 Refactor pkg/proxy/config's ServiceConfigHandler and EndpointsConfigHandler to have different update methods.
Refactor `pkg/proxy/config`’s ServiceConfigHandler.OnUpdate and
EndpointsConfigHandler.OnUpdate to different method names as they have
different signatures.

This will let the new proxy
(https://github.com/GoogleCloudPlatform/kubernetes/issues/3760)
implement both interfaces.

Since we won’t need a separate loadbalancer structure (load balancing
is handled in the proxy rules), we will simply handle both event types
from the same object.
2015-08-08 15:16:55 -04:00
Mike Danese
17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
jiangyaoguo
79ed954ec2 replace Reflector with client.cache.Reflector in kube-proxy 2015-06-29 11:21:50 +08:00
Eric Paris
6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Clayton Coleman
51db3bd654 Create a new testclient package that can be backed by disk files
Standardize how our fakes are used so that a test case can use a
simpler mechanism for providing large, complex data sets, as well
as represent queries over time.
2015-04-07 14:56:15 -04:00
Tim Hockin
186818d787 WIP: Implement multi-port Services 2015-03-30 19:28:11 -07:00
Tim Hockin
8ae203825b Implement multi-port endpoints
Instead of endpoints being a flat list, it is now a list of "subsets"
where each is a struct of {Addresses, Ports}.  To generate the list of
endpoints you need to take union of the Cartesian products of the
subsets.  This is compact in the vast majority of cases, yet still
represents named ports and corner cases (e.g. each pod has a different
port number).

This also stores subsets in a deterministic order (sorted by hash) to
avoid spurious updates and comparison problems.

This is a fully compatible change - old objects and clients will
keepworking as long as they don't need the new functionality.

This is the prep for multi-port Services, which will add API to produce
endpoints in this new structure.
2015-03-27 12:36:32 -07:00
Salvatore Dario Minonne
31ddefc347 Finalize fields.Selector 2015-03-17 22:55:43 +01:00
Quinton Hoole
cc72eaec3a Fix services namespace clash.
Serve identically names services in different namespaces on different external IP addresses.
2015-03-16 18:19:19 -07:00
Eric Tune
2ca265ae3b Remove --etcd_servers flag from kubelet and proxy.
All the distros that use this have been updated,
or have PRs out to update them, or owners
have been asked to fix RPMs.

Removing this prevents further use of this model.

Remove now dead code: EtcdClientOrDie

Remove now dead pkg/proxy/config/etcd.go.

Remove unused imports.
2015-03-10 09:29:09 -07:00
Daniel Smith
650f6cb826 Revert "Multi-port Endpoints" 2015-02-23 13:53:21 -08:00
Tim Hockin
160f288832 Implement multi-port Endpoints
This is a part of multi-port services.
2015-02-22 09:35:12 -08:00
Brendan Burns
9829128a75 Merge pull request #4580 from thockin/plural_20_endpoints
Part 2 of plural ports: make endpoints a struct
2015-02-20 15:42:19 -08:00
Eric Paris
e8acfe5f81 change proxy to satisfy both gofmt 1.3 and 1.4 gofmt
gofmt -s from 1.4  does not like
	for _ = range BLAH
it wants
	for range BLAH

But gofmt from 1.3 dies:
	./pkg/proxy/config/config.go:265:6: expected operand, found 'range'
	./pkg/proxy/config/config.go:268:3: expected '{', found 'EOF'

So instead, rewrite the code to make them both happy
2015-02-20 12:30:33 -05:00
Eric Paris
9965604d4b check gofmt with golang 1.4 2015-02-20 10:31:06 -05:00
Tim Hockin
ae0062d001 Part 2 of plural ports: make endpoints a struct
Includes conversions for v1b[12] and tests and fixups for call sites.
2015-02-18 19:54:15 -08:00
Mike Danese
8b65621aeb fix interface conversion panic 2015-01-16 12:23:16 -08:00
Daniel Smith
24e59de06e Merge pull request #3392 from erictune/reflector_proxy
Reconcile kubelet and kube-proxy watching code, initial steps.
2015-01-12 14:55:26 -08:00
Eric Tune
295800201e Make pkg/proxy/config more like pkg/kubelet/config
Split SourceAPI into two subobjects.

Parallel structure for endpoints, services will allow
changing to use generic code in pkg/client/cache/reflector.go.

Rename some funcs to be more like pkg/client/cache.
2015-01-12 14:37:04 -08:00
Brendan Burns
6ad88bb143 Clear resourceVersion on errors. 2015-01-12 11:45:38 -08:00
Brendan Burns
0f60d7bca3 Reset the resourceVersion so that we poll again for non-timeout errors. 2015-01-06 11:45:03 -08:00
Eric Tune
64f1084c1a Rename util.config.Watcher -> util.config.Broadcaster.
Watch is a widely used term in the codebase, which doesn't capture
the key feature of this type: broadcasting a change to several
listeners.
2014-12-04 00:10:27 -08:00
Daniel Smith
5466c06b3a Merge pull request #2733 from erictune/handle_error
Handle error from watch.
2014-12-03 14:02:54 -08:00
Eric Tune
deb101a1fb Handle error from watch.
A watch of the API can return an api.Status rather than the watched
obejct type.  This code didn't handle that.

Tested with services e2e test (in conjunction with other PR).
2014-12-03 12:33:26 -08:00
Eric Tune
9964410f77 Use plus-v format for some complex structures. 2014-12-02 22:13:08 -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
markturansky
bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05: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
bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
derekwaynecarr
d4e1076306 Fix etcd in proxy for namespace awareness 2014-10-16 16:28:06 -07:00
Daniel Smith
1f9a4750b5 Fix dangerous Sprintf 2014-10-16 14:36:36 -07:00