Commit Graph

91 Commits

Author SHA1 Message Date
deads2k
f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Clayton Coleman
c5d755dbec
Refactor tests to match new versioned code structure 2017-01-06 23:45:03 -05:00
Clayton Coleman
e5019de260
refactor: Move versioned/watch to meta/v1 2017-01-06 23:45:03 -05:00
tianshapjq
1453cd6264 reduce decoding times by changing kubectl.Filter(runtime.Object, *PrintOptions)'s return value 2016-12-16 09:37:11 +08:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
deads2k
61673c4b39 make kubectl get generic with respect to objects 2016-11-04 09:04:57 -04:00
Chao Xu
fd2fdfba89 move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
Clayton Coleman
ca2f1b87ad
Replace negotiation with a new method that can extract info
Alter how runtime.SerializeInfo is represented to simplify negotiation
and reduce the need to allocate during negotiation. Simplify the dynamic
client's logic around negotiating type. Add more tests for media type
handling where necessary.
2016-10-28 11:30:11 -04:00
Angus Salkeld
d58554a647 Move the common test functions from cmd_test.go to cmd/testing/fake.go
This is so that we can use NewAPIFactory() from cmd/set/*test.go
Up until now we would get a import loop error.

This commit also adds a basic unit test case for cmd/set/set_image.go
2016-10-19 08:53:26 +10:00
deads2k
518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
Kubernetes Submit Queue
4b5fd43e24 Merge pull request #30250 from krousey/kctl_dynamic
Automatic merge from submit-queue

Change kubectl create to use dynamic client

https://github.com/kubernetes/kubernetes/issues/16764 https://github.com/kubernetes/kubernetes/issues/3955

This is a series of changes to allow kubectl create to use discovery-based REST mapping and dynamic clients.

cc @kubernetes/sig-api-machinery

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
kubectl will no longer do client-side defaulting on create and replace.
```
2016-08-17 14:48:56 -07:00
Kris
7511412ca6 Make kubectl create use dynamic clients 2016-08-15 22:07:54 -07:00
vefimova
f20c40ed65 Added warning msg for kubectl get
- added warning description regarding terminated objects to `get` long help message
  - added printing of warning message in case of `get pods` if there are hidden pods
Fixes #22986
2016-08-15 22:49:37 +00:00
Seth Jennings
461faae367 allow watching old resources with kubectl 2016-08-02 10:28:04 -05:00
k8s-merge-robot
3b3f7fb09c Merge pull request #27977 from ciwang/move-storage-examples
Automatic merge from submit-queue

Move storage examples

Fixes #23671 

Consolidate storage examples into separate folders for storage and volume plugins
2016-07-08 21:45:38 -07:00
Cindy Wang
fedc513658 Consolidated examples into storage/ and volume/ folders
Search and replace for references to moved examples

Reverted find and replace paths on auto gen docs

Reverting changes to changelog

Fix bugs in test-cmd.sh

Fixed path in examples README

ran update-all successfully

Updated verify-flags exceptions to include renamed files
2016-07-08 13:34:32 -07:00
Wojciech Tyczynski
7403564366 Remove Codec from ContentConfig. 2016-07-08 13:53:09 +02:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Wojciech Tyczynski
5d046fed41 Fix tests for renegotiation 2016-05-12 08:21:11 +02:00
Wojciech Tyczynski
3aadafd411 Use NegotiatedSerializer in client 2016-05-04 10:57:36 +02:00
Amy Unruh
8846b313dc phase 2 of cassandra example overhaul 2016-04-14 21:55:23 -07:00
harry
b0900bf0d4 Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
Avesh Agarwal
be06003e6b Fix kubectl sort-by metadata issue.
Internal types are not supposed to have json metadata (though in kubernetes
they do) as it is true with openshift types. That means sort-by must work
on versioned objects for sorting, otherwise it produces "error: metadata
is not found" error if it sorts internal types without json metadata.

This PR converts internal types objects to versioned objects and sort-by
sorts them correctly without medata error, and then it prints
corresponding internal objects in sorted order.
2016-03-04 16:14:45 -05:00
Kris
e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Clayton Coleman
38c7eded99 Prepare for content-type negotiation
Combine the fields that will be used for content transformation
(content-type, codec, and group version) into a single struct in client,
and then pass that struct into the rest client and request. Set the
content-type when sending requests to the server, and accept the content
type as primary.

Will form the foundation for content-negotiation via the client.
2016-01-26 17:44:30 -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
Fabiano Franz
717896eae3 Fixes get --show-all 2015-12-17 18:35:54 -02:00
deads2k
6e33403abf update CodecFor for GroupVersion 2015-12-15 10:56:00 -05: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
2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
deads2k
66eecb963a update more kubectl bits for groupversion 2015-12-07 09:01:44 -05:00
k8s-merge-robot
4fd6b6df06 Merge pull request #17316 from deads2k/gv-ClientForVersion
Auto commit by PR queue bot
2015-11-24 06:24:28 -08:00
deads2k
a87d927588 update client.Config to use GroupVersion 2015-11-21 08:29:26 -05:00
feihujiang
ad79fa6e84 Move list functions from runtime to meta package 2015-11-20 09:20:55 +08:00
deads2k
303bcad398 use groupversion in RESTMapping 2015-11-16 09:22:11 -05:00
Kris
eacf65ddce Renaming HTTPClientFunc to CreateHTTPClient 2015-11-11 11:54:58 -08:00
Hongchao Deng
056536ff83 component status: nil error should return empty string
If error is nil, it should return empty string instead of \"nil\".
JSON marshalling will omit empty error in such case.
2015-11-05 18:44:28 -08:00
Chao Xu
262825f13d make componenetstatus root scoped 2015-10-16 10:24:31 -07:00
Chao Xu
50a2c4c643 grep-sed 2015-10-12 13:31:45 -07:00
k8s-merge-robot
0fb7c80edf Merge pull request #14888 from JanetKuo/kubectl-get-list
Auto commit by PR queue bot
2015-10-09 00:03:01 -07:00
Paul Morie
227dd82119 Add PodSecurityContext and backward compatibility tests 2015-10-05 21:05:27 -04:00
Janet Kuo
1f35cf2e5b Fix get with List 2015-10-05 11:44:57 -07:00
Kris
f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
Chao Xu
ac5481d089 move client/unversioned/fake.go to its own package 2015-09-11 17:33:54 -07:00
Chao Xu
64bf839e9f refactor tests to use testapi rather than latest directly 2015-09-11 17:32:23 -07:00
Chao Xu
dd6c121d7f massive changes 2015-09-11 17:31:47 -07:00
Chao Xu
9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00