Commit Graph

31 Commits

Author SHA1 Message Date
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot
421c16addd Merge pull request #25894 from brendandburns/thirdparty-watch
Automatic merge from submit-queue

Fix third party

Fixes https://github.com/kubernetes/kubernetes/issues/25421
Fixes https://github.com/kubernetes/kubernetes/issues/25422

@AdoHe @sjenning @caesarxuchao @lavalamp 

@kubernetes/sig-api-machinery 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-04 15:42:41 -07:00
Brendan Burns
328a8392b1 Fix third party 2016-06-02 10:24:14 -07:00
Clayton Coleman
c6961d6fd6
Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several
core paths.
2016-05-21 23:55:42 -04:00
Robert Bailey
385ae07bc6 Merge pull request #24919 from kargakis/avoid-panic-in-mapper
kubectl: avoid panic with nil gvk
2016-05-06 15:07:05 -07:00
Clayton Coleman
e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
Michail Kargakis
29ff69fd83 kubectl: avoid panic with nil gvk
The decoder will return a nil gvk in case it errors out and getting
the version out of that gvk naturally will panic. Bail out as soon
as we can check that the error is non-nil. kubectl edit was the primary
victim.
2016-04-28 11:14:15 +02:00
Brendan Burns
be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
Jordan Liggitt
560b02b3ec Prefer fetched version when determining HPA group version kind 2016-03-11 00:03:38 -05:00
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
nikhiljindal
2ad642d370 Merge registered and latest and move to apimachinery 2016-01-21 14:42:21 -08:00
Chao Xu
2b5b708b70 Refactor the API registration and installation 2015-12-23 22:44:25 -08:00
deads2k
519b4e80d1 update NewObject for groupversionkind 2015-12-09 08:13:15 -05:00
deads2k
f764e0099c Update ObjectTyper to GroupVersion 2015-12-07 08:35:05 -05:00
deads2k
8679925847 update RESTMapping API to be properly typed 2015-11-25 14:02:37 -05:00
deads2k
5077e9b644 make register.GroupVersion use GroupVersion 2015-11-24 09:45:36 -05:00
hurf
e1b88c6942 Integrate convertion tool to kubectl
Added 'convert' subcommand to kubectl to convert config files
between different API versions.
2015-10-09 10:15:30 +08:00
hurf
5bec41d0b6 Fix docstring for InfoForObejct func 2015-08-24 21:46:49 +08:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Alex Robinson
68bbf6c129 Merge pull request #10447 from feihujiang/helpfulErrorForUnsupportedVersion
Provide more helpful error when using unsupported api version
2015-06-29 15:00:58 -07:00
feihujiang
878a72228f Provide more helpful error when using unsupported api version 2015-06-29 15:32:54 +08:00
Mike Danese
0c8f71aa0b make rolling update check if the replication controller has been defaulted 2015-06-25 12:29:21 -07:00
feihujiang
b41b53122a Add source in “error from server” message when using kubectl 2015-06-25 14:20:09 +08:00
Mike Danese
627b2f9a24 kubectl should use UnstructuredJSONScheme to decode version and kind, as it throws errors if either are missing] 2015-06-08 11:51:37 -07:00
Clayton Coleman
0a28e50511 Revert "Revert "Enhance error message from kubectl when 'kind' is empty"" 2015-05-20 17:32:23 -04:00
Clayton Coleman
633c56f8c0 Revert "Enhance error message from kubectl when 'kind' is empty" 2015-05-20 10:32:56 -04:00
feihujiang
6c8a1cdb17 Enhance error message from kubectl when 'kind' is empty
Enhance error message from kubectl when 'kind' is empty

Enhance error message
2015-05-20 15:23:47 +08: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
feihujiang
6b79dcaa4d add source filename in error message 2015-03-27 09:28:48 +08:00
Clayton Coleman
6918a4d32e Replace automatic YAML decoding with opt-in YAML decoding
Base codecs no longer automically handle YAML.  Instead, clients
must convert to JSON first via yaml.ToJSON and runtime.YAMLDecoder.
2015-03-20 00:03:56 -04:00
Clayton Coleman
d75a3d5021 Move Resource functionality to its own package
Create a unified Builder object for working with files, selectors,
types, and items that makes it easier to get multi-object functionality.

Supports all of the behaviors previously in resource.go, but with
additional flexibility to allow multi-type retrieval and access, directories,
URLs, nested objects, and lists.
2015-01-09 11:59:06 -05:00