Commit Graph

73 Commits (a486ab078f2d7679107dc0dc95d5266b011b0822)

Author SHA1 Message Date
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
Clayton Coleman 778a50d00b Introduce ObjectConvertor for conversion to known API versions
Will allow clients to transform internal objects to a version
suitable for external output.
2014-11-04 10:34:15 -05:00
Daniel Smith b28234fac6 Fix self linking of objects returned in lists. 2014-10-30 15:04:11 -07:00
Daniel Smith 5ac88dbe2e Merge pull request #2055 from smarterclayton/define_an_interface_for_typing
Make DataVersionAndKind public on runtime.Scheme
2014-10-29 10:29:39 -07:00
Daniel Smith 94e736e286 Merge pull request #2009 from smarterclayton/unify_meta
Unify Accessor for ObjectMeta/TypeMeta/ListMeta
2014-10-29 09:58:46 -07:00
Clayton Coleman 58715527aa Make DataVersionAndKind public on runtime.Scheme
Add a new ObjectTyper interface that clients can depend on for
converting between data and object to version and kind.
2014-10-29 12:10:55 -04:00
Vojtech Vitek (V-Teq) 90809c270d Use conversion.EnforcePtr() where appropriate
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-28 16:36:09 +01:00
Clayton Coleman 66ace4c270 Begin to unify ResourceVersioner and SelfLinker
Create a new MetadataAccessor interface that combines both
and use it where previously latest.ResourceVersioner and SelfLinker
were being used.

Adds Namespace to the get/set interface. Adds TODO about future
fast path for metadata (as per thockin's comment)
2014-10-27 16:00:55 -04:00
Vojtech Vitek (V-Teq) 6a6f24b126 Fix reflect panic in runtime/conversion
Fixes `panic: reflect: call of reflect.Value.Type on zero Value`
when calling conversion.EnforcePtr() or
runtime.Scheme.ObjectVersionAndKind() from default type switch.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-27 06:01:14 +01:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -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 bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Vojtech Vitek (V-Teq) 755d4d441a Fix typos 2014-10-21 18:57:20 +02:00
Clayton Coleman 73dba3a613 Move FindTypeMeta into the proper file 2014-10-13 23:29:40 -04:00
Clayton Coleman 485106e270 Remove unused code 2014-10-13 23:29:39 -04:00
Clayton Coleman 13992837ea Use one copy of EnforcePtr 2014-10-13 23:29:39 -04:00
Clayton Coleman d488e238dd Genericize MetaInsertionFactory into a simpler interface
The common path code for MIF goes through a conversion cycle - it
can also be done through reflection. This simplifies the Create/Update
methods into Interpret (return version) and Update (through reflection).

In addition it uses only one MetaFactory implementation across all of
our packages which reduces a bit of duplication.
2014-10-13 23:29:39 -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
Clayton Coleman 5382627e6a Move Codec functions to their own file 2014-10-09 17:25:23 -04:00
Clayton Coleman 935e97d59d Move ObjectDiff into util 2014-10-09 17:23:43 -04:00