Commit Graph

95 Commits (0076c181c7ffa757401db6df256492b5ce6ec415)

Author SHA1 Message Date
Wojciech Tyczynski de0a1d179f Fix ordering of conversion methods. 2015-05-21 19:41:48 +02:00
Tim Hockin 70c94fad6d Don't rename api imports in conversions 2015-05-19 11:21:21 -07:00
Wojciech Tyczynski 9a93206774 Script for automatically generate conversions. 2015-05-19 02:17:58 +02:00
Wojciech Tyczynski 108615d081 Refactor conversion generator 2015-05-15 15:11:18 +02:00
Wojciech Tyczynski b52a4e60fc Fix convertion generator for manually written ones 2015-05-14 13:51:34 +02:00
Wojciech Tyczynski c2f2faeb07 Generate conversion methods for v1 api. 2015-05-13 14:20:59 +02:00
Wojciech Tyczynski 5578dc99e3 Improvements for conversions generator 2015-05-11 12:21:11 +02:00
deads2k 0d796c184d fix DeepCopy to properly support runtime.EmbeddedObject 2015-05-05 10:36:39 -04:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Clayton Coleman 1a8845af61 Merge pull request #7490 from smarterclayton/alter_list
Do not automatically decode runtime.RawExtension
2015-05-01 16:48:26 -04:00
Cesar Wong f72ee1f72b Handle conversion of boolean query parameters with a value of "false" 2015-04-30 09:26:06 -04:00
Clayton Coleman 12ba4e2452 Do not automatically decode runtime.RawExtension
Make clients opt in to decoding objects that are stored
in the generic api.List object by invoking runtime.DecodeList()
with a set of schemes. Makes it easier to handle unknown
schema objects because decoding is in the control of the code.

Add runtime.Unstructured, which is a simple in memory
representation of an external object.
2015-04-29 12:53:07 -04:00
Wojciech Tyczynski 7f919a44c2 Generate conversions for v1beta3 package. 2015-04-24 09:18:12 +02:00
Wojciech Tyczynski ea314d55f7 Create benchmarks for conversions. 2015-04-22 16:27:23 +02:00
Clayton Coleman 545a5a865f List output with differing types should be more resilient
kubectl get can output a series of objects as a List in versioned
form, but not all API objects are available in the same schema.
Make the act of converting a []runtime.Object to api.List more
robust and add a test to verify its behavior in Get.

Makes it easier for client code to output unified objects.
2015-04-20 14:44:16 -04:00
Prashanth Balasubramanian a7864aa230 Scheduler uses TTLStore for assumed pods 2015-04-08 15:01:04 -07:00
Clayton Coleman 870da687d0 Add more extensive tests to apiserver for variations in version
Formalize v1beta1 and v1beta3 style APIs in our test cases.
2015-03-27 15:03:58 -04:00
Clayton Coleman eb0eff69fe Move watch to being a resthandler resource and expose it on LIST
GET /pods?watch=true&resourceVersion=10

will now function equivalent to GET /watch/pods.
2015-03-27 15:03:58 -04:00
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
Clayton Coleman ea32b89e5e Allow map[string][]string to be converted to an object
Will allow query parameters to be converted to versioned objects.
2015-03-24 17:25:45 -04:00
Clayton Coleman 71abc99dbe Expose a ToJSON and runtime.YAMLDecoder helper
Enables clients to optionally handle YAML
2015-03-20 00:03:56 -04:00
nikhiljindal 790a8bbd23 Adding conversion functions for event field selectors 2015-03-12 14:10:51 -07:00
Clayton Coleman 4b16a87096 Simplify api_installer and setup methods 2015-03-09 14:39:31 -04:00
Daniel Smith 1fdf749211 fix e2e failure 2015-03-02 15:03:56 -08:00
Daniel Smith c4822dc060 Revert "Revert "Adding converter functions to convert field label selectors to internal version before matching""
This reverts commit 5f35a67002.
2015-03-02 15:00:09 -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 d68c738fcf Merge pull request #4575 from nikhiljindal/versionedFieldSelector
Adding converter functions to convert field label selectors to internal version before matching
2015-02-27 16:33:15 -08:00
nikhiljindal 48e7945f65 Versioning the field selectors 2015-02-27 16:10:59 -08:00
Brendan Burns 877f605dc0 Add specific errors for missing kind and version. 2015-02-26 11:19:04 -08:00
Clayton Coleman dc3b327951 Allow runtime.SetList() on an api.List
SetList doesn't allow api.List
2015-02-14 23:37:23 -05:00
Tim Hockin 1ddb68d8d7 Sketch: a third take on defaulting values 2015-02-02 22:35:58 -08:00
Clayton Coleman c2b79e52d4 Merge pull request #4027 from deads2k/deads-raw-extension
handle omitted rawExtension
2015-02-02 15:03:37 -05:00
deads2k fe398938e8 handle omitted rawExtension 2015-02-02 14:53:22 -05:00
Clayton Coleman a7c9a12286 Add name generation and normalize common create flows
Adds `ObjectMeta.GenerateName`, an optional string field that defines
name generation behavior if a Name is not provided.

Adds `pkg/api/rest`, which defines the default Kubernetes API pattern
for creation (and will cover update as well). Will allow registries
and REST objects to be merged by moving logic on api out of those places.

Add `pkg/api/rest/resttest`, which will be the test suite that verifies
a RESTStorage object follows the Kubernetes API conventions and begin
reducing our duplicated tests.
2015-02-02 14:44:53 -05:00
Brendan Burns 99b9785881 Merge pull request #3836 from mfojtik/extract_list_ptr
Ensure the ptr is pointing to reflect.Slice in ExtractList
2015-01-27 10:00:33 -08:00
Michal Fojtik ae3f10a397 Ensure the ptr is pointing to reflect.Slice in ExtractList 2015-01-27 18:02:37 +01:00
Mike Danese d77743a07c gimports nits 2015-01-26 22:42:29 -08:00
Michal Fojtik e7df8aa098 Fix ExtractList to support extraction from generic api.List{} 2015-01-23 22:13:37 +01: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
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 db2c59ff61 Allow conversion between []runtime.Object and []runtime.RawExtension
This allows generic lists with unrecognized objects to be roundtripped
between internal and external objects.
2014-12-09 10:31:17 -05:00
Clayton Coleman 1eaa5c41f9 RawExtension was not properly marshalled
MarshalJSON can't use a pointer to a struct for RawExtension:

http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
2014-12-09 10:31:14 -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
Clayton Coleman 84d84c50c2 Add a strongly typed error for unrecognized kind/type/version 2014-12-07 20:48:16 -05:00
derekwaynecarr ef25520baa make selfLink namespace aware 2014-12-05 17:37:11 -05:00
Sam Ghods 6399854240 Remove unused YAML tags and GetYAML/SetYAML methods
Unneeded after move to ghodss/yaml.
2014-12-02 16:25:28 -08:00
Sam Ghods 9a9a1e0939 Move from go-yaml/yaml to ghodss/yaml 2014-12-02 16:24:05 -08:00
Daniel Smith 8d762c996a Remove boilerplate coversion functions 2014-11-24 12:57:34 -08:00
Tim Hockin 95a9098311 fix 'go vet' warnings 2014-11-21 09:45:28 +08:00
Clayton Coleman 39882a3555 Allow Create/Update/Delete kubectl commands to handle arbitrary objects
* Ensure kubectl uses abstractions from other parts of Kube
* Begin adding abstractions that allow arbitrary objects
* Refactor "update" to more closely match allowed behavior
2014-11-04 10:44:56 -05:00