Commit Graph

945 Commits (720dc87967ac5b1f4e3973c965326c2907a18230)

Author SHA1 Message Date
Clayton Coleman 9b5b27a12e Return a typed error for config validation, and make errors simple
Will allow clients to determine when the configuration is bad.
2015-04-02 01:40:00 -04:00
Robert Bailey 32a1c052dc Revert "Configure the kubelet to use HTTPS" 2015-04-01 13:59:31 -07:00
Robert Bailey 58bc792e68 Configure the master to connect to the kubelet using HTTPS. 2015-04-01 09:09:29 -07:00
Victor Marmol 2de37624e8 Merge pull request #6252 from krousey/string_format_cleanup
Fixing a lot of string formatting issues
2015-03-31 16:57:36 -07:00
Kris Rousey 6904c4d585 Fixing a lot of string formatting issues with regards to:
* Improper format specifier (e.g. %s for bools or %s for ints)
  * More or less parameters than format specifiers
  * Not calling a formatting function when it should have (e.g. Error() instead of Errorf())
2015-03-31 16:47:10 -07:00
Brendan Burns 313a365712 Merge pull request #5473 from lavalamp/fix6
Add DeltaFIFO (a controller framework piece)
2015-03-31 13:29:00 -07:00
Daniel Smith 68287713a0 Add a "delta fifo", which queues up object changes
Test coverage for module at 80%.
2015-03-31 10:25:29 -07:00
Daniel Smith af870b8772 Add proper key error type 2015-03-31 10:25:29 -07:00
Daniel Smith e8cc126a56 Add ListKeys() to FIFO & test 2015-03-31 10:25:29 -07:00
Daniel Smith a8184e81bc Update FIFO documentation 2015-03-31 10:25:29 -07:00
Tim Hockin eeff1b74fb Fixes from feedback and testing 2015-03-30 23:52:37 -07:00
Tim Hockin 186818d787 WIP: Implement multi-port Services 2015-03-30 19:28:11 -07:00
saadali e0f71cb21f Make each new instance of kubelet generate a new event channel (instead of reusing existing). 2015-03-30 14:22:16 -07:00
Brian Grant c9ad322ba9 Merge pull request #5831 from smarterclayton/add_more_errors
Add more specific error handling and handle generic errors more effectively
2015-03-27 14:17:11 -07:00
Clayton Coleman aa44d29d10 Updated documentation and adjusted field names 2015-03-27 17:08:59 -04: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
Brian Grant 984bc8d5f6 Merge pull request #5635 from ravigadde/master
Add timeout to kubelet client
2015-03-26 14:55:24 -07:00
Clayton Coleman 524f8731b5 Decode errors returned to clients by the Watch interface 2015-03-26 17:30:13 -04:00
Clayton Coleman 30358e8b04 Add more specific error handling and handle generic errors more effectively
The client library should type more generic errors from the server.
2015-03-26 17:30:13 -04:00
derekwaynecarr 267ef26b0f Do not block admission if namespace already exists 2015-03-26 15:59:09 -04:00
Brian Grant 3b0db99692 Merge pull request #5915 from piosz/api
Changed PodInfo to be a list
2015-03-26 12:46:50 -07:00
Vish Kannan f2e47a29e1 Merge pull request #5994 from dchen1107/clean
Fixed an issue on searching events by a given fieldSelector. The issue b...
2015-03-26 10:21:09 -07:00
Dawn Chen ab0e9f1d41 Fixed an issue on searching events by a given fieldSelector. The issue break
the events reported for kubectl describe pods completely.

Fixed #5957
2015-03-26 10:00:10 -07:00
gmarek 5a11748018 Move Capacity from NodeSpec to NodeStatus 2015-03-26 15:28:48 +01:00
Piotr Szczesniak 31901ed9d0 Changed PodInfo to be a list
This change is to make API consistent with our convention.

