Commit Graph

180 Commits (13de114286ec738e8ed46b112a934399f61b61e4)

Author SHA1 Message Date
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
Brendan Burns 4123a61df7 Add the client side bits of kubectl export 2015-12-22 10:41:59 -08:00
Michail Kargakis 71934b7643 kubectl: Validate flag usage against generators
This commit moves the generators into separate buckets and creates
separate calls for each one group. This helps in providing just the
necessary generators to each generator command.

Validation of flags against generators is also added so that flags
that are not meant to be used with a specific generator will result
in error.
2015-12-18 15:09:53 +01: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 e309583ff1 Merge pull request #18473 from smarterclayton/change_runtime_object
Auto commit by PR queue bot
2015-12-16 04:24:22 -08:00
Clayton Coleman 8f203a28f1 Change runtime.Object signature 2015-12-15 13:36:25 -05:00
deads2k 6e33403abf update CodecFor for GroupVersion 2015-12-15 10:56:00 -05:00
derekwaynecarr 5e0948586c Add kubectl create [SUBCOMMAND] pattern 2015-12-14 13:43:45 -05:00
deads2k ec87d74ecb update InterfacesFor to use GroupVersion 2015-12-11 13:45:41 -05:00
k8s-merge-robot 637a33924c Merge pull request #18004 from jiangyaoguo/print-absolute-time-when-watch-event
Auto commit by PR queue bot
2015-12-08 22:58:12 -08:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
deads2k f764e0099c Update ObjectTyper to GroupVersion 2015-12-07 08:35:05 -05:00
jiangyaoguo 7153ff80ff print absolute time when watch event 2015-12-05 13:52:53 +08:00
deads2k ed95a6d77f update scheme to use GroupVersion 2015-11-25 12:15:48 -05:00
deads2k e0b7f52633 hack up queryToObject to continue to work as it used to 2015-11-25 12:14:06 -05:00
deads2k c40dd0335a make DefaultRESTMapper methods type correct 2015-11-24 14:17:37 -05:00
k8s-merge-robot 125ab2cad1 Merge pull request #17232 from deads2k/gv-restmapping-2
Auto commit by PR queue bot
2015-11-17 03:33:24 -08:00
Tim Hockin ba383bcfeb Refactor IntOrString into a new pkg
pkg/util/intstr is a cleaner encapsulation for this type and supporting
functions.  No behavioral change.
2015-11-16 10:57:52 -08:00
deads2k 303bcad398 use groupversion in RESTMapping 2015-11-16 09:22:11 -05:00
kargakis 4fdb6d1331 logs: Use resource builder 2015-11-05 14:54:55 +01:00
kargakis 7d0e691520 expose: Enable exposing multiport objects
The generated service will inherit all the ports from the exposed object.
2015-10-19 11:25:14 +02:00
kargakis 083c5bebbd expose: --dry-run should dump the object
Also make some tests use --dry-run and compare generated objects
against expected
2015-10-10 16:15:17 +02: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
feihujiang 98689a99ec Limit the type for kubectl expose command 2015-09-15 11:17:04 +08:00
Jeff Lowdermilk 0898ce852d Merge pull request #13756 from kargakis/make-external-svcs-exposable
expose: Avoid selector resolution if a selector is not needed
2015-09-14 16:01:55 -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
Brendan Burns 9ba13ff361 Address comments 2015-09-11 13:55:16 -07:00
kargakis a49230e736 Test for exposable services 2015-09-11 15:30:17 +02:00
Brendan Burns d9e1a00a14 Add caching for swagger schemas 2015-09-10 21:18:52 -07:00
Chao Xu 9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Janet Kuo b673920ccf Get printer from factory to retrieve handled resources 2015-09-01 10:20:51 -07:00
Janet Kuo 5823ef771b Make --validate default on and shows how to turn if off 2015-08-25 03:18:32 -07:00
Janet Kuo 44a7a52a94 Hide failed/succeeded pods in 'kubectl get pods' by default 2015-08-18 13:47:19 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Muhammed Uluyol fab367230f Add experimental API support to kubectl 2015-08-11 16:49:55 -07:00
Kris Rousey 565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
Brendan Burns 79fb674679 Fix the service printer to be a single line per service 2015-08-10 10:57:45 -07:00
Veres Lajos 9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
hurf e450c3b771 Add age column for all resources when using kubect get
Dispaly human readable creation time like age column do in `kubectl
get po` for all resources.
2015-08-07 21:18:30 +08:00
Brendan Burns 9ac50b4980 Add interactive run that combines run and attach. 2015-08-06 20:20:14 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Muhammed Uluyol 58a875ac2c Add (stopgap) support for an experimental API prefix. 2015-07-30 18:14:29 -07:00
nikhiljindal 496f30a92f Introduce a new service generator that leaves service port unnamed 2015-07-16 20:40:40 -07:00
Joe Beda c15953662e Fix up alignment of columns w/ namespaces.
Fixes #10842

All issues for types that use "extra lines" for extended information.  Two issues fixed: (1) When namespaces are listed an extra column isn't inserted for extra lines and (2) trailing tabs aren't inserted when label columns are specified.

This code should probably move to a more explicit model of putting data into "cells".

