Commit Graph

74 Commits (e5eb6a21b13217d35878003b18bc5c25c8adbda8)

Author SHA1 Message Date
Michail Kargakis c82cae85f6 controller: set unavailableReplicas correctly when scaling down
deployment_controller.go:299] Error syncing deployment
e2e-tests-kubectl-2l7xx/e2e-test-nginx-deployment:
Deployment.extensions "e2e-test-nginx-deployment" is invalid:
status.unavailableReplicas: Invalid value: -1:
must be greater than or equal to 0

The validation error above occurs usually when a Deployment is
scaled down. In such a case we should default unavailableReplicas
to 0 instead of making an invalid api call.
2016-12-07 17:34:09 +01:00
Michail Kargakis b3765c4df9 Backoff correctly when adopting replica sets/pods 2016-12-07 16:13:18 +01: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
Michail Kargakis d87aca66b1 Update deployment status only when there is a new scaling update during a rollout 2016-11-28 13:49:43 +01:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu 7eeb71f698 cmd/kube-controller-manager 2016-11-23 15:53:09 -08:00
Kubernetes Submit Queue b85acd957a Merge pull request #36579 from kargakis/restore-events-for-tests
Automatic merge from submit-queue

Restore event messages for replica sets in the deployment controller

Needed to unblock release upgrade tests (see https://github.com/kubernetes/kubernetes/issues/36453)

@kubernetes/deployment ptal
2016-11-11 15:50:31 -08:00
Michail Kargakis 9afe2c3a7c Do not emit event for AlreadyExists errors 2016-11-11 10:49:05 +01:00
Michail Kargakis 8cd4459b6c Do not handle AlreadyExists errors yet 2016-11-10 15:45:56 +01:00
Michail Kargakis 8ef6fdde72 Restore event messages for replica sets in the deployment controller 2016-11-10 14:34:40 +01:00
Michail Kargakis f52ea8fc67 Update replica annotations every time they are out of sync 2016-11-04 16:29:41 +01:00
Michail Kargakis a5029bf373 controller: support perma-failed deployments
This commit adds support for failing deployments based on a timeout
parameter defined in the spec. If there is no progress for the amount
of time defined as progressDeadlineSeconds then the deployment will be
marked as failed by adding a condition with a ProgressDeadlineExceeded
reason in it. Progress in the context of a deployment means the creation
or adoption of a new replica set, scaling up new pods, and scaling down
old pods.
2016-11-04 13:36:46 +01:00
Michail Kargakis 212a26dc95 controller: set minReadySeconds in deployment's replica sets
* Estimate available pods for a deployment by using minReadySeconds on
the replica set.
* Stop requeueing deployments on pod events, superseded by following the
replica set status.
* Cleanup redundant deployment utilities
2016-10-13 12:27:47 +02:00
Michail Kargakis 89eaa918be controller: save older revisions for Deployment's replica sets 2016-10-07 11:45:06 +02:00
Michail Kargakis ed8b77087a controller: scale proportionally before rolling out new templates 2016-10-06 10:36:39 +02:00
deads2k c30b2efc46 update replicaset lister 2016-10-05 15:20:27 -04:00
deads2k 358a57d74a update deployment lister 2016-10-05 13:27:35 -04:00
Wojciech Tyczynski 331083727f Change podNamespacer API 2016-08-17 16:55:01 +02:00
Michail Kargakis 62afa3de71 controller: update all rs annotations on a scaled rollout
When a new rollout with a different size than the previous size of the
deployment is initiated then only the new replica set will notice the
new size. Old replica sets are not updated by the rollout path.
2016-07-20 22:40:43 +02:00
gmarek 7815a3e7bc DeploymentController doesn't take any actions when being deleted 2016-07-12 09:43:08 +02:00
Michail Kargakis 1fb8dd838b controller: various fixes for the deployment controller
Changes:
* moved waiting for synced caches before starting any work
* refactored worker() to really quit on quit
* changed queue to a ratelimiting queue and added retries on errors
* deep-copy deployments before mutating - we still need to deep-copy
replica sets and pods
2016-07-08 17:30:40 +02:00
Angus Salkeld eec08872c7 Move deployment utilities to there own package 2016-07-08 09:46:56 +02:00
Michail Kargakis 332d151d61 Break deployment controller into separate self-contained files
* rolling.go (has all the logic for rolling deployments)
* recreate.go (has all the logic for recreate deployments)
* sync.go (has all the logic for getting and scaling replica sets)
* rollback.go (has all the logic for rolling back a deployment)
* util.go (contains all the utilities used throughout the controller)

Leave back at deployment_controller.go all the necessary bits for
creating, setting up, and running the controller loop.

Also add package documentation.
2016-07-02 09:53:52 +02:00