Fixes #3622
2015-03-26 10:15:25 +01:00
Clayton Coleman b1ab14315b Clients should not check conditions, UpdateStatus() is inconsistent
Corrects some of the cargo culting that has crept into the API.
2015-03-25 16:25:04 -04:00
nikhiljindal ba3746172f Updating unit tests for pkg/client so that they pass with v1beta3 api 2015-03-24 18:54:02 -07:00
Brian Grant d75291dbe7 Merge pull request #5838 from nikhiljindal/clientTests
Updating unit tests so that they pass with v1beta3 api
2015-03-24 17:30:50 -07:00
Piotr Szczesniak fef81150b9 Merge pull request #5858 from a-robinson/timeout
Increase the client-specified timeout for service create/update/delete.
2015-03-24 21:42:01 +01:00
Alex Robinson ab67cba7fb Increase the client-specified timeout for service create/update/delete.
This is only temporary until external load balancer creation is changed to
be asynchronous.
2015-03-24 20:17:36 +00:00
nikhiljindal 7e3b7f9673 Updating unit tests so that they pass with v1beta3 api 2015-03-24 12:13:53 -07:00
Clayton Coleman aee9bdd69a Merge pull request #5805 from liggitt/node_proxy
Improve ResourceLocation API, allow proxy to use authenticated transport
2015-03-24 13:01:54 -04:00
Clayton Coleman 97560c409f Merge pull request #5554 from derekwaynecarr/namespace_controller
Namespace Controller to support Namespace Termination
2015-03-24 12:59:00 -04:00
Jordan Liggitt a75b501821 Improve ResourceLocation API, allow proxy to use authenticated transport 2015-03-24 11:11:34 -04:00
derekwaynecarr 29c491ef2e Namespace.Spec.Finalizer support 2015-03-24 10:36:06 -04:00
Wojciech Tyczynski f7191d626d Change "/ns" to "/namespaces" in few remaining places. 2015-03-24 13:05:32 +01:00
Clayton Coleman d46087db50 Move REST* interfaces into pkg/api/rest
Dependency chain is now api -> api/rest -> apiserver.  Makes the
interfaces much cleaner to read, and cleans up some inconsistenties
that crept in along the way.
2015-03-23 16:52:21 -04:00
Saad Ali e8f70428fb Merge pull request #5715 from jszczepkowski/kubelet-nodesel
Running node selector predicate on kubelet.
2015-03-23 11:06:00 -07:00
Clayton Coleman d19aac80ea Merge pull request #5533 from smarterclayton/burn_yaml_with_fire
Burn YAML with fire (kind of)
2015-03-23 13:45:52 -04:00
Jerzy Szczepkowski 34a8a3a844 Running node selector predicate on kubelet.
Added checking on kubelet if scheduled pods have matching node selector. This is the last step to fix #5207.
2015-03-23 08:21:58 +01:00
Ravi Gadde 5871e53060 Add timeout to kubelet client 2015-03-20 18:46:45 -07:00
nikhiljindal 1b87060aec Adding GetFieldSelector() to client.EventInterface 2015-03-20 13:58:23 -07:00
Clayton Coleman 6918a4d32e Replace automatic YAML decoding with opt-in YAML decoding
Base codecs no longer automically handle YAML.  Instead, clients
must convert to JSON first via yaml.ToJSON and runtime.YAMLDecoder.
2015-03-20 00:03:56 -04:00
Brian Grant 11f9733599 Merge pull request #5587 from nikhiljindal/enable3
Updating integration tests to test both API versions - v1beta1 and 3
2015-03-18 16:14:20 -07:00
nikhiljindal 7e36bbab3c Updating integration tests to test both API versions - v1beta1 and 3 2015-03-18 15:24:11 -07:00
Jeff Lowdermilk 72699606a9 Merge pull request #5541 from deads2k/deads-expose-resolve-local-paths
allow any number of kubeconfig files
2015-03-18 10:46:47 -07:00
Filip Grzadkowski 1a352b74ba Periodically update pod status from kubelet. 2015-03-18 12:11:39 +01:00
Salvatore Dario Minonne 31ddefc347 Finalize fields.Selector 2015-03-17 22:55:43 +01:00
Victor Marmol 668e2dbcd8 Merge pull request #5502 from wojtek-t/completely_remove_bound_pods
Remove BoundPod type from source code
2015-03-17 08:09:50 -07:00
Filip Grzadkowski 18b728ff44 Revert "Periodically update pod status from kubelet." 2015-03-17 13:51:45 +01:00
deads2k 8555ed3ede allow any number of kubeconfig files 2015-03-17 08:49:34 -04:00
Wojciech Tyczynski e6d188fca8 Remove BoundPod structure 2015-03-17 10:27:41 +01:00
Victor Marmol 009737e69e Merge pull request #5205 from fgrzadkowski/sync_pod_status
Periodically update pod status from kubelet.
2015-03-16 17:04:31 -07:00
Brian Grant 2f9a41b898 Merge pull request #5233 from brendandburns/labels
Make label and field selector query strings versionable.
2015-03-16 16:01:37 -07:00
Filip Grzadkowski 336525a27d Periodically update pod status from kubelet. 2015-03-16 23:03:03 +01:00
Jeff Lowdermilk 2a8528704a Merge pull request #5446 from lavalamp/fix2
Add a system modeler to scheduler
2015-03-16 10:21:02 -07:00
Daniel Smith 992d78a32e Add a system modeler to scheduler
So it can try to predict the effect its bindings will have.
2015-03-13 17:48:16 -07:00
derekwaynecarr 799e3fa9cc Eliminate ResourceQuotaUsage in favor of ResourceQuota status 2015-03-13 16:52:09 -04:00
Daniel Smith e3594dfe2f Merge pull request #5404 from derekwaynecarr/delete_events
Client support to delete events
2015-03-13 12:36:43 -07:00
Ravi Sankar Penta f6ecec5880 Allow admin user to explicitly unschedule the node
Setting Unschedulable on the node will not touch any existing pods
on the node but will block scheduling of new pods on the node.
2015-03-12 14:27:27 -07:00
derekwaynecarr 703d2a87bf Client support to delete events 2015-03-12 16:55:31 -04:00
Brendan Burns 266234f3b9 Make label and field selector query strings versionable. 2015-03-12 12:24:07 -07:00
Wojciech Tyczynski 9f2f10d6db Make scheduler to watch PodSpec.Host instead Status.Host 2015-03-12 13:38:58 +01:00
Zach Loafman e780592315 Merge pull request #5264 from jlowdermilk/kube-up
Standalone kubeconfig for gce kube-up (mulligan)
2015-03-11 11:46:45 -07:00
Daniel Smith 6606f9c9f5 double-fix crash on my cluster 2015-03-11 09:54:33 -07:00
Jeff Lowdermilk 7db006ab1a Generate standalone kubeconfig on kube-up, clear on kube-down.
Also tweaked the ginkgo tests to pull auth directly from a kubeconfig file
instead of the legacy kubernetes_auth file.
2015-03-10 14:23:34 -07:00
Salvatore Dario Minonne 925fa6baf8 Adding fields selector 2015-03-10 22:13:10 +01:00
Brian Grant 9aa744925e Merge pull request #5030 from simon3z/nodeinfo
Add support for fetching node collected information
2015-03-10 14:05:41 -07:00
Daniel Smith e1f64b2901 Merge pull request #5235 from jszczepkowski/pods-watch
Watch support in PodInterface.
2015-03-10 11:59:04 -07:00
Brian Grant 7aa060bae7 Merge pull request #4706 from mikedanese/PATCH
add PATCH verb to apiserver
2015-03-10 11:38:22 -07:00
Derek Carr 99a5ab4cfa Merge pull request #5248 from pmorie/fix-events
Fix event recorder not to log events without a reference
2015-03-10 14:08:00 -04:00
Mike Danese 46ec580771 add PATCH to apiserver 2015-03-10 10:56:15 -07:00
Brian Grant 6062e14313 Merge pull request #5220 from nikhiljindal/camelCaseFieldSelectors
Changing v1beta3 field selectors to be camelCased
2015-03-10 09:35:03 -07:00
Paul Morie a373b234e9 Fix event recorder not to log events without a reference 2015-03-10 11:36:43 -04:00
Federico Simoncelli 1b18440f35 kubelet: add GetNodeInfo implementation
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-03-10 10:11:01 -04:00
Federico Simoncelli eb0b6f2bcf kubelet: improve client url composition
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-03-10 10:05:19 -04:00
Jerzy Szczepkowski 0342ba3476 Watch support in PodInterface.
Added Watch support to PodInterface. Extended pods e2e to test watch. Resolves #4777.
2015-03-10 09:45:44 +01:00
nikhiljindal 916ca9cc68 Changing v1beta3 field selectors to be camelCased 2015-03-09 18:01:01 -07:00
Jeff Lowdermilk a280e0da2d Revert "Standalone kubeconfig for gce kube-up" 2015-03-09 17:45:06 -07:00
Brian Grant 7b72d9539f Merge pull request #5054 from smarterclayton/switch_to_sub_bindings
Make Pod binding a subresource (and be generic to other types)
2015-03-09 16:41:26 -07:00
Satnam Singh 89bc7bbea9 Merge pull request #5154 from jlowdermilk/kube-up
Standalone kubeconfig for gce kube-up
2015-03-09 16:22:51 -07:00
Jeff Lowdermilk 4173d369aa Generate standalone kubeconfig on kube-up, clear on kube-down.
Also tweaked the ginkgo tests to pull auth directly from a kubeconfig file
instead of the legacy kubernetes_auth file.
2015-03-09 16:02:00 -07:00
Clayton Coleman dfc19185f5 Add a subbindings resource as /pods/{name}/binding
Allows POST to create a binding as a child. Also refactors internal
and v1beta3 Binding to be more generic (so that other resources can
support Bindings).
2015-03-09 15:37:19 -04:00
Clayton Coleman 227a1d306d Support SubResource call on Request
Allows better semantic use of Request when dealing with sub resources,
and allows clients to ignore ordering.  Supports multiple segments because
sub-resources are less tightly structured than regular resources.
2015-03-09 14:39:31 -04:00
Brendan Burns f505a33998 Differentiate between server error messages and client error messages in kubectl 2015-03-07 11:39:23 +01:00
Vish Kannan 53ec66caf4 Merge pull request #5152 from vmarmol/cadvisor-dep
Rename cAdvisor info API to cadvisorApi
2015-03-06 18:09:28 -08:00
Victor Marmol 43b469bd9f Rename cAdvisor info API to cadvisorApi 2015-03-06 16:06:38 -08:00
Vish Kannan 9e5c79a587 Merge pull request #5151 from vmarmol/cadvisor-dep
Update cAdvisor godep
2015-03-06 15:56:48 -08:00
Victor Marmol a35f4374c5 Update cAdvisor ContainerInfo references to v1 API.
The cAdvisor data structures were versioned recently. We use the v1
versions so this commit makes that explicit.
2015-03-06 15:42:06 -08:00
Eric Tune c12303eaa3 Merge pull request #4749 from derekwaynecarr/make_quota_more_efficient
Make admission control plug-ins work from indexes
2015-03-06 14:11:12 -08:00
Deyuan Deng 50de1a80c2 kubelet should take a client interface 2015-03-06 15:01:55 -05:00
Daniel Smith 244766ac89 Merge pull request #5002 from satnam6502/proxy-200
Do not fail status 200 responses to proxy calls
2015-03-06 10:20:07 -08:00
derekwaynecarr 2ed8eed004 Make admission control plug-ins work from indexes 2015-03-06 09:36:57 -05:00
Satnam Singh cb4c931b0b Do not fail status 200 responses to proxy calls 2015-03-06 00:29:19 -08:00
Daniel Smith 3ef3777192 Make unexported fields panic (informatively)
...Also fix some incorrect calls to semantic.DeepEqual, and a bug where
it returned true incorrectly.
2015-03-05 21:40:37 -08:00
Satnam Singh 61e38920a5 Do not fail status 200 responses to proxy calls 2015-03-05 16:19:13 -08:00
Salvatore Dario Minonne 75f2efb500 moving ParseSelector to Parse for labels only. 2015-03-05 22:39:36 +01:00
Paul Morie 02b18edac6 Allow multiple sources to be used with record package 2015-03-05 13:54:29 -05:00
Brian Grant 9fcb48cab6 Merge pull request #4434 from ddysher/node-hostip
Node addresses
2015-03-05 10:33:15 -08:00
derekwaynecarr 21031e37c7 Filter irrelevant pods from quota 2015-03-05 10:18:19 -05:00
Deyuan Deng 9b0af8df63 Node addresses 2015-03-04 16:47:31 -05:00
Eric Tune 662189ebc2 Merge pull request #4967 from jlowdermilk/kubeconfig
Simplify generating kubeconfig with embeded cert data
2015-03-04 08:38:43 -08:00
Jeff Lowdermilk 6e704d174d Simplify generating kubeconfig with embeded cert data 2015-03-03 12:18:07 -08:00
Zach Loafman 5f35a67002 Revert "Adding converter functions to convert field label selectors to internal version before matching" 2015-02-28 11:42:49 -08:00
Daniel Smith 554b1c847c add occasional polling to reflector 2015-02-27 16:59:14 -08:00
Daniel Smith 156c505946 clean up poller test to not make infinite log messages 2015-02-27 16:51:03 -08:00
nikhiljindal 48e7945f65 Versioning the field selectors 2015-02-27 16:10:59 -08: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
Andy Goldstein bd2eb2fa8f Fix flaky exec/portforward tests
Fixes #4676
2015-02-20 16:29:57 -05:00
Victor Marmol eb343d2768 Merge pull request #4659 from deads2k/deads-tolerate-empty-file
tolerate empty .kubeconfig files
2015-02-20 10:19:14 -08:00
Clayton Coleman a17517ff6e Merge pull request #4641 from smarterclayton/make_loading_config_data_easier
Split TLS loading to allow 3rd parties to load keys easily
2015-02-20 12:04:08 -05:00
Andy Goldstein 5bd0e9ab05 Add streaming command execution & port forwarding
Add streaming command execution & port forwarding via HTTP connection
upgrades (currently using SPDY).
2015-02-20 09:57:02 -05:00
deads2k 03dde0fc46 tolerate empty .kubeconfig files 2015-02-20 08:27:08 -05:00
Clayton Coleman 60c014334f Split TLS loading to allow 3rd parties to load keys easily
The LoadTLSFiles method is useful for configuration code that needs
to read the current client config and get values out for creating
other config files.
2015-02-19 20:54:21 -05:00
Daniel Smith 40f8dfc54c Merge pull request #4621 from ironcladlou/fifo-add-if-not-present
Support AddIfNotPresent function
2015-02-19 14:22:29 -08:00
Dan Mace 45372a90f8 Support AddIfNotPresent function
Add an AddIfNotPresent function to support single producer/consumer
retry scenarios. Provides the consumer with a means to prefer items
already enqueued by the producer at the point of retry.
2015-02-19 17:04:55 -05:00
Jeff Lowdermilk 703b642886 Merge pull request #4517 from liggitt/kubeconfig_cert_data
Let .kubeconfig be a single-source config for API clients
2015-02-19 10:22:58 -08:00
roberthbailey bab8393e6a Merge pull request #4278 from brendandburns/kubecfg
Add an (optional) proxy to the TLS config.
2015-02-19 09:17:27 -08:00
Jordan Liggitt abb38cf793 Let .kubeconfig populate ca/cert/key data, and basic-auth username/password in client configs 2015-02-19 11:29:42 -05:00
Jordan Liggitt 945616a6f9 Surface load errors when reading .kubeconfig files 2015-02-18 23:34:51 -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
Paul Morie fb001ada21 Secret API resource 2015-02-18 11:54:56 -05:00
Eric Tune 7990b54803 Merge pull request #4444 from saad-ali/eventsCacheLru
Switch events history to use LRU cache instead of map
2015-02-17 16:05:11 -08:00
Clayton Coleman 4859aa7cd8 Merge pull request #4453 from derekwaynecarr/make_quota_more_efficient
Make ListWatch work with a ListFunc and WatchFunc
2015-02-17 14:48:11 -05:00
saadali 2735e6a495 Switch events history to use LRU cache instead of map 2015-02-17 11:40:40 -08:00
Clayton Coleman 7e07d711b8 Provide a helper on client/request.go for full URI
Allows self links to be directly passed
2015-02-16 16:31:32 -05:00
Clayton Coleman 3e2e4714a2 Always set ?namespace in query if specified
Revise our code to only call Request.Namespace() if a namespace
*should* be present.  For root scoped resources, namespace should
be ignored.  For namespaced resources, it is an error to have
Namespace=="".
2015-02-16 00:23:38 -05:00
derekwaynecarr c0ce15c588 Make list watch take a ListFunc and WatchFunc, provide default funcs from client 2015-02-15 22:26:05 -05:00
deads2k fef503932f properly handle mergo map versus value rules 2015-02-13 08:29:00 -05:00
Brendan Burns e300d6c94b Merge pull request #4399 from derekwaynecarr/update_cache_func
If an object has no namespace, do not add a leading slash
2015-02-12 16:17:41 -08:00
derekwaynecarr 192e186119 If an object has no namespace, do not add a leading slash 2015-02-12 17:14:16 -05:00
Clayton Coleman 0b3162b3f4 Merge pull request #4306 from saad-ali/eventCompression1
Compress recurring events in to a single event to optimize etcd storage
2015-02-12 16:59:19 -05:00
Clayton Coleman 0a435c815f Merge pull request #4313 from derekwaynecarr/client_watch_namespaces
Add ability to watch namespaces from client
2015-02-12 11:51:19 -05:00
derekwaynecarr 73aa0cc192 Add a unit test to exercise watch 2015-02-12 11:25:33 -05:00
Saad Ali b5f4849a53 Merge pull request #4364 from vmarmol/cleanup
Minor clarification of --server flag.
2015-02-12 07:54:39 -08:00
Clayton Coleman 371349f858 Merge pull request #4125 from derekwaynecarr/store_by_namespace
Enable look-up by secondary index in cache
2015-02-12 09:44:26 -05:00
derekwaynecarr e76dcbdfa2 Add ability to watch namespaces 2015-02-12 09:42:29 -05:00
saadali 033577efa2 Optimize etcd storage by compressing recurring events in to a single event 2015-02-11 22:57:44 -08:00
Victor Marmol 0a64fecaf5 Minor clarification of --server flag.
Fixes #3425.
2015-02-11 17:04:41 -08:00
derekwaynecarr 0bd0e12bbc Add support for Namespace as Kind
Add example for using namespaces
2015-02-10 09:50:50 -05:00
Brendan Burns 3fa9ddd1e1 Add an (optional) proxy to the TLS config.
Also fill in some other reasonable defaults.
2015-02-10 05:20:47 -08:00
derekwaynecarr 53f1efa484 Make sure we remove old object from index before adding new 2015-02-09 16:44:51 -05:00
derekwaynecarr 1cf69bdefc Support multiple index functions, address feedback 2015-02-09 16:44:51 -05:00
derekwaynecarr 7a2d63048d Enable look-up by secondary index in cache 2015-02-09 16:44:51 -05:00
saadali 79cbcf918e Modify Event struct to allow compressing multiple recurring events in to a single event.
# *** ERROR: *** Some API files are missing the required field descriptions
# Add description tags to all non-inline fields in the following files:
#   pkg/api/v1beta1/types.go
#   pkg/api/v1beta2/types.go
#
# Your commit will be aborted unless you fix these.
#   COMMIT_BLOCKED_ON_DESCRIPTION
2015-02-05 21:50:29 -08:00
Mike Danese 14bfec92f2 rename probe.Status to probe.Result. 2015-02-05 15:49:58 -08:00
Clayton Coleman 0307d7ba98 Set a default user agent on all client.Client calls
Form:
  kube-controller-manager/v0.10.0 (linux/amd64) kubernetes/550b98e

  <basename(os.Argv)>/<gitVersion> (<GOOS>/<GOARCH>) kubernetes/<shortGitCommit>

