Commit Graph

27 Commits (e1998e5a07e56543a60f4f4bfaac0cc9a96a1424)

Author SHA1 Message Date
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
csrwng 19ddfe72df Fixed FakeKubeClient in kubecfg_test 2014-07-31 13:59:58 -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
Kelsey Hightower 1ca199379f kubecfg: improve tests around authentication
This change adds additional test coverage for the kubecfg
command. There is now a test for the case when the auth info
file does not exist. LoadAuthInfo tests have been refactored
to use table testing.
2014-07-26 22:21:17 -07:00
Daniel Smith 321ce0e1ce Merge pull request #565 from brendandburns/api2
Fork API types.
2014-07-24 22:29:57 -07:00
Brendan Burns bf5ae4bb9d Fork API types. 2014-07-24 21:47:08 -07:00
Daniel Smith f3b6090a38 Make kubecfg work for minions. 2014-07-24 18:04:55 -07:00
Jonathan Boulle c43035088b assorted formatting and typo fixes 2014-07-24 15:10:36 -07:00
Daniel Smith 7a8e268c0e Merge pull request #548 from kelseyhightower/improve_kubecfg_tests
Use table testing for makePort tests
2014-07-23 09:50:21 -07:00
Kelsey Hightower 609050da39 Use table testing for makePort tests 2014-07-23 00:18:09 -07:00
Brendan Burns c3f313784d Actually fix kubecfg. 2014-07-22 23:40:55 -07:00
Brendan Burns fcb9201c3b Add a name to containers created by RunController so that validation works. 2014-07-22 22:58:41 -07:00
Clayton Coleman fbd7bc375f kubecfg doesn't allow updates because of path checks
Check for 1 path segment on create/list, 2 on update/delete, and
allow any number of path segments on get (for now).

Also pretty prints the list of actual types that are supported for
create/update, which today corresponds to the list of types that
are supported period.
2014-07-22 20:25:06 -04:00
Kelsey Hightower 682efb7ca5 Remove unnecessary expectNoError helper function
This patch completes a TODO item for the kubecfg package test suite by
removing the expectNoError helper function, which does not reduce enough
typing to justify its usage.
2014-07-20 18:28:55 -07:00
Daniel Smith 05f01a3654 Revert "assorted formatting and typo fixes" 2014-07-18 17:16:30 -07:00
Jonathan Boulle 9e63c3a633 assorted formatting and typo fixes 2014-07-18 13:02:59 -07:00
Yuki Yugui Sonoda c6b27bb87d Fixes golint errors in pkg/kubecfg 2014-07-15 22:56:17 +09:00
Brendan Burns f7bd5a6f0f Add a template printer to kubecfg. 2014-07-14 21:13:06 -07:00
Andrew Gerrand a9fdf1f6b5 rename client.ClientInterface to client.Interface 2014-07-11 09:51:34 +10:00
Yuki Sonoda (Yugui) 2d888539dc Fixes golint errors in pkg/kubecfg 2014-07-10 21:27:05 +09:00
Clayton Coleman 15c96508a9 Use ID instead of Id (go style) everywhere
Fixes #278
2014-07-01 13:16:47 -04:00
Brendan Burns 23c971605e Initial add of cloud-demo 2014-06-26 18:52:08 -07:00
Brendan Burns 14838df51e Update the proxy server. 2014-06-26 13:09:23 -07:00
Brendan Burns 9bd4e441b3 better error handling. 2014-06-26 10:44:57 -07:00
Daniel Smith c97c514742 Rename cloudcfg to kubecfg 2014-06-25 18:01:37 -07:00