The test for this hits https://github.com/golang/go/issues/6416 and so I introduced a "LineDelimiter" writer filter to make white space more visible.
2015-07-09 08:59:32 -07:00
Janet Kuo 524e70d501 Make "age" of pod print example static 2015-07-08 11:26:13 -07:00
Yu-Ju Hong 4d86127098 Merge pull request #10644 from erictune/noslash
NAMESPACE in own column: kubectl --all-namespaces
2015-07-06 11:40:02 -07:00
Yu-Ju Hong 04018f9ca2 Merge pull request #10619 from andronat/rename_REASON
Rename REASON column to STATUS for kubectl get
2015-07-06 11:39:16 -07:00
Eric Tune 88fa471d06 NAMESPACE in own column: kubectl --all-namespaces 2015-07-02 22:23:52 -07:00
Zach Loafman 5dbe90f0ba Merge pull request #10493 from krousey/namespace
Unify command line namespace resolution
2015-07-01 19:33:44 -07:00
Kris Rousey ffa764d60b Unify command line namespace resolution
This change allows the namespace in kubeconfig to be overridden by
specifying the namespace in the spec file. If namespace is explicitly
provided in the command line flags and the spec file has a different
namespace, this will cause an error.
2015-07-01 12:59:17 -07:00
Anastasis Andronidis 7480077f2b Rename REASON column to STATUS for kubectl get
Fixes #10560
2015-07-01 17:38:27 +02:00
Janet Kuo 682734bcc7 Implement 'kubectl get ... -o wide' 2015-06-30 14:06:47 -07:00
Anastasis Andronidis b06ef70057 Print resource labels as columns 2015-06-22 00:44:51 +02:00
Jeff Lowdermilk f31191224b kubectl negotiates apiversion to use based on client,server supported 2015-06-16 10:12:39 -07:00
Chao Xu e6ffa5bf67 make the meaning of a test in get_test.go clearer 2015-06-05 13:59:30 -07:00
Anastasis Andronidis d4a47bdb9e rename run-container to run in kubectl 2015-05-27 19:07:17 +02:00
Anastasis Andronidis 5eae2378d6 Warn for every _ flag user or cmd defined
also renames all global _ flags to -
2015-05-27 11:23:52 +02:00
Masahiro Sano 8ce64ec69e add --all-namespaces flag to request across all namespaces 2015-05-22 23:25:12 +09:00
kargakis 93dc839b19 Load input object for increased safety 2015-05-08 03:17:54 +02: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
nikhiljindal dcc368c781 Removing more references to v1beta1 from pkg/ 2015-04-24 00:45:17 -07:00
nikhiljindal 1e323d77bc Updating the guestbook example to v1beta3 2015-04-23 14:34:36 -07:00
Clayton Coleman 545a5a865f List output with differing types should be more resilient
kubectl get can output a series of objects as a List in versioned
form, but not all API objects are available in the same schema.
Make the act of converting a []runtime.Object to api.List more
robust and add a test to verify its behavior in Get.

Makes it easier for client code to output unified objects.
2015-04-20 14:44:16 -04:00
Fabio Yeon 951a125751 Add "componentstatus" to API for easier cluster health check. 2015-04-17 11:58:23 -07:00
deads2k 6344cf3c3a refactor to move kubectl.cmd.Factory to kubect/cmd/util 2015-04-07 14:43:50 -04:00
Sam Ghods f8d8b09a0a Reduce some tab spacing in kubectl 2015-03-27 18:05:20 -07:00
Clayton Coleman 68c46e7f52 `kubectl label` should support resource builder
Allow applying labels to all resources, by existing selector, and
soon allow multiple selection.
2015-03-26 14:01:05 -04:00
Tamer Tas b39e31d8a3 Remove cmd from kubectl/cmd/factory 2015-03-18 14:23:14 +02:00
Jeff Lowdermilk d46ae5d841 Refactor kubectl/cmd helpers into pkg/kubectl/cmd/util
Allows helpers to be used by config commands.
2015-02-05 09:39:42 -08:00
derekwaynecarr 4c33e36a88 Plumb restmapper properly through apiserver and tests 2015-02-02 10:26:19 -05:00
Jeff Lowdermilk 93ef8b8bcb Make kubectl factory build clients for version
Fix ClientConfigForVersion to actually use provided version.
2015-01-29 17:04:14 -08:00
deads2k dd01137138 add namespace to kubeconfig file 2015-01-20 16:07:54 -05:00
Clayton Coleman a3ff55e478 Allow delete to work from directories, files, multiple resources
Simple refactoring reusing the resource builder changes.
2015-01-09 13:31:24 -05:00
Clayton Coleman bc86b31a8b Remove createall now that create supports directories and sources 2015-01-09 13:30:31 -05:00
Clayton Coleman d1ab27762b Create should be able to accept multiple resources 2015-01-09 13:30:31 -05:00
Clayton Coleman 2151afe334 Allow kubectl get to fetch multiple resource types
Like Delete, which can now run over multiple types:

    kubectl delete pods,services -l name=foo

Get should be able to span items for label selection

    kubectl get pods,services -l name=foo
2015-01-09 13:30:14 -05:00
Clayton Coleman 8a4f225941 Make expandResourceShortcuts part of RESTMapper on client 2015-01-09 11:59:11 -05:00
Clayton Coleman 487e5cd061 Make GetPrinter take the necessary conversion arguments
This fully encapsulates decisions about conversion within GetPrinter,
which prevents users from accidentally not converting.
2014-11-18 21:14:39 -05:00