Can be set by other clients
2015-02-04 17:45:53 -05:00
Brian Grant 3f28badae3 Merge pull request #3854 from yujuhong/defaults
Migrate API defaulting to a centralized location
2015-02-04 11:41:23 -08:00
deads2k bc93de314a remove --ns-path option from .kubeconfig file, kick tests 2015-02-03 14:22:55 -05: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
Brendan Burns d9c9856889 Merge pull request #3992 from smarterclayton/allow_namespace_short
Allow commands to specify a short namespace
2015-02-02 10:56:33 -08:00
Alex Robinson 59ee1d901a Merge pull request #4016 from smarterclayton/add_getbykey_to_store
Add a GetByKey method to Store
2015-02-02 10:51:57 -08:00
Clayton Coleman f398fd2084 Merge pull request #3959 from smarterclayton/expose_tls_config_and_wrappers
Allow client.Config to be used for HTTP2 and WebSocket connections
2015-02-02 13:20:30 -05:00
Clayton Coleman 3ca23163ae Add a GetByKey method to Store
Without the ability to retrieve underlying items by key (instead of
the object passed to KeyFunc) it is impossible to build wrappers
around cache.Store that want to make decisions about keys, because
they would need to reconstruct the object passed to Get.

This allows retrieval by key, and makes sure Get(obj) uses it.
2015-02-01 14:55:45 -05:00
Clayton Coleman 2d5c6b4443 Allow commands to specify a short namespace
OpenShift currently uses '-n', so opening up the potential for downstream
to set a short namespace.  However, this should only be used in general for
commands that want to work across namespaces frequently - such as admin
level operations on entire namespaces like quota or cleanup behavior where
you have permissions and need to rapidly switch.
2015-01-30 17:47:40 -05:00
Clayton Coleman f04769a595 Merge pull request #3983 from deads2k/deads-relative-paths-in-kubeconfig
resolve relative paths in kubeconfig
2015-01-30 14:45:01 -05:00
deads2k aba73493de resolve relative paths in kubeconfig 2015-01-30 14:01:24 -05: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
Clayton Coleman c1a5e14270 Provide a better error when Kubelet pod status is unexpected
Treat HTTP errors with respect, provide a distinct error message
2015-01-29 19:05:41 -05:00
Clayton Coleman d072232d4a Allow client.Config to be used for HTTP2 and WebSocket connections
client.Config describes how to make a client connection to a server
for HTTP traffic, but for connection upgrade scenarios cannot be
used because the underlying http.Transport object can't allow the
connection to be hijacked. Reorganize the TLS and connection wrapper
methods so that a sophisticated client can do:

    cfg := &client.Config{...} // from somewhere
    tlsConfig, _ := client.TLSConfigFor(cfg)
    _ := conn.Dial(...)
    rt := MyRoundTripper() // some func that implements grabbing requests
    wrapper, _ := client.HTTPWrappersFor(cfg)
    req := &http.Request{}
    req.Header.Set("Connection-Upgrade", ...)
    _, := wrapper.RoundTrip(req)
    // rt has been invoked with a fully formed Req with auth
    rt.Req.Write(conn)
    // read response for upgrade

