Commit Graph

62 Commits (bb460c04ddb25245906e80ec5e42ee5675782c92)

Author SHA1 Message Date
Clayton Coleman 2fd38a7dc0 Break kubectl from assuming details of codecs
Most of the logic related to type and kind retrieval belongs in the
codec, not in the various classes. Make it explicit that the codec
should handle these details.

Factory now returns a universal Decoder and a JSONEncoder to assist code
in kubectl that needs to specifically deal with JSON serialization
(apply, merge, patch, edit, jsonpath). Add comments to indicate the
serialization is explicit in those places. These methods decode to
internal and encode to the preferred API version as previous, although
in the future they may be changed.

React to removing Codec from version interfaces and RESTMapping by
passing it in to all the places that it is needed.
2016-01-22 13:27:26 -05:00
Clayton Coleman 181dc7c64c Update thirdpartyresourcecodec with new Decoder 2016-01-22 13:27:25 -05:00
nikhiljindal 2ad642d370 Merge registered and latest and move to apimachinery 2016-01-21 14:42:21 -08:00
Michal Minar 3188e123a9 Add missing field label conversions
Added missing field labels conversion functions for kinds:
- ConfigMap
- DaemonSet
- Deployment
- Endpoints
- Event
- Ingress
- Job
- PersistentVolume
- PersistentVolumeClaim
- ResourceQuota
- Secret
- Service

Completed conversion functions of few other kinds:
- Namespace
- ServiceAccount

Added tests suite for the above.

