Commit Graph

44 Commits

Author SHA1 Message Date
Clayton Coleman
be6d2933df
refactor: Move *Options references to metav1 2017-01-24 13:41:51 -05:00
Clayton Coleman
469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
deads2k
ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k
11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -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
Wojciech Tyczynski
e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01: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
ymqytw
b8fbf68759 update kubectl drain doc 2016-11-22 15:34:58 -08:00
Kubernetes Submit Queue
4b5667e177 Merge pull request #36211 from brendandburns/cordon
Automatic merge from submit-queue

Add retry to node scheduability marking.

Fixes https://github.com/kubernetes/kubernetes/issues/32391

@justinsb @janetkuo @kubernetes/sig-cli
2016-11-08 16:05:53 -08:00
ymqytw
b73fae6c55 Fix kubectl drain for statefulset and use eviciton for drain if possible 2016-11-07 16:13:06 -08:00
Brendan Burns
55f031e167 Add retry to node scheduability marking. 2016-11-06 08:28:36 -08:00
ymqytw
8a2610c6fb fix drain test flake 2016-10-24 09:32:49 -07:00
ymqytw
55c6116d66 address comments and add tests 2016-10-18 22:55:15 -07:00
ymqytw
7922a2a105 wait until the pods are deleted completely 2016-10-18 16:01:51 -07:00
Fabiano Franz
f6d1ac72a0 Use our own normalizers for cmd examples and descriptions 2016-10-17 11:49:55 -02:00
AdoHe
b2280a646a update various commands to adapt the new Factory interface 2016-10-13 21:01:14 +08:00
Kubernetes Submit Queue
cbbf22a7d2 Merge pull request #33154 from krmayankk/drain
Automatic merge from submit-queue

fix kubectl drain help to be consistent with documentation

fix kubectl drain usage to be consistent with documentation at https://github.com/kubernetes/kubernetes.github.io/blob/master/docs/user-guide/kubectl/kubectl_drain.md

It would be ideal if both could be sourced from a single file though
2016-09-28 04:55:09 -07:00
Kubernetes Submit Queue
563919c3ec Merge pull request #31763 from fraenkel/drain_finished
Automatic merge from submit-queue

Finished pods can be drained

fixes #26080



```release-note
Kubectl drain will now drain finished Pods
```
2016-09-27 20:30:54 -07:00
Kubernetes Submit Queue
ea688f5e44 Merge pull request #31276 from juanvallejo/jvallejo_update-dry-run-create
Automatic merge from submit-queue

Update kubectl create message when using --dry-run

`kubectl create <resource> <name> --dry-run` provides a misleading success
message.

When commands such as `kubectl new-app node` are run with a
`--dry-run` flag, they make this clear by appending a "(DRY RUN)"
string to the final output. `kubectl create <resource>  <name> --dry-run`
does not do this, providing a potentially misleading output.

This patch appends a "(DRY RUN)" string to the end of a successful
message of `kubectl create` subcommands that support the `--dry-run` flag.

`kubectl create quota quota --dry-run`
```
resourcequota "quota" created
```

`kubectl create quota quota --dry-run`
```
resourcequota "quota" created (DRY RUN)
```

**Release note**:
```release-note
release-note-none
```
2016-09-26 16:01:17 -07:00
Mayank Kumar
822b2d791c fix drain help and make consistent with doc 2016-09-20 21:42:01 -07:00
deads2k
862415aaa2 make --include-extended-apis deprecated and remove plumbing 2016-09-16 16:05:52 -04:00
juanvallejo
52fc8efa55 update PrintSuccess message when using --dry-run 2016-09-15 10:11:21 -04:00
deads2k
9d43f7e52c convert more command to use a generated clientset 2016-09-12 07:38:34 -04:00
Michael Fraenkel
9cff11dbb0 Finished pods can be drained
- Don't bother trying to filter pods that have succeeded or failed
2016-08-31 08:30:30 -04:00
k8s-merge-robot
739e3dd1b1 Merge pull request #26237 from duglin/UseConstant
Automatic merge from submit-queue

Use `CreatedByAnnotation` constant

A nit but didn't want the strings to get out of sync.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-07-01 16:55:39 -07:00
Doug Davis
930332751b Use CreatedByAnnotation contant
A nit but didn't want the strings to get out of sync.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-06-30 10:12:26 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Andrey Kurilin
21b218ce4f Add link to diagram of kubectl drain
issue kubernetes/kubernetes.github.io#501
2016-06-29 19:10:01 +03:00
Michael Rubin
760b04e294 Use dedent for the kubectl commands
The one side effect is that for the "kubectl help" commands a newline
is prepended to output, which will alter the yaml output.

Here we use dedent to format the code to match the output.

hack/update-generated-docs.sh has been run and the affected files have
been added.

Note: for describe.go we added a period to the end of an output message.
2016-06-26 22:51:14 -07:00
Matt Liggett
d09af4a1d6 Stop 'drain' deleting pods with local storage.
Unless forced with --delete-local-data.  Also a refactoring of the
kubectl drain logic that selects/rejects pods and produces error/warning
messages.
2016-06-08 14:59:03 -07:00
Marcin Wielgus
60f1339138 Small refactoring around drain - move drain logic to separate function. 2016-05-04 10:43:20 +02:00
Marcin Wielgus
41dde20410 Make DrainOptions.getPodsForDeletion public to be reused in ClusterAutoscaler 2016-04-27 11:47:34 +02:00
Marc Lough
fdf409861a Drain pods created from ReplicaSets 2016-04-15 08:51:40 +01:00
Brendan Burns
be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07:00
Tim Hockin
1e5ce735fc Fix typo in help for kubectl drain 2016-03-19 20:42:51 -07:00
AdoHe
9cc668f7c6 update commented examples just remove $ 2016-02-29 09:41:09 -05:00
Eric Tune
175addf2a3 Implemented Batch client 2016-02-19 09:20:56 -08:00
Matt Liggett
f2d5375bc0 Stop deleting DaemonSet pods during drain.
We do this because they will be recreated immediately by the
DaemonSet Controller.  In addition, we also require a specific flag
(--ignore-daemonsets) when there are DaemonSet pods on the node.
2016-02-02 11:13:29 -08:00
Matt Liggett
d4b02466b7 Add support for Job-managed pods to drain. 2016-01-28 13:23:12 -08: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
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