Commit Graph

51 Commits (ec6181d5d3cae2238d485ee75332ab9c09b619d9)

Author SHA1 Message Date
k8s-merge-robot 3166f9316f Merge pull request #28111 from mfojtik/min-ready-seconds
Automatic merge from submit-queue

Add MinReadySeconds to rolling updater

Add MinReadySeconds support to RollingUpdater that allows to specify the number of seconds to wait on top of the pod is "ready" because its readiness probe passed.
2016-07-01 19:21:16 -07:00
Michal Fojtik 7ea28e42c0 Add MinReadySeconds to rolling updater 2016-06-30 13:13:08 +02:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Janet Kuo ee81e5ebfa Retry Pod/RC updates in kubectl rolling-update 2016-06-21 16:08:10 -07:00
Clayton Coleman 5d40f94feb
Rolling updater should allow progress to be logged / detected
Allows callers to terminate early as well as print useful messages
during the rollout. Use a crude percentage metric for summarization.
2016-05-14 22:54:02 -04:00
k8s-merge-robot 1642083e60 Merge pull request #24645 from jlowdermilk/rolling-update
Automatic merge from submit-queue

kubectl rolling-update support for same image

Fixes #23497.

Enables `kubectl rolling-update --image` to the same image, adding a `--image-pull-policy` flag to remove ambiguity. This allows rolling-update to behave as an "update and/or restart" (https://github.com/kubernetes/kubernetes/issues/23497#issuecomment-212349730), or as a forced update when the same tag can mean multiple versions (e.g. `:latest`). cc @janetkuo @nikhiljindal
2016-05-04 07:24:22 -07:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Jeff Lowdermilk 1baa473ef2 kubectl rolling-update support for same image 2016-04-25 09:20:15 -07:00
Michail Kargakis 77097d9a20 kubectl: set maxUnavailable to 1 if both fenceposts resolve to zero
Due to rounding down for maxUnavailable, we may end up with rolling updates
that have zero surge and unavailable pods something that 1) is not allowed
as per validation, 2) blocks updates. If we end up in such a situation
set maxUnavailable to 1 on the theory that surge might not work due to
quota.
2016-03-07 13:03:41 +01:00
Michail Kargakis b390087a99 kubectl: bring the rolling updater on par with the deployments
During a rolling update for Deployments, the total count of surge pods
is calculated by adding the desired number of pods (deployment.Spec.Replicas)
to maxSurge. During a kubectl rolling update, the total count of surge
pods is calculated by adding the original number of pods (oldRc.Spec.Replicas
via an annotation) to maxSurge. This commit changes this to use desired
replicas.
2016-03-04 18:07:09 +01:00
kargakis 9cc19102f3 kubectl: preserve availability when maxUnavailability is not 100% 2016-02-25 10:10:41 +01:00
Michail Kargakis 35fab99af7 kubectl: scale down based on ready during rolling updates 2016-02-19 15:42:04 +01:00
mqliang 7be9071584 create some integer min/max function 2016-02-12 11:20:11 +08:00
Janet Kuo a50267ab3e Fix mismatched types 2016-02-09 18:57:53 -08:00
Dan Mace eb778217ad Support rolling update to 0 desired replicas
Support a desired replica count of 0 for the new RC. Users sometimes
want to roll out a new "inactive" template with the intent of scaling
it up manually later.
2016-01-20 09:21:13 -05:00
deads2k 9fda7f1812 update StatusDetails to handle Groups 2015-12-17 09:14:12 -05:00
Jeff Lowdermilk 6adf227879 Merge pull request #18583 from jsravn/fix-rolling-update-rollback
Fix rolling-update rollback from an unavailable rc
2015-12-16 14:26:55 -08:00
James Ravn e5a558c35f Fix rolling-update rollback from an unavailable rc
Rolling back from a broken update with only one replica fails with a
timeout in the existing code.

The problem is the scale down logic does not consider unavailable
replicas in the old replication controller when calculating how much to
scale down by. This leads to an obvious problem with a single replica
when min unavailable is 1.

