Commit Graph

73 Commits

Author SHA1 Message Date
David Eads
dd2af1c8a4 snip legacy scheme uses we don't need 2018-08-02 14:17:17 -04:00
juanvallejo
d1603c9560 move PrintOptions to genericclioptions 2018-05-21 14:59:41 -04:00
David Eads
420dd9bf66 move type setting into an optional layer above normal printing 2018-05-17 17:22:12 -04:00
juanvallejo
40e52bf07d remove legacyscheme dep from printFlags 2018-05-10 14:51:12 -04:00
David Eads
c5445d3c56 simplify api registration 2018-05-08 18:33:50 -04:00
David Eads
94e3d94d67 update tests to be specific about the versions they are testing instead of floating 2018-05-01 13:18:41 -04:00
David Eads
1cb797e355 acknowledge that creation of a restmapper can fail and that we cannot have a default 2018-05-01 07:52:51 -04:00
David Eads
5432ef5c45 divide statically known typer from dynamically derive restmapper 2018-04-27 11:15:05 -04:00
David Eads
a89291a5de stop duplicating preferred version order 2018-04-26 10:03:36 -04:00
juanvallejo
ac6ca38dd7 report outputFormat in PrintFlags err 2018-04-25 16:35:56 -04:00
juanvallejo
27bd4ded04 wire printflags through additional cmds 2018-04-25 16:07:32 -04:00
Mike Danese
f427531179 boring 2018-04-18 09:55:57 -07:00
juanvallejo
8d35f94d51
use temp kubeconfig for fake factory 2018-03-09 15:53:19 -05:00
David Eads
6047ead2e5 simplify kubectl testing factory 2018-02-23 08:02:53 -05:00
David Eads
d8a5420b7c remove unneeded factory codec methods 2018-02-21 15:20:20 -05:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
linweibin
fa8afc1d39 Remove unused code in UT files in pkg/ 2018-01-15 16:02:35 +08:00
juanvallejo
d4e17cb7b4
Allow oadm drain to continue w ds-managed pods w local storage 2018-01-08 11:51:15 -05:00
juanvallejo
701d6536a2
move cmd/util/printing.go#PrintSuccess to factory_builder.go 2017-11-15 10:46:39 -05:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Jun Xiang Tee
efbfead4ef remove created-by annotation 2017-10-30 12:49:44 -07:00
Ferran Rodenas
c1802dc472 Update kubectl drain command to use policy V1Beta1 instead of unversioned API
Signed-off-by: Ferran Rodenas <frodenas@gmail.com>
2017-10-25 16:44:57 +02:00
Solly Ross
eac2049fc9 [client-go] avoid Registry in fake REST client
Previously, the fake RESTClient in client-go required a Registry.  It
used the Registry to fetch the GroupVersion for the fake client.
However, the way it did so was dubious in some cases (it hard-coded the
default API group in places), and not strictly necssary.

This updates the fake client to just recieve the GroupVersion and
internal group name directly, instead of requiring a Registry, so that
it can be consumed in unit tests where a Registry isn't necessarily
readily available (e.g. elsewhere in client-go).
2017-10-19 11:01:44 -04:00
Dr. Stefan Schimanski
7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Dr. Stefan Schimanski
c0dbe9a900 kubectl: simplify deepcopy calls 2017-08-16 10:58:51 +02:00
ravisantoshgudimetla
db120eb8ca Changes for converting node to v1 in drain 2017-07-12 21:36:29 -04:00
Jun Xiang Tee
d76b08d154 deprecate created-by annotation for pod drain 2017-06-16 13:33:26 -07:00
Chao Xu
d9920c53a5 move ref.go to its own subpackage 2017-04-13 10:02:43 -07:00
Kubernetes Submit Queue
eaf3c47489 Merge pull request #42115 from justinsb/kubectl_expose_drainoptions
Automatic merge from submit-queue (batch tested with PRs 42162, 41973, 42015, 42115, 41923)

kubectl drain: make code reusable

DrainOptions requires a few fields to be set, and the expectation is
that these are set as part of construction of the object.  If they are
set, then the drain code can be reused in other kubernetes projects.

This does not create a contract that DrainOptions should fulfill going
forwards, any more than any of the other types that happen to be exposed
are part of the contract.  Instead, this merely makes use outside the
package possible.

```release-note
NONE
```
2017-02-28 22:06:03 -08:00
Justin Santa Barbara
72afd143c4 kubectl drain: make code reusable
DrainOptions requires a few fields to be set, and the expectation is
that these are set as part of construction of the object.  If they are
set, then the drain code can be reused in other kubernetes projects.

This does not create a contract that DrainOptions should fulfill going
forwards, any more than any of the other types that happen to be exposed
are part of the contract.  Instead, this merely makes use outside the
package possible.
2017-02-26 00:48:48 -05:00
Maru Newby
92d739bebc kubectl: Allow 'drain --force' to remove orphaned pods 2017-02-22 06:59:33 -08:00
deads2k
8a12000402 move client/record 2017-01-31 19:14:13 -05:00
deads2k
502bfdf944 client/restclient/fake move to client-go 2017-01-25 08:29:48 -05:00
Clayton Coleman
9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k
77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Maciej Szulik
9f064c57ce Remove extensions/v1beta1 Job 2016-12-17 00:07:24 +01:00
Jordan Liggitt
6819706adf
Pass addressable values to DeepCopy 2016-12-08 14:16:01 -05:00
tanshanshan
c76cd49da1 remove redundant condition 2016-12-07 08:39:40 +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
ymqytw
b358b2df02 make drain retry forever and use new timeout 2016-11-29 14:23:40 -08:00
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
ymqytw
b73fae6c55 Fix kubectl drain for statefulset and use eviciton for drain if possible 2016-11-07 16:13:06 -08:00
Kubernetes Submit Queue
1ff0b422a8 Merge pull request #35664 from ymqytw/update_drain_test
Automatic merge from submit-queue

Update drain test

Update how int convert to string in the kubectl drain test.
It is safer to use `strconv.Itoa()` than `string()`.
2016-10-30 04:30:18 -07:00
Chao Xu
fd2fdfba89 move client/unversioned/fake to client/restclient/fake 2016-10-29 14:22:02 -07:00
ymqytw
08d4d8dba5 Update drain test 2016-10-26 19:17:05 -07:00
ymqytw
8a2610c6fb fix drain test flake 2016-10-24 09:32:49 -07:00
Kubernetes Submit Queue
ad9ee6a50c Merge pull request #34778 from ymqytw/safe_kubectl_drain
Automatic merge from submit-queue

wait until the pods are deleted completely

Drain the pods on a node safely by keeping polling until all pods has been deleted.

```release-note
kubectl drain now waits until pods have been delete from the Node before exiting
```

Fixes: #34782
2016-10-20 04:45:45 -07:00
ymqytw
e8fd8d50a5 address comments 2016-10-19 17:09:11 -07:00