Commit Graph

80 Commits

Author SHA1 Message Date
Mike Dame
cfbf7da75b Make sure --record=false is acknowledged when passed to commands 2016-07-15 11:24:05 -04:00
Clayton Coleman
c077bac341
Implement a RESTMappings method
With the introduction of batch/v1 and batch/v2alpha1, any
MultiRESTMapper that has per groupversion mappers (as a naive discovery
client would create) would end up being unable to call RESTMapping() on
batch.Jobs. As we finish up discovery we will need to be able to choose
prioritized RESTMappings based on the service discovery doc.

This change implements RESTMappings(groupversion) which returns all
possible RESTMappings for that kind.  That allows a higher level call to
prioritize the returned mappings by server or client preferred version.
2016-07-13 21:18:53 -04:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot
81c8fe37e6 Merge pull request #26598 from janetkuo/3rd-party-error-logs
Automatic merge from submit-queue

Add more information when throwing errors in discoverying 3rd party resources

#26425


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-25 09:25:58 -07:00
Mike Metral
6b172657b0 clarify recursive flag description 2016-06-17 08:35:44 -07:00
Janet Kuo
4615d1e24c Add more information when throwing errors in discoverying 3rd party resources 2016-06-01 13:18:50 -07:00
k8s-merge-robot
0a6a52b19d Merge pull request #26597 from caesarxuchao/fix-26425
Automatic merge from submit-queue

retry GetThirdPartyGroupVersions

GetThirdPartyGroupVersions() may return a "NotFound" error if a thirdparty group is deleted in the interim between the group-discovery and the resource-discovery. This is causing e2e flakes in all tests that run kubectl, because test/e2e/thirdparty.go is creating/deleting thirdparty groups.

Fix #26425

The e2e flakes will have the following pattern:
1. the test is calling kubectl
2. error message is `Error from server: the server could not find the requested resource`
3. in the apiserver log, you should see `GET /apis/company.com/v1: (518.944µs) 404 [[kubectl/v1.3.0 (linux/amd64) kubernetes/ae28564] 104.154.110.118:46043]`

