Commit Graph

96 Commits (dd7826359c1d958af3d5d323e44b42bfbfdda26f)

Author SHA1 Message Date
AdoHe 0949e08336 fix kubectl rolling update empty file cause panic issue 2016-07-26 02:37:55 -04:00
k8s-merge-robot 2da247ffbc Merge pull request #26977 from joe2far/fix-help-strings
Automatic merge from submit-queue

Make kubectl help strings consistent
2016-07-07 00:12:22 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
joe2far 25b4341dc7 Make kubectl help strings consistent 2016-06-29 12:50:24 +01: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
Clayton Coleman c6961d6fd6
Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several
core paths.
2016-05-21 23:55:42 -04:00
Janet Kuo 4332472bde Add 'kubectl set image' 2016-05-18 21:23:17 -07:00
Jeff Lowdermilk 1baa473ef2 kubectl rolling-update support for same image 2016-04-25 09:20:15 -07:00
Janet Kuo 0335f1c2cd Revert "rolling update will check whether the image is distinct or not, however the image with tag latest should be excluded"
This reverts commit d27a30df29.
2016-04-04 18:36:02 -07:00
Brendan Burns be6c5b332b Add third party support to kubectl 2016-03-31 10:53:32 -07: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
zhouhaibing089 d27a30df29 rolling update will check whether the image is distinct or not, however the image with tag latest should be excluded 2016-03-26 10:56:52 +08:00
nikhiljindal cb8414e247 Resetting maxUnavailable for kubectl rolling update to 0 2016-03-01 18:44:59 -08:00
AdoHe 9cc668f7c6 update commented examples just remove $ 2016-02-29 09:41:09 -05:00
Janet Kuo e7356679bc Fix rolling-update --image nil pointer dereference 2016-02-23 15:07:53 -08:00
deads2k 6d71421ae1 eliminate mixed case from RESTMapper 2016-02-08 15:33:31 -05: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
deads2k 20f9c2c545 find partial resource matches 2015-12-21 09:26:06 -05:00
Abhishek Shah 6f63875165 Reverting 18442 2015-12-17 16:57:29 -08:00
k8s-merge-robot 5c735ee68d Merge pull request #18616 from mqliang/MaxUnavailable
Auto commit by PR queue bot
2015-12-17 08:18:39 -08:00
deads2k 41b78ad2b6 find partial resource matches 2015-12-16 10:19:31 -05:00
mqliang 9d21b6dc85 pkg/set MaxUnavailable as 1 2015-12-12 12:04:11 +08:00
Jeff Lowdermilk e53acfe19c Merge pull request #17111 from munnerz/multi-rolling-update
Allow rolling-update of a single container in multi-container pods
2015-12-11 13:08:13 -08:00
deads2k f764e0099c Update ObjectTyper to GroupVersion 2015-12-07 08:35:05 -05:00
James Munnelly 61306c2a0f Allow rolling-update of a single container in multi-container pods
Accept codec as parameter to CreateNewControllerFromCurrentController function. Add tests for performing a rolling update on a container in a multi-container pod.
2015-12-04 18:38:55 +00: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
Janet Kuo 88d9106705 Add help text for rollback in kubectl rolling-update 2015-11-11 13:29:54 -08:00
Jeff Lowdermilk 5bf993bf28 Validate image name for `kubectl rolling-update NAME --image=IMAGE`
Require distinct image from current one when starting a new
rolling-update, and exit with error if an existing in-progress update
is targeting a different image.
2015-10-21 11:48:39 -07:00
wulonghui cbd10dbf36 Update rollback process 2015-10-08 10:49:09 +08:00
Dan Mace 6db9601772 Support asymmetric rolling rollbacks
Improve the rolling updater rollback/abort function by making it aware
of the original replicas annotation: if the rollback target has the
original replica count recorded, prefer it over the desired annotation
since the update from old to new could have been asymmetrical.

For example, when scaling from 5 to 10, aborting should scale back to 5.
2015-09-29 09:00:02 -04: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
hurf 65bfd3541f Make -o option working for rolling-update
Use simple message to show the result. If -o is specified, print
updated rc.
2015-09-03 20:29:58 +08:00
k8s-merge-robot 0a062c5b24 Merge pull request #11942 from ironcladlou/rolling-update-availability
Auto commit by PR queue bot
2015-09-01 16:51:13 -07:00
Dan Mace da5e4d7bd5 Rolling updater availability enhancements
Enhance the rolling updater to support maintaining minimum pod
availability for the duration of the update process.
2015-09-01 12:54:08 -04:00
deads2k f1b81ff678 bind filenames var instead of looking up 2015-09-01 08:35:57 -04:00
Janet Kuo 5823ef771b Make --validate default on and shows how to turn if off 2015-08-25 03:18:32 -07:00
Peeyush Agarwal 05e069d038 Use bash comments in kubectl examples
Comments in kubectl examples should use bash comments, not Go comments.
So, replaces // by # for example strings.
2015-08-12 19:56:23 +00:00
Eric Paris 9de64328a5 Bash completion annotations for rollingupdates 2015-08-10 10:26:18 -04:00
Eric Paris 7cbb52ce04 Use the pflag StringSlice instead of implementing it ourselves
Saves code and makes our code easier to read because we just use normal
[]string instead of custom type.
2015-08-06 19:16:13 -04:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Mike Danese ae1c8e55ef Merge pull request #11737 from thockin/cleanup-remove-v1beta3
Remove v1beta3
2015-07-24 10:25:56 -07:00
Dan Mace d044208b38 Rolling updater enhancements
Add an UpdateAcceptor interface to the rolling updater which supports
injecting code to validate the first replica during scale-up. If the
replica is not accepted, the deployment fails. This facilitates canary
checking so that many broken replicas aren't rolled out during an update.

Make the rolling update scale amount configurable as a percent of the replica
count; a negative value changes the scale direction to down/up to support
in-place deployments.
2015-07-24 08:53:50 -04:00
Tim Hockin 1c3233a1d4 Remove v1beta3 2015-07-23 17:21:27 -07:00
Eric Tune 2e848ed707 Merge pull request #10585 from caesarxuchao/fix-alias
Add boundary check before accessing os.Args[1]
2015-07-15 15:00:09 -07:00
Chao Xu 48679d21d2 add boundary check before access os.Args 2015-07-09 16:15:42 -07:00