Commit Graph

46 Commits (34924af63d8c049f740875f1a0ef69eb13ca0eb8)

Author SHA1 Message Date
Clayton Coleman 1618c39a46 Convert List query parameters via object conversion
Convert url.Values -> an object, with appropriate versioning. ListOptions
should also expose parameter names to swagger.
2015-03-27 15:03:57 -04:00
Dawn Chen 34e9c82c70 Convert RestartPolicy to string for v1beta3.
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00
Tim Hockin b3304c49ad Use deep spew in serialization test & go obj diff 2015-03-06 08:21:10 -08: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
Yu-Ju Hong 4cb730dad5 Refactor API object fuzzer
API object fuzzer is used to randomly populate API object for testing. Similar
code of the fuzzer was duplicated in multiple files. This change refactors the
tests and moves the fuzzer to a separate file.
2015-01-29 18:14:09 -08:00
Brendan Burns 33ee41090e Add NodeSelector to the PodTemplate in v1beta1 and v1beta2 2015-01-26 20:30:48 -08:00
Tim Hockin 81343aac63 Change PullPolicy constants to match 2015-01-21 12:48:56 -08:00
Clayton Coleman 5f6caaba2e Add TypeAccessor to api/meta for objects without Object/ListMeta
Adding objects that have TypeMeta (use runtime.Scheme) but do not
expose ObjectMeta/ListMeta (because they are not Kube API objects)
and wanted to get the simpler access path for in memory objects.
2015-01-20 17:37:24 -05:00
Joe Beda dcd00c936e Move all kubernetes to posix flags 2015-01-15 09:12:19 -08:00
Clayton Coleman 8262c30c97 Improve serialization round trip test and add v1beta3 2015-01-08 12:44:28 -05:00
Daniel Smith 0d628b3bff Make semantic deep equal public feature
* Use semantic deep equal when validating
* More test cases for deep equal
2015-01-07 15:21:34 -08:00
Daniel Smith 894a3e6d3f Wire resource.Quantity into api 2015-01-07 15:21:34 -08:00
Brendan Burns 5e8490d5fe Add a PodUnknown phase and make ListPods return even when there are errors
obtaining info for some pods.
2014-12-19 15:08:48 -08:00
Brendan Burns dcfcf315e5 Revert "Add an api object for the kubelet, and a versioned endpoint."
This reverts commit d4b9979382.
2014-12-12 21:13:44 -08:00
Brendan Burns d4b9979382 Add an api object for the kubelet, and a versioned endpoint. 2014-12-12 15:26:28 -08:00
Jordan Liggitt 51bfb50698 Use util.Time consistently in types.go 2014-12-11 11:14:25 -05:00
Clayton Coleman 8a833ca701 Add a List type that can contain arbitrary objects
Supports objects that the core schema may not recognize and
preserves them unmodified as runtime.Unknown
2014-12-09 10:31:17 -05:00
Clayton Coleman 714dbf4522 Shrink runtime.TypeMeta to be equivalent to api TypeMeta
Remove unused fuzzing
2014-12-07 20:49:07 -05:00
Jordan Liggitt 22eee15fe7 Remove uint64 bitshift workaround 2014-12-04 15:00:23 -08:00
Sam Ghods 9a9a1e0939 Move from go-yaml/yaml to ghodss/yaml 2014-12-02 16:24:05 -08:00
markturansky 8159c8fd25 Refactor PodCondition to PodPhase 2014-11-21 15:28:38 -05:00
Yuki Yugui Sonoda 864bfb65da Fixes golint errors in pkg/api. 2014-11-14 13:14:23 +09:00
Clayton Coleman 94c873e7a4 Remaining refactor for PodTemplateSpec and fixing test cases 2014-11-11 17:03:20 -05:00
markturansky 119f654a13 Refactor PodStatus to PodCondition in internal API for v1beta3 2014-11-05 17:26:47 -05:00
Brendan Burns 5d4d60783d Add requirements based scheduling. 2014-10-25 22:08:00 -07: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 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 bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Clayton Coleman 892942af8f Read BoundPods from etcd instead of ContainerManifestList
There are three values that uniquely identify a pod on a host -
the configuration source (etcd, file, http), the pod name, and the
pod namespace. This change ensures that configuration properly
makes those names unique by changing podFullName to contain both
name (currently ID in v1beta1, Name in v1beta3) and namespace.

The Kubelet does not properly handle information requests for
pods not in the default namespace at this time.
2014-10-16 19:29:08 -04:00
Clayton Coleman 935e97d59d Move ObjectDiff into util 2014-10-09 17:23:43 -04:00
Clayton Coleman 094bc3796a Update ObjectReference to use ResourceVersion string everywhere
Breaks backwards compat for anyone using older versions
2014-10-08 15:57:38 -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
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Clayton Coleman 305db35422 Add a Log method on Scheme for better debugging 2014-10-05 17:17:25 -04:00
Daniel Smith 283eaf3931 Add new Event type
* replaces previous Event type, which is too limited.
* Remove writing of old event type.
* Fix serialiazation test to automatically test all types.
2014-09-25 11:31:35 -07:00
Clayton Coleman 463a16af36 Add benchmarks for API tests 2014-09-19 17:17:54 -04:00
Clayton Coleman 23307344ee Add round trip tests for default encoding
Turn down iterations a bit for speed
2014-09-16 17:27:59 -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 fe614aeda2 Simple refactor for ease of readability
runtime.DefaultCodec -> latest.Codec
2014-09-16 16:12:35 -04:00
Daniel Smith 42dafb0e2e add PluginBase to fuzz functions 2014-09-15 13:15:46 -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 828b70abb9 api and api/v1beta1 pass tests again 2014-09-07 22:19:24 -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 eb5ca80946 Split helper test, move fuzzing to api package as serialization_test.go 2014-09-02 10:40:52 -07:00