It would be good to have utility function that does more of this,
but mostly enabling the HTTP2/SPDY client exec function right now.
2015-01-29 17:43:09 -05: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
nikhiljindal dc92d3c7a2 Cleaning up the operations code in client 2015-01-28 21:04:16 -08:00
derekwaynecarr 9674f08504 Added unit tests for incrementing usage 2015-01-28 15:03:19 -05:00
derekwaynecarr 829fa69527 Introduce a ResourceQuota object 2015-01-28 15:03:19 -05: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
Clayton Coleman 5117189e03 Merge pull request #3707 from nikhiljindal/preOperations
Removing support for asynchronous server requests
2015-01-28 13:02:52 -05:00
nikhiljindal de60600608 Making all operations synchronous 2015-01-27 18:47:56 -08:00
Satnam Singh 3a9e6d8f29 Switch to use Too Many Requests response code
Name the 429 status code
2015-01-27 14:54:30 -08:00
derekwaynecarr 74f368f50e Modified LimitRangeItem.Kind to LimitRangeItem.Type, added example files 2015-01-27 16:41:28 -05:00
derekwaynecarr 091cbe5fa2 Add a limit range resource 2015-01-27 16:41:27 -05: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 a298402bd4 remove pkg/health and move everything over to pkg/probe 2015-01-27 11:20:30 -08:00
Clayton Coleman 6410f37a32 Merge pull request #3591 from ddysher/node-client-update
Add node update method to client interface
2015-01-26 15:47:18 -05:00
Deyuan Deng e71227388e add node update method to client interface 2015-01-23 16:40:33 -05:00
Satnam Singh 8350bb9700 Add a Retry-After header when rate limit is exceeded 2015-01-22 16:03:00 -08:00
Clayton Coleman b5bc0c1619 Merge pull request #3700 from smarterclayton/add_run_until_to_reflector
Add RunUntil to the Reflector and Poller to allow early termination
2015-01-21 20:00:25 -05:00
Clayton Coleman f2d966859d Add RunUntil to the Reflector and Poller to allow early termination
This is useful for test suites where you want to kill your workers
without having to run one test env per execution.
2015-01-21 18:25:54 -05:00
Tim Hockin 7dd0400065 Merge pull request #3470 from deads2k/deads-add-kubecfg-ns
respect namespace from .kubeconfig file
2015-01-21 12:58:06 -08:00
Brian Grant 54ad81759a Merge pull request #3677 from filbranden/flag_shorthand_refactor1
Flag shorthand refactor1
2015-01-21 10:41:26 -08:00
Filipe Brandenburger 0bfeeb84ca Make short flags optional, refactor code to use StringVarP directly.
There is no need to check for an empty string and call StringVar or
StringVarP depending on the case, since StringVar is essentially the
same as a call to StringVarP with an empty string.

This turns 6 lines of code back into 1.

Remove the TODO comments since removing the short flags will no longer
simplify this code significantly.
2015-01-21 07:58:02 -08:00
Filipe Brandenburger af76d14e2e Revert "fixup repeated usage strings"
This reverts commit 469bd2b641.
2015-01-21 07:56:24 -08:00
Jordan Liggitt f71521d758 Allow overriding global default cluster host 2015-01-21 10:38:58 -05:00
deads2k 469bd2b641 fixup repeated usage strings 2015-01-21 08:12:24 -05:00
Clayton Coleman 494d003981 Merge pull request #3641 from deads2k/deads-make-short-flags-optional
make shorthand flags optional
2015-01-20 17:23:10 -05:00
deads2k 8c01729f38 make shorthand flags optional 2015-01-20 16:21:27 -05:00
deads2k dd01137138 add namespace to kubeconfig file 2015-01-20 16:07:54 -05:00
Joe Beda f90ad573cf Merge pull request #3610 from liggitt/kubelet_tls_client
Build TLS client for kubelet correctly
2015-01-20 10:56:52 -08:00
Jordan Liggitt 888fe4b175 Build TLS client for kubelet correctly 2015-01-19 12:26:12 -05:00
Andrew Seidl 6dee1d7fa4 Fix typos in user-facing strings 2015-01-18 01:32:34 -06:00
Filipe Brandenburger 6d9845361f Merge pull request #3577 from erictune/fixforfilib
Test for and fix crash with nil client in kubelet.
2015-01-16 13:53:29 -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
Joe Beda 474212106f Merge pull request #3564 from liggitt/client_cert_data
Allow client and kubelet configs to hold cert/key/ca data directly
2015-01-16 13:19:52 -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
Jordan Liggitt 1ebe885827 Allow client and kubelet configs to hold cert/key/ca data directly 2015-01-16 12:18:20 -05:00
Dawn Chen 15e9fa8a9d Introduce PodStatusResult, and deprecate PodContainerInfo. 2015-01-16 09:10:40 -08:00
davidopp 2675cfa16b Merge pull request #2906 from abhgupta/abhgupta-dev
Enhancements to scheduler priority functions
2015-01-14 21:47:28 -08:00
Daniel Smith 4738da0822 fix build 2015-01-14 16:12:22 -08:00
Daniel Smith 2bee4ac572 Merge pull request #3381 from a-robinson/events2
Improve client recording of events such that clients are
2015-01-14 15:21:16 -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
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
Tim Hockin e86d4cd3c6 Use a strong type for UID fields 2015-01-14 13:53:43 -08:00
Alex Robinson 90e1d58fa6 Add a unit test for watch.Broadcaster DropIfChannelFull and a couple small fixes 2015-01-14 04:36:29 +00:00
deads2k b51a717f6e add kubectl config 2015-01-13 16:19:57 -05:00
Alex Robinson 3eaf362f8e Switch the client event recorder from exponential backoff to one random
sleep on the first failed request followed by a constant amount on all
subsequent consecutive failed requests.
2015-01-13 19:48:41 +00:00
Daniel Smith 224a8d634b Merge pull request #3384 from derekwaynecarr/list_watch_by_namespace
Add ability to listwatch a resource in an optional namespace
2015-01-13 11:15:27 -08:00
Abhishek Gupta 6fd0b181e3 Rebased onto the latest changes to the scheduler code 2015-01-13 09:41:25 -08:00
Alex Robinson be6b1cf0e2 Push the full channel logic into the implementation of the broadcaster
in watch/mux.go rather than being in the client event recording code.
2015-01-13 02:22:30 +00:00
Alex Robinson 702a6f96b4 Improve client recording of events such that clients are
(1) less likely to drop events if the master is unavailable
(2) less likely to have goroutines block while trying to record an
event.

Done as part of #3163 to ensure that minions operate well even while the
master is down.
2015-01-13 02:22:30 +00:00
Joe Beda 16d0a837f2 Merge pull request #3414 from liggitt/cafile
Use CAFile even if client certificate is not specified
2015-01-12 17:44:51 -08:00
Jordan Liggitt 1f8a74626f Use CAFile even if client certificate is not specified 2015-01-12 16:38:48 -05:00
Eric Tune 00c05053b7 Rename ListPods methods to List.
For greater similarity to pkg/client.
Does not cover registry's ListPods.
Fix an example in a comment.
2015-01-09 23:46:02 -08:00
derekwaynecarr 7c630fd797 Add ability to listwatch in namespace 2015-01-10 01:04:26 -05:00
Daniel Smith 6cd37637f5 Merge pull request #3365 from smarterclayton/test_coverage
Reenable coverage and race detection on Travis
2015-01-09 16:35:18 -08:00
Eric Tune f381579a89 Fix flaky test.
Maps are randomly reordered.
But there is only one order for one thing.
2015-01-09 16:23:53 -08:00
Eric Tune 793bf6a79d Added UndeltaStore.
This will be used to connect Reflector to kubelet update channel.