The fix is to allow scaling down all unavailable replicas in the old
controller, while still maintaining the min unavailable invariant.
2015-12-14 19:35:08 +00:00
Wojciech Tyczynski 960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01: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
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
Wojciech Tyczynski 6dcb689d4e Simplify List() signature in clients. 2015-12-03 09:54:07 +01:00
Wojciech Tyczynski 8343c8ce6c Pass ListOptions to List() methods. 2015-12-01 15:00:36 +01:00
deads2k 1ac6d8afd3 update reaper, scaler, describer for GroupKind 2015-11-30 09:22:39 -05:00
Clayton Coleman 1d592e4c28 Unversioned types should not use ambiguous go-int
All external types that are not int64 are now marked as int32,
including
IntOrString. Prober is now int32 (43 years should be enough of an initial
probe time for anyone).

Did not change the metadata fields for now.
2015-11-26 11:45:25 -05: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
Wojciech Tyczynski 647aa1bc8c Unify per-resource List for unversioned client 2015-10-14 08:37:57 +02:00
k8s-merge-robot 888f08377e Merge pull request #14671 from ironcladlou/rolling-rollback-fix
Auto commit by PR queue bot
2015-09-30 20:56:05 -07: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
nikhiljindal c651c1ae30 Updating the semantics of MaxSurge and unavailability 2015-09-28 14:51:26 -07:00
Maciej Szulik 48775319d9 Reaper and scaler for jobs 2015-09-23 13:06:34 +02:00
Clayton Coleman bf2decce81 Add NotReadyAddresses to Endpoints
In many cases clients may wish to view not ready addresses for endpoints
in order to do set membership prior to a pod being ready. For instance,
a pod that uses the service endpoints to connect to other pods under
the same service, but does not want to signal ready before it has
contacted at least a minimal number of other pods.

This is backwards compatible with old servers and clients. There is
an additional cost in size of endpoints before services ramp up, which
will add minor CPU and memory use for services that have a significant
number of pods which have not become ready.
2015-09-17 09:41:56 -04:00
Janet Kuo c9beb5b39c Fix the bug that rolling-update throws error when using generateName 2015-09-02 13:30:14 -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
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
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Alex Mohr 37418afe8f Fix kubectl updateWithRetries to have 1 minute timeout instead of 500 ms
Fixes #12258
2015-08-05 01:18:17 -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
Anastasis Andronidis 9e3a540940 rename resize to scale 2015-05-27 19:08:06 +02:00
Shawn Smith 555ff0d1bc Use Fprintf 2015-05-10 13:14:05 +09:00
Brendan Burns 63cbc715dd Support recovery from in the middle of a rename. 2015-05-07 10:39:15 -07:00
Brendan Burns c9e33e197d Add support for --rollback. 2015-05-06 10:21:35 -07: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
Brendan Burns 83cbd0cf4c Add recovery for anonymous rollouts. 2015-04-29 16:53:30 -07:00
Brendan Burns 591d98b6b2 Add replication controller renaming as a cleanup option. 2015-04-27 20:38:20 -07:00
Dan Mace 093b7c2e25 Add cleanup policy to RollingUpdater
* Support configurable cleanup policies in RollingUpdater. Downstream
library consumers don't necessarily have the same rules for post
deployment cleanup; making the behavior policy driven is more flexible.

* Refactor RollingUpdater to accept a config object during Update instead
of a long argument list.

* Add test coverage for cleanup policy.
2015-04-21 10:51:38 -04:00
Dan Mace bd7b719944 Make default impls private 2015-04-15 16:50:08 -04:00
Dan Mace 312ccad3c1 Use narrowly scoped interfaces for client access
Use custom narrowly scoped interfaces for client access from the
RollingUpdater and Resizer. This allows for more flexible downstream
integration and unit testing without imposing a burden to implement
the entire client.Interface for just a handful of methods.
2015-04-15 14:28:59 -04:00
Quinton Hoole 40e2eae5b4 Retry replication controller rolling updates on version mismatch.
When kubectl does rolling updates of replication controllers, retry updates that
fail due to version mismatches (caused by concurrent updates by other clients).
These failed rolling updates were causing intermittent e2e test failures
(e.g. issue 5821)
2015-04-02 17:53:34 -07:00