Commit Graph

74 Commits (1a1b0699bc7372f333cc2d900bba684b2b0a96c0)

Author SHA1 Message Date
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Deyuan Deng 1454d5d174 Improve replication controller errro handling. 2014-10-06 21:02:51 -04: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
Deyuan Deng 7640280284 Ignore empty pod port spec. 2014-10-03 21:38:29 -04:00
bgrant0607 41daef6a00 Merge pull request #1524 from brendandburns/ux
Add an initial UX prototype for Kubernetes
2014-10-02 15:05:43 -07: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
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
Brendan Burns c3d2517371 Re-add the ability to load certs from the config file. 2014-10-01 17:10:07 -07:00
Brendan Burns 77196403dc Add support for fields. 2014-10-01 16:49:50 -07: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
Brendan Burns f630104538 Update the proxy server so that it passes labels along too. 2014-09-30 09:27:20 -07:00
Tim Hockin cf86d66076 rename labels in kubcfg logic 2014-09-22 15:34:13 -07:00
Tim Hockin bb3900f447 Make "kubecfg -s <port> run ..." select correctly
kubecfg run creates a replication controller which sets all pods with a
replicationController= label, but then sets up a service selecting on name=
instead.  This fixes that.  kubecfg -s <port> run ... can now actually work.
2014-09-22 15:17:47 -07:00
Tim Hockin 2c5693b0ad Don't force a host port through kubecfg 2014-09-22 12:31:37 -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
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
Daniel Smith b8c955ea17 Fixes:
* Fix kubecfg test, which was writing an internal object straight to yaml
* Address review comments
2014-09-15 13:15:46 -07:00
Brendan Burns 80c06f4768 Add an earlier check and error for names that won't work for services. 2014-09-10 11:31:03 -07: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
Joe Beda 3c0a736908 Fix/expand kubecfg unit tests 2014-09-04 13:25:39 -07:00
Joe Beda f8e2f927f6 Pretty up the demo a little.
Use images and some better formatting.  Also add scripts to help prevent typos.

This based on an improved version done by Julia Ferraioli.  She came up with the cool images.
2014-09-04 13:25:39 -07:00
Joe Beda 45aaff9993 Add template update to rollingUpdate 2014-09-04 13:25:38 -07:00
Joe Beda 2444e4e1dc Simplify labels for `kubecfg run`
We created a name=<controller name> label on each object we created.  This was confusing.  Instead, piggyback on `replicationController` label and use that as the selector.
2014-09-04 13:25:38 -07:00
Deyuan Deng 75470e6adf Include pod status in kebecfg humanreadable result. 2014-09-03 20:26:32 -04:00
derekwaynecarr ca3f5a9f46 Fixup name vs ID terminology 2014-09-03 10:27:33 -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) 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
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
Clayton Coleman b01d0c2874 Merge pull request #1002 from smarterclayton/improve_wait_api
Improve the wait.Poll GoDoc and api
2014-08-25 13:07:04 -04:00
csrwng 938548a9fb Break up API client into per-resource client and common code 2014-08-25 07:54:35 -04:00
Clayton Coleman 286c3c543c Improve the wait.Poll GoDoc and api
Add more tests, and switch to timeouts instead of cycles.
Deflake TestPoller
2014-08-23 12:18:03 -04:00
Brendan Burns de1480fd2f Make rolling update be blocking. 2014-08-21 15:58:17 -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
csrwng 14714f2638 Allow kubecfg to print custom types 2014-08-20 12:23:02 -04:00
derekwaynecarr 3c68b0a009 Use common resize controller logic for stop 2014-08-18 15:58:31 -04:00
Clayton Coleman 82b0ec5115 Replace pkg/kubecfg#FakeKubeClient with the fake in pkg/client 2014-08-15 17:15:53 -04:00
csrwng 5538bfca01 Allow kubecfg to parse other types via initialization map 2014-08-14 18:14:12 -04:00
Daniel Smith 51caf759c3 Add WatchReplicationControllers to kubecfg's fake 2014-08-08 14:09:13 -07:00
csrwng 92be0b3f43 Fix the wrong action being recorded on GetService
Fix the action recorded when GetService gets called on FakeKubeClient
Also fix parameter names (controller -> service)
2014-08-07 00:15:44 -04: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