Added testing.
2015-01-09 12:40:07 -08:00
Clayton Coleman cacd2ac40b Shorten client/record test by changing default value
Also add opinionated comment about using singletons in code
2015-01-09 13:16:30 -05:00
Clayton Coleman 68298f08a4 Merge pull request #3353 from thockin/errors
Cleaner aggregate errors API
2015-01-09 11:50:57 -05:00
Tim Hockin 4fcd496d59 change everything to use new util/errors 2015-01-08 22:10:03 -08:00
Daniel Smith e91a697445 Merge pull request #3346 from erictune/addservicelister
Addded a StoreToServiceLister.
2015-01-08 17:35:13 -08:00
Eric Tune 83aed75556 Addded a StoreToServiceLister. 2015-01-08 15:29:08 -08:00
Jeff Lowdermilk b26dfacfff Merge pull request #3316 from deads2k/deads-add-kubeconfig-file-properly
add kubeconfig file properly
2015-01-08 13:50:52 -08:00
deads2k 60a46e7d49 fixes e2e failure on gce with new .kubeconfig, kick travis 2015-01-08 16:31:25 -05:00
deads2k 005f2e1bda don't require config.Version for IsConfigTransportTLS 2015-01-08 13:53:57 -05:00
Clayton Coleman 7fd887df61 Enable v1beta3 API via --runtime_config=api/v1beta3 flag
This exposes the proper v1beta3 API endpoint when the user specifies
the --runtime_config=api/v1beta3 argument to the apiserver. v1beta3
is still considered experimental and subject to change.

--runtime_config is a map of string keys and values, that can be
specified by providing

    --runtime_config=a=b,b=c,d,e

Only the key must be specified, the value can be omitted.

Enables v1beta3 in hack/local-up-cluster.sh and hack/test-cmd.sh
2015-01-08 13:01:24 -05:00
Clayton Coleman 8262c30c97 Improve serialization round trip test and add v1beta3 2015-01-08 12:44:28 -05:00
Clayton Coleman 8f65442c2f Client should not include ns/ for non-namespaced calls in v1beta3 2015-01-08 12:44:07 -05:00
deads2k 480635bb72 Revert "Revert "add kubeconfig types""
This reverts commit 02dbad7094.
2015-01-08 09:42:30 -05: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 963000715a Merge pull request #3294 from erictune/public_storetoers
Move Listers to pkg/client/cache.
2015-01-07 15:56:14 -08:00
Eric Tune ed74197fde Move Listers to pkg/client/cache.
I would like to use these in kubelet and kube-proxy.
This is the minimal change to get them moved.
I will follow up with changes to make interfaces consistent
and add Listers for other resources.
2015-01-07 15:33:17 -08:00
Daniel Smith 2050131b9a ParseOrDie -> MustParse; stop returning pointer 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 b03fbf90f8 Make RESTClient more generic to API version, simplify version handling
RESTClient is an abstraction on top of arbitrary HTTP endpoints that
follow the Kubernetes API conventions. Refactored RESTClientFor so that
assumptions that are Kube specific happen outside of that method (so
others can reuse the RESTClient). Added more validation to client.New
to ensure clients give good input. Exposed APIVersion on RESTClient
as a method so that wrapper code (code that adds typed / structured
methods over rest endpoints like client.Client) can more easily make
decisions about what APIVersion it is running under.
2015-01-07 18:03:34 -05:00
Tim Hockin d314862e46 Merge pull request #3285 from erictune/public_reflectors
Make Reflector helpers reusable.
2015-01-07 14:10:57 -08:00
Eric Tune 7d5ac856c5 Make Reflector helpers reusable.
Scheduler uses Reflector from pkg/client/cache.
It defines some helper classes.
I'd like to use those helpers with pkg/client/cache
in kube-proxy and kubelet too.
2015-01-07 13:49:37 -08:00
Brendan Burns 02dbad7094 Revert "add kubeconfig types" 2015-01-07 12:39:37 -08:00
Clayton Coleman 585d2c8cbd Merge pull request #2861 from deads2k/deads-add-clicfg-types
add kubeconfig types
2015-01-07 13:35:50 -05:00
bgrant0607 6e24273937 Merge pull request #3061 from jlowdermilk/rollingupdate
Add a rollingupdate lib and command to kubectl
2015-01-07 10:33:39 -08:00
deads2k 0e688dc271 add kubeconfig file 2015-01-07 13:09:10 -05:00
Rohit Jnagal 62ecd5f3ff Fix few vet errors.
There are quite a few 'composite literal uses unkeyed fields' errors that I have kept out of this patch.
And there's a couple where vet just seems confused. These are the easiest ones.
2015-01-07 08:40:16 +00:00
Jeff Lowdermlk 0ab39df66b Add a rollingupdate lib and command to kubectl
Also decouple conditions from client for testability.
2015-01-06 17:29:05 -08:00
Dawn Chen e3c019128e Add EventSource to api to have both Component and Host information. 2015-01-06 16:08:20 -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
Daniel Smith 9c2cd55528 Merge pull request #3181 from smarterclayton/cleanup_http_items
Minor cleanups to request - fix initialism on HTTPClientFunc
2014-12-30 17:34:00 -08:00
Clayton Coleman 8005c85e6c Rename HttpClientFunc -> HTTPClientFunc 2014-12-30 19:34:06 -05:00
Clayton Coleman 502204ad6d Do not set empty field or label selectors on requests
Default behavior for "" is already "everything"
2014-12-30 19:33:40 -05:00
Clayton Coleman e355f54eda Update references from Path() to the appropriate segment use 2014-12-29 15:38:52 -05:00
Clayton Coleman afedbba3fc Introduce Resource/ResourceName/Prefix/Suffix options to RESTClient
RESTClient is an abstraction for simplifying access to resources that
follow the Kubernetes API pattern.  Currently, both Namespace and Path
are coupled, which means changes across versions is complex.  In general,
most access to resources should be to a resource collection (e.g.
"services") with a name (e.g. "foo"). Other constructs, like prefix sections
("watch") or proposed suffix sections ("/pods/foo/spec") only modify this
core pattern.

This commit removes the Path() helper from Request and introduces:

* Prefix(segments ...string) - segments that should go to the beginning of the path.
* Suffix(segments ...string) - segments that should go to the end of the path.
* Resource(string) - collection name, should be after prefix
* Namespace(string) - if specified, should be set after resource but before name
* Name(string) - if specified, should be after namespace

Now, only Prefix and Suffix are order dependent (and with variadics, should be
simpler).  Resource, Namespace, and Name may be specified in any order.

Path() has been removed to prevent downstream consumers of RESTClient from experiencing
behavior change.
2014-12-29 15:37:30 -05:00
Daniel Smith 998061677b Merge pull request #2909 from smarterclayton/passversiontorestmapper
Allow --api-version to properly override various default behaviors in CLI
2014-12-29 12:14:32 -08:00
Daniel Smith 9873d8a7d5 Merge pull request #2958 from rajdeepd/master
Added test cases for NewKubeletClient with TLS enabled
2014-12-29 11:47:47 -08:00
saadali 99acb9688c Have Http Probe report "Unhealthy" on connection failure instead of "Unknown". 2014-12-29 11:09:06 -08:00
Clayton Coleman 203246b7e0 Allow the api-version on the command to override the client builder 2014-12-22 14:52:03 -05:00
derekwaynecarr 652b7aa665 Rename namespaceAsPath 2014-12-22 12:24:21 -05:00
Daniel Smith 36cfc02c6c Merge pull request #3066 from derekwaynecarr/client_update
Do not use namespace in url paths pre v1beta3 from client
2014-12-19 18:02:55 -08:00
derekwaynecarr abb6632d75 Do not use namespace in url paths pre v1beta3 from client 2014-12-19 16:32:42 -05:00
Daniel Smith be9f3be709 better logging 2014-12-19 12:28:51 -08:00
Daniel Smith a50f8034c8 Merge pull request #3037 from smarterclayton/hide_spurious_watch_errors
When connections are broken on Watch, write fewer errors to logs
2014-12-18 13:33:03 -08:00
Daniel Smith 3ade280f89 Merge pull request #2813 from derekwaynecarr/ns_url
Move namespace from query param to path part
2014-12-18 13:31:45 -08:00
Clayton Coleman b2434de777 When connections are broken on Watch, write fewer errors to logs
Watch depends on long running connections, which intervening proxies
may break without the control of the remote server. Specific errors
handled are io.EOF, io.EOF wrapped by *url.Error, http connection
reset errors (caused by race conditions in golang http code), and
connection reset by peer (simply tolerated).
2014-12-18 16:15:51 -05:00
derekwaynecarr cbbe61d115 Fix path ordering in client 2014-12-18 15:27:27 -05:00
Rajdeep Dua 05f0a9846b Added test cases for NewKubeletClient with TLS enabled 2014-12-18 00:57:33 -08:00
Salvatore Dario MINONNE 61ac2f7437 kubectl delete command: adding labelSelector
Add a Visitor pattern on top of ResourcesFromArgs

Allows ResourcesFromArgs to return an opaque list of items and have client
commands react to them.