Signed-off-by: Michal Minar <miminar@redhat.com>
2016-01-14 10:00:45 +01:00
k8s-merge-robot 21c01c05e3 Merge pull request #18902 from deads2k/gv-partial
Auto commit by PR queue bot
2015-12-24 01:42:59 -08:00
deads2k 20f9c2c545 find partial resource matches 2015-12-21 09:26:06 -05:00
Wojciech Tyczynski 58336829be Switch to versioned ListOptions in server. 2015-12-21 14:23:37 +01:00
Abhishek Shah 6f63875165 Reverting 18442 2015-12-17 16:57:29 -08:00
deads2k 9fda7f1812 update StatusDetails to handle Groups 2015-12-17 09:14:12 -05:00
deads2k 41b78ad2b6 find partial resource matches 2015-12-16 10:19:31 -05:00
deads2k d0aaf13920 use constants for group names 2015-12-14 10:04:10 -05:00
k8s-merge-robot 266ab4a796 Merge pull request #18487 from smarterclayton/guard_encode_decode
Auto commit by PR queue bot
2015-12-13 23:08:18 -08:00
k8s-merge-robot c458cd7bb7 Merge pull request #18379 from deads2k/gv-newobject
Auto commit by PR queue bot
2015-12-13 13:33:16 -08:00
Tim Hockin 87a35047dd Move FieldPath and errors to a sub-package
This makes the naming and reading a lot simpler.
2015-12-10 11:48:16 -08:00
k8s-merge-robot 815fcc3334 Merge pull request #18131 from brendandburns/3rdparty
Auto commit by PR queue bot
2015-12-10 04:10:44 -08:00
Clayton Coleman 1e21054134 Hide common codec methods under helpers
The pending codec -> conversion split changes the signature of
Encode and Decode to be more complicated. Create a stub helper
with the exact semantics of today and do the simple mechanical
refactor here to reduce the cost of that change.
2015-12-09 21:15:02 -05:00
deads2k 519b4e80d1 update NewObject for groupversionkind 2015-12-09 08:13:15 -05:00
Brendan Burns 9574a4b782 Switch to KindToResource for ThirdPartyResourceData 2015-12-07 12:54:41 -08:00
Chao Xu 6e192760e3 refactoring latest.go GroupVersion;
clean up latest.go GroupVersions;
remove latest.GroupMeta.Group;
remove latest.GroupMeta.Version.
2015-11-30 11:30:21 -08:00
deads2k 8679925847 update RESTMapping API to be properly typed 2015-11-25 14:02:37 -05:00
deads2k 5c4fb5bcbe make RESTMapper.KindFor 2015-11-25 14:02:37 -05:00
deads2k 6231404682 update decoder to use GroupVersion 2015-11-25 12:14:06 -05:00
Wojciech Tyczynski bf13bef955 Use unversioned.ListOptions in API server. 2015-11-24 14:42:21 +01:00
Tim Hockin 48b49a5cae s/ValidationErrorList/ErrorList/ 2015-11-22 20:13:20 -08:00
Tim Hockin 0ff66da346 Move fielderrors into validation 2015-11-22 20:12:20 -08:00
k8s-merge-robot 4dbf7c637c Merge pull request #17163 from wojtek-t/extend_decoder
Auto commit by PR queue bot
2015-11-21 08:37:29 -08:00
Timothy St. Clair 02851dd1b7 Removal of fakeClient and shift to storage.Interface for
all registry tests.
2015-11-19 10:34:30 -06:00
Wojciech Tyczynski d7b098b0e9 Add DecodeParametersInto method to Codec. 2015-11-18 09:56:04 +01:00
k8s-merge-robot 961a02a602 Merge pull request #17204 from thockin/airplane-rest-canonicalize
Auto commit by PR queue bot
2015-11-13 18:17:18 -08:00
Wojciech Tyczynski a5a8717539 Pass versioner to cacher. 2015-11-13 08:35:28 +01:00
Tim Hockin 35ab5c6234 Add a REST hook for post-validation canonicalize
This is a simple hook that only Endpoints uses for now.
2015-11-12 21:13:16 -08:00
eulerzgy 501c2825cf Make order of fun consistent 2015-11-10 17:43:54 +08:00
Wojciech Tyczynski 030a272db5 Enable cacher for all resources. 2015-11-03 11:55:37 +01:00
Wojciech Tyczynski 9c53f301f1 Merge selectors with ListOptions. 2015-10-29 15:42:57 +01:00
Wojciech Tyczynski aa30e38183 Pass resource version to storage List operation. 2015-10-27 10:03:58 +01:00
Chao Xu 7c9f4cc42f experimental. -> extensions. 2015-10-09 15:49:10 -07:00
Chao Xu 80f213c376 "experimental" -> "extensions" 2015-10-09 15:14:03 -07:00
Chao Xu 67f316dd19 apis/experimental->apis/extensions 2015-10-09 15:04:41 -07:00
Chao Xu 0b7e3c7dd1 experimental/v1alpha1->extensions/v1beta1 2015-10-09 15:01:33 -07:00
Janet Kuo 57388f9f94 Support kubectl group/resource name 2015-10-06 13:12:32 -07:00
Chao Xu f4ff0f7683 fix thirdparty API, now the config file of thirdpartyresource also need to group/version instead of version 2015-10-01 12:30:51 -07:00
Brian Grant 313918f561 Merge pull request #14148 from brendandburns/perf
Add a method for encoding directly to a io.Writer and use it for HTTP
2015-09-25 13:19:58 -07:00
Brendan Burns 8998219686 Add a method for encoding directly to a io.Writer and use it for HTTPx 2015-09-24 15:52:09 -07:00
Chao Xu ae1293418b move experimental/v1 to experimental/v1alpha1;
use "group/version" in many places where used to expect "version" only.
2015-09-24 15:32:11 -07:00
Chao Xu f1de364a0e Make latest.AllGroups public; fix thirdPartyResourceDataCreator.New 2015-09-21 22:32:24 -07:00
Brendan Burns fb9efac68c Complete initial third party API support in the master 2015-09-21 15:56:36 -07:00
Daniel Martí 586cb9126a Move pkg/util.Time to pkg/api/unversioned.Time
Along with our time.Duration wrapper, as suggested by @lavalamp.
2015-09-17 17:51:27 -07:00
Kris f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
feihujiang 51f59f3c78 Fix the wrong path of document 2015-09-17 20:38:08 +08:00
Chao Xu f5023929d8 fix broken files after rebase 2015-09-12 15:45:12 -07:00