For detail see [here](https://github.com/kubernetes/kubernetes/issues/26425#issuecomment-222844523)

cc @janetkuo @brendanburns
2016-06-01 00:02:43 -07:00
Chao Xu
7cea7ccd8d retry GetThirdPartyGroupVersions 2016-05-31 17:14:24 -07:00
Brendan Burns
dac09311b8 Add support for labelling 3rd party objects 2016-05-23 13:13:35 -07:00
Janet Kuo
4332472bde Add 'kubectl set image' 2016-05-18 21:23:17 -07:00
Phillip Wittrock
1a3b133077 Delete unused helpers 2016-04-20 13:49:59 -07:00
k8s-merge-robot
f5c93c8ddc Merge pull request #23472 from wojtek-t/fix_object_meta_for
Automatic merge from submit-queue

Switch from api.ObjectMetaFor to meta.Accessor in most of places

Fix #23278

@smarterclayton @lavalamp
2016-04-02 02:33:40 -07:00
Fabiano Franz
9ddacfa25f Mark filename flags for completions 2016-04-01 16:14:36 -03:00
Brendan Burns
be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
Wojciech Tyczynski
2699be2e7e Switch api.ObjetaMetaFor to meta.Accessor 2016-03-31 17:52:31 +02:00
Mike Metral
7403878ac0 allow kubectl cmd to process dirs recursively
reqs:
    - the kubectl cmd must support the -f | --filename flag
    - the kubectl cmd must support visiting a dir one level deep,
    or using more than one resource
2016-03-28 12:44:21 -07:00
Clayton Coleman
dccf114fdd Display a better error on unauthorized
Not being logged in is a common user error, and the message we display
can be more specific to an end user. Provide a friendly message with the
server message in parethesis (in case this is a more complex server
error).
2016-03-15 12:51:23 -04:00
laushinka
7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
k8s-merge-robot
53d9f9ecab Merge pull request #20814 from deads2k/restmapper-errors
Auto commit by PR queue bot
2016-02-13 15:53:22 -08:00
derekwaynecarr
06f26189f0 Update kubectl create subcommand to use printer flags 2016-02-11 15:37:47 -05:00
deads2k
deb4d3ccca type RESTMapper errors to better handle MultiRESTMapper errors 2016-02-11 11:45:05 -05:00
Janet Kuo
5088d0e147 Record kubectl commands 2016-02-03 10:19:05 -08:00
k8s-merge-robot
9e7a0e2a03 Merge pull request #20053 from smarterclayton/dont_duplicate_prefix
Auto commit by PR queue bot
2016-01-30 04:50:07 -08:00
Clayton Coleman
f9c48c864d Don't add 'error: ' to messages if already there 2016-01-23 00:41:36 -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
Matt Liggett
c6e9ad066e Initial node drain implementation for #3885.
It cordons (marks unschedulable) the given node, and then deletes every
pod on it, optionally using a grace period.  It will not delete pods
managed by neither a ReplicationController nor a DaemonSet without the
use of --force.

Also add cordon/uncordon, which just toggle node schedulability.
2016-01-06 17:28:18 -08:00
k8s-merge-robot
5a579a2555 Merge pull request #16028 from derekwaynecarr/make_cmd
Auto commit by PR queue bot
2015-12-16 08:41:59 -08:00
k8s-merge-robot
3680268c52 Merge pull request #18353 from deads2k/gv-use-constants
Auto commit by PR queue bot
2015-12-15 03:25:09 -08:00
k8s-merge-robot
414ebd2ddb Merge pull request #17991 from krousey/errorstatus
Auto commit by PR queue bot
2015-12-14 20:18:19 -08:00
derekwaynecarr
5e0948586c Add kubectl create [SUBCOMMAND] pattern 2015-12-14 13:43:45 -05:00
deads2k
d0aaf13920 use constants for group names 2015-12-14 10:04:10 -05:00
deads2k
ec87d74ecb update InterfacesFor to use GroupVersion 2015-12-11 13:45:41 -05:00
Kris
ca7c765f0a Remove APIStatus from the client
Everything that used it also depended on pkg/api/errors. It was a
needless abstraction since it was always an *errors.StatusError.
2015-12-10 13:12:21 -08:00
jiangyaoguo
7153ff80ff print absolute time when watch event 2015-12-05 13:52:53 +08:00
Janet Kuo
a6a64820d7 Make generation of the apply annotation optional 2015-11-06 15:08:50 -08:00
k8s-merge-robot
a9534bfd33 Merge pull request #16441 from liggitt/helper_codec
Auto commit by PR queue bot
2015-10-30 11:29:17 -07:00
Clayton Coleman
6f688c3df8 Improve the message for UsageError
Capitalize, also indicate that we have examples
2015-10-28 13:33:37 -04:00
Jordan Liggitt
b58e62e7d4 Pass runtime.Object to Helper.Create/Replace 2015-10-28 12:43:21 -04:00
jackgr
ef3f64612e Add calls to set annotation for kubectl apply 2015-10-07 17:15:56 -07:00
Brendan Burns
afea127a3e Move the default schema cache to the home directory 2015-09-28 16:26:48 -07:00
Clayton Coleman
c2e90cd154 Support extended pod logging options
Increase the supported controls on pod logging. Add validaiton to pod
log options. Ensure the Kubelet is using a consistent, structured way to
process pod log arguments.

Add ?sinceSeconds=<durationInSeconds>, &sinceTime=<RFC3339>, ?timestamps=<bool>,
?tailLines=<number>, and ?limitBytes=<number>
2015-09-21 15:39:32 -04:00
Kris
f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
Chao Xu
dd6c121d7f massive changes 2015-09-11 17:31:47 -07:00
Brendan Burns
9ba13ff361 Address comments 2015-09-11 13:55:16 -07:00
Brendan Burns
d9e1a00a14 Add caching for swagger schemas 2015-09-10 21:18:52 -07:00
Michal Fojtik
fb14c8cdf3 Allow to replace os.Exit() with panic when CLI command fatal error 2015-09-10 09:42:22 +02:00
Janet Kuo
5823ef771b Make --validate default on and shows how to turn if off 2015-08-25 03:18:32 -07:00
Kris Rousey
ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Kris Rousey
565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00