Change request.go to return apiserver errors for arbitrary status codes to
better respond to generic actions that don't make sense (kubectl delete operations foo)
2014-12-17 18:15:03 +00:00
derekwaynecarr 7cf664439f Move namespace from query param to path part 2014-12-16 15:55:47 -05: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
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
Brendan Burns d345dda1e5 Fix the kubelet uses api encode/decode by actually adding PodContainerInfo to v1beta1 2014-12-15 11:38:55 -08:00
Joe Beda 26e5c1d0eb Merge pull request #2928 from rajdeepd/master
Added test cases for Event Create and Event List
2014-12-15 11:11:37 -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
Rajdeep Dua a6fd5601c2 Added test cases for
* Event Create
* Event List
2014-12-14 21:41:34 -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
Daniel Smith 9c0fbf1f02 Merge pull request #2908 from brendandburns/kubelet
Add an api object for the kubelet, and a versioned endpoint.
2014-12-12 16:01:46 -08:00
Brendan Burns d4b9979382 Add an api object for the kubelet, and a versioned endpoint. 2014-12-12 15:26:28 -08:00
Brendan Burns 771c538932 Merge pull request #2864 from deads2k/deads-tighten-validation-on-bad-gets
tighten validation for client resource gets
2014-12-12 10:34:53 -08:00
Rajdeep Dua b5c3e2d619 Added test case for events Create 2014-12-11 20:46:35 -08:00
deads2k fa900e5d67 require names for gets 2014-12-11 11:21:40 -05:00
Joe Beda b7705d25c8 Merge pull request #2827 from liggitt/tlsv1
Bump minimum TLS version from SSLv3 to TLSv1.0
2014-12-10 13:15:29 -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 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
Jordan Liggitt 2475123d3c Bump minimum TLS version from SSLv3 to TLSv1.0 2014-12-10 09:13:15 -05:00
Mike Danese 50a6068b5d simplified TestNewKubeletClient in kubelet_test 2014-12-09 18:27:55 -08:00
Rajdeep Dua 00149c88f2 Added two test cases for KubeletClient 2014-12-07 21:46:14 -08:00
bgrant0607 f95503dc2d Merge pull request #2767 from ironcladlou/watch-error-handling
Log ErrUnexpectedEOF from watches as warnings
2014-12-05 13:43:26 -08:00
bgrant0607 cf7f3de767 Merge pull request #2762 from rajdeepd/master
Added a New test case for GetMinion
2014-12-05 13:24:24 -08:00
Dan Mace 0ad8342a55 Log ErrUnexpectedEOF from watches as warnings
Watches are often established via long-running HTTP GET requests which
will inevitably time out during the normal course of operations. When
the watches time out, an io.EOF or an io.ErrUnexpectedEOF will bubble
up to client components such as StreamWatcher and Reflector. Treat EOF
as a clean watch termination. Treat ErrUnexpectedEOF as a less-clean
but non-fatal watch termination and log the event at the warning level.

This greatly reduces the amount of log noise generated during what is
ultimately normal operation, and adds the flexibility for the operator
to make a distinction between the EOF conditions if so desired (by
adjusting the logging level).
2014-12-05 15:03:07 -05:00
Rajdeep Dua 2791a92f2c Added a New test case for GetMinion 2014-12-05 01:49:43 -08:00
Daniel Smith df98babf6e Merge pull request #2748 from erictune/clean7
Rename watch.Mux -> watch.Broadcaster
2014-12-04 11:09:43 -08: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
Rajdeep Dua e47e1ee025 Added test case for ServerAPIVersions 2014-12-02 21:55:44 -08:00
Daniel Smith 3b2fa9618d Relax search criteria to find both pod & bound pod events 2014-12-01 17:19:42 -08:00
deads2k 2dbfb80349 add utility for binding flags and building api server clients 2014-11-26 07:50:51 -05:00
markturansky 8159c8fd25 Refactor PodCondition to PodPhase 2014-11-21 15:28:38 -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
Daniel Smith 4437f03dbf Don't hold up the entire event queue for a single bad event. Also, don't retry forever. 2014-11-20 16:01:42 -08:00
Daniel Smith 298007b97e Merge pull request #2447 from smarterclayton/revert_bundling_of_version
Ensure that kubectl get works with downstream resources
2014-11-19 10:39:52 -08:00
Clayton Coleman 9eb4ca43d8 Move FakeRESTClient to client/fake.go 2014-11-18 20:22:05 -05:00
markturansky 8af4ccb111 v1beta3 Pod refactor 2014-11-18 09:25:42 -05:00
Daniel Smith 9430bb38b8 Merge pull request #2282 from bgrant0607/docgen
Automatic API generation via go-restful
2014-11-14 13:12:25 -08:00
Brendan Burns c25ef89b24 Merge pull request #2367 from lavalamp/fix3
Yet more non-controversial fixes from #2277
2014-11-14 10:25:04 -08:00
Daniel Smith 7df0f6d3bd Merge pull request #2343 from erictune/tokens_need_private_comms
Use https when Insecure is selected.
2014-11-14 09:51:59 -08:00
Daniel Smith 3cf022786e fix up event client for namespaces 2014-11-14 09:43:28 -08:00
Brian Grant 7583e1a643 Automatic API generation by adopting go-restful 2014-11-14 16:49:19 +00:00
Eric Tune 5c24855349 Rename Secure -> TLS; we may use TLS insecurely. 2014-11-13 21:42:36 -08:00
Eric Tune dd3c85be09 Use https when Insecure is selected. 2014-11-13 17:25:31 -08:00
Paul Morie 47b0f3333e Make client.Interface contain EndpointsNamespacer 2014-11-13 09:39:54 -05:00
Daniel Smith 72c922668f Improve error reporting 2014-11-12 15:22:09 -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
Paul Morie 80b1e2dde3 Typo fix 2014-11-12 13:05:08 -05:00
Clayton Coleman 8a59000472 Warn if pod has no labels 2014-11-11 17:03:20 -05:00
Clayton Coleman 94c873e7a4 Remaining refactor for PodTemplateSpec and fixing test cases 2014-11-11 17:03:20 -05:00
Paul Morie e2be1564a4 Rename client/cache Store.Contains to ContainedIDs 2014-11-11 11:48:15 -05:00
Daniel Smith 25bd151d86 Make fieldPath part of getting a reference rather than part of making an event. 2014-11-05 15:09:14 -08:00
markturansky 119f654a13 Refactor PodStatus to PodCondition in internal API for v1beta3 2014-11-05 17:26:47 -05:00
markturansky bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05:00
Clayton Coleman 09cfa364c5 Refactor Get and Describe to allow extension of types
Get should use ResourceMapper, allow Printer to be abstracted,
and extract Describe as *Describer types.
2014-11-04 10:44:56 -05:00
Eric Tune 795bc7f976 Require a KubeletClient in master.New().
Without this, tests which create a master
will panic with a nil pointer when the periodic
podCache update runs.

Deleted unused FakePodInfoGetter.
Added FakeKubeletClient.
Passed to master.New.
Required a KubeletClient in master.New.
2014-11-03 16:09:41 -08:00
Brendan Burns 893291d81d Merge pull request #1997 from ddysher/split-master
Separate minion controller from master.
2014-10-31 11:23:58 -07:00
Deyuan Deng acf9d23b32 Stop httptest server. 2014-10-30 21:37:08 -04:00
Deyuan Deng 019b7fc74c Separate minion controller from master. 2014-10-30 20:24:15 -04:00
Clayton Coleman 8a2d778248 Merge pull request #2066 from lavalamp/eventing2
Event fixes
2014-10-30 14:19:19 -04:00
Daniel Smith a7cc25f7ff Add namespaces to event creation path. 2014-10-29 18:03:14 -07:00
Clayton Coleman 2c10dd85c3 Merge pull request #2047 from smarterclayton/make_request_testable
Make client.Request/RESTClient more testable and fakeable
2014-10-29 19:33:36 -04:00
Clayton Coleman 71fecef6f6 Add test coverage and fix a few minor problems 2014-10-29 14:08:37 -04:00
Clayton Coleman eac933eb44 Make client.Request more testable, break coupling with RESTClient
Moves polling to a function provided by the RESTClient, not innate
to Request. Moves doRequest from RESTClient to Request for clarity.
2014-10-28 23:00:24 -04:00
Daniel Smith dca7363459 Serve API version list, test with an integration test. 2014-10-28 17:35:56 -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
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 b7be298f54 Fix client structs to be package private 2014-10-24 11:49:04 -04:00
derekwaynecarr c6eb371c93 Fixup unit tests 2014-10-24 11:49:04 -04:00
derekwaynecarr a18567f759 Update fake.go for client interface changes 2014-10-24 11:47:30 -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 3df1c2f29d Use meta.Interface and meta.Accessor 2014-10-23 18:01:25 -04:00
Clayton Coleman 35eaf90255 Add UID to MetaAccessor and Ref 2014-10-22 22:59:15 -04:00
Clayton Coleman 1ccb86c760 Rename methods in api/meta to be cleaner 2014-10-22 22:59:12 -04:00
Clayton Coleman 64d98cba73 Move typemeta.go to api/meta/meta.go
Prepares for the meta object to front multiple underlying types
when TypeMeta and ObjectMeta is split in internal and v1beta3, but
combined in v1beta1 and v1beta2
2014-10-22 22:28:06 -04:00
Clayton Coleman dd8c49fc47 Merge pull request #1746 from hmrm/refactor-kubelet-access
Refactor kubelet access and add SSL
2014-10-22 19:44:43 -04:00
Daniel Smith 6ef6ff5bc5 Merge pull request #1893 from crhym3/fix-1149-req-body
Replace custom ProxyServer (kubecfg/kubectl -proxy) with httputil.ReverseProxy
2014-10-22 15:29:59 -07:00
Haney Maxwell 3160500940 Refactor kubelet access and add SSL 2014-10-22 14:53:59 -07:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Dawn Chen bdebff5b28 Merge pull request #1955 from lavalamp/fix3
Add client time to events
2014-10-22 11:25:01 -07:00
Daniel Smith ad1212b9af Add client time to events 2014-10-22 11:12:17 -07:00
Deyuan Deng 1a8016fd1f Add create/delete minion to client interface. 2014-10-21 22:06:07 -04:00
Dan Mace 51ec53e2af Fix line-jumping bug in FIFO implementation
Keep the FIFO's internal set in sync with the queue during Add/Update
operations to prevent a queue line-jumping scenario (described in a
new unit test).
2014-10-21 16:37:32 -04:00
alex fb2b15a797 Replace custom proxy with httputil.ReverseProxy for kubecfg/kubectl.
Fixes #1149 - kubecfg proxy "411 Length Required" error on POST/PUT.
2014-10-21 18:52:18 +01:00
deads2k 2c35c06727 report originating error for GetReference failure 2014-10-17 12:52:41 -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
Daniel Smith 95b855b8e6 Add event client and easy creation library 2014-10-15 11:42:05 -07:00
Daniel Smith d34914517f Shorten 'CodecForVersionOrDie' name, add 'ResourceVersioner' to testapi 2014-10-13 14:58:06 -07:00
Dawn Chen 135d187942 Merge pull request #1736 from brendandburns/scheduler
Switch away from the static node info
2014-10-10 15:01:09 -07:00
Brendan Burns e6fa568ad4 Switch away from the static node info 2014-10-10 14:08:09 -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
Haney Maxwell e0a80dda30 Add ssl flags to default client flags
This adds support for mutual ssl between the proxy, controller-manager,
scheduler, and the apiserver
2014-10-09 10:57:15 -07:00
Clayton Coleman a5462c0678 Change test cases to verify the client sends the received resourceVersion 2014-10-07 19:00:26 -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
Deyuan Deng 9047baa111 Add codec to restlient test. 2014-10-07 18:26:26 -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
Dawn Chen 8d0ed93aa1 Clean unittests 2014-10-06 13:37:22 -07:00
Clayton Coleman 756f4afb2c Allow Client to define arbitrary (non-default) prefix in config 2014-10-02 23:30:27 -04:00
erictune 0a2e208e8f Merge pull request #1538 from smarterclayton/allow_skip_tls_verify
Allow clients to skip TLS verification
2014-10-02 11:49:40 -07:00
erictune 40f9201610 Merge pull request #1540 from derekwaynecarr/add_context_to_client_interfaces
Add context to client interfaces
2014-10-02 11:48:31 -07:00
derekwaynecarr d5ec260db8 Fixup tests 2014-10-02 12:52:01 -04:00
derekwaynecarr fc67d822c6 Add context as parameter to client interface functions 2014-10-02 12:51:36 -04:00
Clayton Coleman 7af3c7d75e Allow clients to skip TLS verification
Adds -skip_tls_verify to any API server client. Also store in auth
2014-10-02 12:08:58 -04:00
jhadvig d6b1fa8e02 Support for streaming 2014-10-02 14:45:16 +02:00
Clayton Coleman a81dc44fc6 Revert "Stream support for k8s client request"
This reverts commit 755b598a7d.
2014-10-01 19:39:08 -04:00
Clayton Coleman 67ef24b410 Merge pull request #1506 from jhadvig/upstream_k8_stream
Stream support for client request
2014-10-01 19:32:27 -04:00
jhadvig 755b598a7d Stream support for k8s client request 2014-10-02 01:07:43 +02:00
Clayton Coleman ff2eca97d9 Refactor the client (again) to better support auth
* Allows consumers to provide their own transports for common cases.
* Supports KUBE_API_VERSION on test cases for controlling which
  api version they test against
* Provides a common flag registration method for CLIs that need
  to connect to an API server (to avoid duplicating flags)
* Ensures errors are properly returned by the server
* Add a Context field to client.Config
2014-10-01 15:23:37 -04:00
derekwaynecarr 02e1a2e79d Update unit tests to pass a context on client create 2014-09-30 14:27:56 -04:00
derekwaynecarr b7b1193919 Add context object to kubecfg/client 2014-09-30 14:27:19 -04:00
Brendan Burns 621df0da32 Merge pull request #1455 from lavalamp/selfLink
Start setting SelfLink
2014-09-26 17:34:18 -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
Daniel Smith b972f72248 convert multiple return values into a struct, add SelfLinker 2014-09-26 14:52:16 -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
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
Clayton Coleman b0b7f13ade Merge pull request #1404 from lavalamp/scheduler
Add error type to watch.
2014-09-23 11:28:29 -04:00
Abhishek Gupta 002a5c6c29 Added test case 2014-09-22 17:40:18 -07:00
Abhishek Gupta 7c662ff065 Adding GetEndpoints method to the client EndpointsInterface 2014-09-22 17:40:18 -07:00
Daniel Smith f211e46f20 handle watch errors everywhere 2014-09-22 17:37:12 -07:00
Daniel Smith 248f49fb7c Merge pull request #1340 from smarterclayton/cleanup_watch_embedding
Cleanup watch encoding w/ RawExtension
2014-09-22 14:52:50 -07:00
Brendan Burns 3346c68d33 Merge pull request #1389 from lavalamp/scheduler
make watch actually return an error when there's an error
2014-09-22 13:59:57 -07:00
Clayton Coleman e3da2ba2c8 Cleanup watch encoding (remove dupe Encoding)
Move standard watch encode / decode streams to use
runtime.RawExtension and embed API decoding based on
a provided codec.
2014-09-22 16:03:07 -04:00
Eric Paris a32400f47f Remove all code dealing with cadvisor Percentiles
This was removed upstream beween cadvisor 0.3.0 and 0.4.0
2014-09-22 14:22:40 -04:00
Daniel Smith 4d7c6e2657 Treat super short watches with no items received the same as watches that error immediately 2014-09-19 18:09:40 -07:00
Brendan Burns 8dff6f12d7 Add authenticated TLS support to the client. 2014-09-19 15:43:23 -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
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 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 b1169ed91e Fix cache to use the "List then Watch" pattern. 2014-09-16 16:17:15 -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 fe614aeda2 Simple refactor for ease of readability
runtime.DefaultCodec -> latest.Codec
2014-09-16 16:12:35 -04:00
csrwng 6551f4e0f0 Use codec to encode/decode api objects in client and kubecfg parser 2014-09-09 08:45:53 -04:00
Daniel Smith fc09f988b4 Make tests pass again 2014-09-07 22:26:42 -07:00
Daniel Smith 48ce23ac91 Make client use pointers 2014-09-07 22:19:24 -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 7790961011 Rename Object to EmbeddedObject 2014-09-05 14:43:35 -07:00
Joe Beda 3c0a736908 Fix/expand kubecfg unit tests 2014-09-04 13:25:39 -07: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
derekwaynecarr ca3f5a9f46 Fixup name vs ID terminology 2014-09-03 10:27:33 -04:00
Daniel Smith d20264351b Merge pull request #1077 from brendandburns/service
Step #1 in migrating the service controller away from the apiserver.
2014-09-02 14:03:52 -07: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
Brendan Burns fee2b90608 Step #1 in migrating the service controller away from the apiserver.
Start using the API server for listing services.
2014-09-02 10:25:04 -07: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
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 818f357128 Client should validate the incoming host value
Convert host:port and URLs passed to client.New() into the proper
values, and return an error if the value is invalid.  Change CLI
to return an error if -master is invalid.  Remove Client.rawRequest
which was not in use, and fix the involved tests. Add NewOrDie

Preserves the behavior of the client to not auth when a non-https
URL is passed (although in the future this should be corrected).
2014-08-28 13:47:36 -04:00
Vojtech Vitek (V-Teq) 5500bbade6 Fix typos in pkg docs
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-08-28 11:43:35 +02:00
Daniel Smith 0766e7a411 Merge pull request #1058 from vishh/add_list_minions
Adding ListMinions() API to pkg/client.
2014-08-27 14:19:57 -07:00
Vishnu Kannan 180e9ed493 Add unit tests for pkg/client.ListMinions() 2014-08-27 21:07:22 +00:00
Clayton Coleman 9006eadcfe kube-proxy can read config from the apiserver
All clients that talk to a "master" as a host:port or URL
(scheme://host:port) parameter.  Add tests.
2014-08-27 15:49:01 -04:00
Vishnu Kannan a4b00e33e0 Adding ListMinions() API to pkg/client. 2014-08-27 18:57:29 +00:00
csrwng 938548a9fb Break up API client into per-resource client and common code 2014-08-25 07:54:35 -04:00
Clayton Coleman 1c68247954 Merge pull request #909 from lavalamp/scheduler3
Scheduler plugin v1
2014-08-21 19:04:51 -04:00
Dawn Chen df260c830f Merge pull request #905 from erictune/cleanup6
Dereference string* before printing it with "%s%".
2014-08-21 09:23:19 -07:00
Daniel Smith 3d47c8bad1 Fix up client tests now that we check the query in FakeHandler 2014-08-20 16:50:02 -07:00
Clayton Coleman 493863eb93 Return immediately when controllers/pods are committed
Add client waiting conditions.
2014-08-20 18:46:10 -04:00
Daniel Smith 4c4ca59050 Add poller to cache. 2014-08-20 15:32:49 -07:00
Daniel Smith 4c3f509d94 Make cache.Reflector more injectable. Add test for resource version state keeping. 2014-08-20 15:32:49 -07:00
Clayton Coleman 13c3efbc4c The default client poll interval is extremely long
Most operations complete much more quickly than 20s, and those that
do take longer are going to be fixed to make them take less time
(#353)
2014-08-18 13:40:35 -04:00
Clayton Coleman 82b0ec5115 Replace pkg/kubecfg#FakeKubeClient with the fake in pkg/client 2014-08-15 17:15:53 -04:00
Eric Tune 3d02700cc8 Dereference string* before printing it with "%s%".
Suggested by "go vet".
2014-08-14 14:06:09 -07:00
Daniel Smith 5dd130a350 Prevent accidental setting of sync or timeout 2014-08-08 14:09:14 -07:00
Daniel Smith 85ff1d3e7f Add fake client to make testing easier. 2014-08-08 14:09:13 -07:00
Daniel Smith 097147545c Allow more general parameters to be made by client. Also fix style and comments. 2014-08-08 14:09:13 -07:00
Sean Borman 1fc29e20cc Corrected a typo. 2014-08-05 13:53:52 -07: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
brendandburns bf40981197 Merge pull request #758 from lavalamp/clientCache
Watch based client cache
2014-08-05 11:46:22 -07:00
Clayton Coleman babb7528ce httptest.NewTLSServer is ~0.2s of setup per test
We're not exercising anything TLS related in client and request,
set these back to NewServer.  Should add a new TLS end-to-end
test for hack/test-cmd.sh with real (test) certs.
2014-08-05 00:59:42 -04:00
Daniel Smith 041d56f3d0 finish testing client/cache 2014-08-04 14:50:01 -07:00
Daniel Smith a47b65bf8a Add cache package. 2014-08-04 14:50:01 -07:00
Clayton Coleman f7149926c0 Remove expectNoError from client, kubelet, and util 2014-08-04 09:39:06 -04:00
Brendan Burns 1101c00014 Make updates atomic from the client side. 2014-08-01 16:47:25 -07:00
Brendan Burns 490bb28bf9 Add TCP socket based health checking. 2014-08-01 14:13:56 -07:00
Clayton Coleman 28d42a79a4 Merge pull request #719 from csrwng/list_replication_controllers
Add a method to list replication controllers
2014-07-31 14:34:58 -04:00
Dawn Chen 2e8020be8c Update the entire cAdvisor package. There is a version mismatch issue
which cause #707
2014-07-31 10:11:25 -07:00
csrwng a3476fcbca Add a method to list replication controllers 2014-07-31 12:37:02 -04:00
Daniel Smith 3b8488028d Add /version to server and check it in client.
Will help detect client/version skew and prevent e2e test from passing
while running a version other than the one you think it's running.
2014-07-28 15:45:25 -07: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
Daniel Smith 91375f4c04 Split httpWatcher into watch.StreamWatcher and tools.APIEventDecoder. 2014-07-21 16:07:58 -07:00
Daniel Smith dbd0d419df Add watch capability to our client.
Next steps: Make an etcd watcher... decide on a state field for pods...
move the scheduler to its own binary.
2014-07-21 16:07:58 -07:00
Daniel Smith 05f01a3654 Revert "assorted formatting and typo fixes" 2014-07-18 17:16:30 -07:00
Daniel Smith 211f6b312f Merge pull request #520 from jonboulle/master
assorted formatting and typo fixes
2014-07-18 17:15:30 -07:00
Jonathan Boulle 9e63c3a633 assorted formatting and typo fixes 2014-07-18 13:02:59 -07:00
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
Nan Deng 564a58722c Retrieve machine spec from cAdvisor 2014-07-17 15:21:47 -07:00
Nan Deng 6878f105c0 add a client to get container info from kubelet 2014-07-16 01:08:56 -04:00
Andrew Gerrand a9fdf1f6b5 rename client.ClientInterface to client.Interface 2014-07-11 09:51:34 +10:00
brendandburns 0748ac39e8 Merge pull request #374 from yugui/feature/show-progress
Periodically shows message while waiting for completion of REST operations
2014-07-09 23:15:05 -07:00
Yuki Yugui Sonoda 602f7d8112 Use glog instead of printing to stderr. 2014-07-10 14:59:56 +09:00
Yuki Yugui Sonoda 325c5cd47e Fixes golint errors in pkg/client 2014-07-08 16:15:41 +09:00
Brendan Burns e3838e1153 Make poll period and timeout configurable.
Make poll period short for integration testing.
2014-07-07 10:13:27 -07:00
Brendan Burns 2f5eeee1f6 Make sync false by default. Works around timeout/retry issues. 2014-07-03 21:23:21 -07:00
Daniel Smith 3b9735d787 Test atomic PUTs, and make them work.
Improve apiserver/logger.go's interface (it's pretty cool now).

Improve apiserver's error reporting to clients.

Improve client's handling of errors from apiserver.

Make failed PUTs return 409 (conflict)-- http status codes are amazingly
well defined for what we're doing!
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 a391b2ff03 Implement sync behavior for controllers. 2014-06-26 19:44:28 -07:00
Daniel Smith fd5e3b0b04 Implement client polling. 2014-06-26 16:10:38 -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
Brendan Burns 84e5c37f74 Several small fixes. 2014-06-24 15:30:14 -07:00
Brendan Burns 8b50e45dcc Update the proxy server. 2014-06-24 11:25:45 -07:00
Daniel Smith 175e998258 Fix nil/[]byte{} consistency, and other review comments. 2014-06-24 10:07:51 -07:00
Daniel Smith 72809f8e67 catch 202 early 2014-06-24 09:38:22 -07:00
Daniel Smith 5ce54bb77b Use new method. 2014-06-24 09:38:22 -07:00
Daniel Smith 61a494d303 First step of combination. 2014-06-24 09:38:22 -07:00
Daniel Smith b850d36166 Fix boilerplate everywhere 2014-06-23 11:32:11 -07:00
Brendan Burns b84cc9c895 Deflake a test w/ go1.3 random maps. 2014-06-20 10:41:15 -07:00
Johan Euphrosine fe589a3f64 pkg/client: refactor tests 2014-06-19 23:12:27 -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
Daniel Smith bc02b3c21a Rename [label] query to selector 2014-06-19 13:31:42 -07:00
Daniel Smith 3ab2f8a3a2 First piece of improving labels 2014-06-16 22:05:11 -07:00
Brendan Burns 32071289e6 Add some documentation 2014-06-15 22:42:19 -07:00
Daniel Smith 229ccb0fa3 Merge pull request #110 from jbeda/test-fix
Stable comparison of stuff that transits through map.
2014-06-14 16:05:30 -07:00
Joe Beda c6dd6cb410 Stable comparison of stuff that transits through map.
There are probably more of these in the codebase.  Looks like this happens with the go tip via travis.
2014-06-14 14:42:00 -07:00
Daniel Smith 5626703634 Add a new e2e test; fix some bugs/usability problems 2014-06-13 16:30:26 -07:00
Brendan Burns 164160adef Address package level comments for readability. 2014-06-12 20:26:12 -07:00
Johan Euphrosine 4f6bed03ae gofmt -s pkg/ cmd/ 2014-06-12 14:16:19 -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 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
Joe Beda 2c4b3a562c First commit 2014-06-06 16:40:48 -07:00