Commit Graph

445 Commits (12a6236148e724430a7b50af0f66c9690bd33628)

Author SHA1 Message Date
ymqytw 7500b55ce4 move retry to client-go 2017-08-14 14:16:26 -07:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Kubernetes Submit Queue 3e8a25e818 Merge pull request #50008 from atlassian/meta-controller-ref
Automatic merge from submit-queue

Migrate to controller references helpers in meta/v1

**What this PR does / why we need it**:
This is a follow up for #48319 that migrates all method usages to new methods in meta/v1.

**Special notes for your reviewer**:
Looking at each commit individually might be easier.

**Release note**:
```release-note
NONE
```
/sig api-machinery
/kind cleanup
2017-08-10 17:07:30 -07:00
Kubernetes Submit Queue 6aeb790582 Merge pull request #49830 from jianglingxia/jlx72916
Automatic merge from submit-queue (batch tested with PRs 50418, 49830, 49206, 49061, 49912)

Renamed packge name to apiv1

**What this PR does / why we need it**:
Renamed packge name from k8s_api_v1 to apiv1
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-08-09 22:07:15 -07:00
Dr. Stefan Schimanski 83895daed1 Fix printer hack to get a versioned client 2017-08-06 15:30:13 +02:00
Mikhail Mazurskiy 32b78aebf2
Migrate to IsControlledBy from meta/v1 package 2017-08-06 22:43:46 +10:00
Mikhail Mazurskiy 042b5642b9
Migrate to NewControllerRef from meta/v1 package 2017-08-06 22:43:46 +10:00
Mikhail Mazurskiy b28a83a4cf
Migrate to GetControllerOf from meta/v1 package 2017-08-06 22:41:58 +10:00
Michail Kargakis 55339f30ac
Remove failure check from deployment controller
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-08-03 18:49:16 +02:00
jianglingxia 9e8d4b4188 Renamed packge name to apiv1 2017-07-29 16:47:14 +08:00
Kubernetes Submit Queue 9350afd772 Merge pull request #48976 from supereagle/cleanup-api-package
Automatic merge from submit-queue (batch tested with PRs 48976, 49474, 40050, 49426, 49430)

Remove duplicated import and wrong alias name of api package

**What this PR does / why we need it**:

**Which issue this PR fixes**: fixes #48975

**Special notes for your reviewer**:
/assign @caesarxuchao

**Release note**:
```release-note
NONE
```
2017-07-25 12:14:38 -07:00
Kubernetes Submit Queue 144a4c2b74 Merge pull request #49358 from jianglingxia/jlx72113
Automatic merge from submit-queue

[trival] fix typo

**What this PR does / why we need it**:
some file word spell error that amend correct
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
2017-07-24 21:26:54 -07:00
supereagle adc0eef43e remove duplicated import and wrong alias name of api package 2017-07-25 10:04:25 +08:00
jianglingxia 88828cc777 [trival] fix typo 2017-07-21 16:38:08 +08:00
dhilipkumars 4967bb7342 Review Comments 2017-07-21 13:42:13 +05:30
dhilipkumars 10af4fa9db Add UT and upgrade this test suite with go sub-test 2017-07-21 10:43:48 +05:30
dhilipkumars f17a572ece SetNewReplicaSetAnnotations() should compare revisions as numbers than strings 2017-07-21 10:43:48 +05:30
Jacob Simpson b565f53822 update-bazel.sh 2017-07-17 15:06:08 -07:00
Chao Xu 9d489c8504 manual changes 2017-07-17 15:05:38 -07:00
Jacob Simpson a765b8cfca Migrate api.Scheme to scheme.Scheme 2017-07-17 15:05:38 -07:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Michail Kargakis da1ff1c38e
controller: cleanup complete deployments only
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-07-11 19:20:14 +02:00
Kubernetes Submit Queue 37c9367abe Merge pull request #47014 from boingram/deletePod-handler-shouldnt-set-owner-refs
Automatic merge from submit-queue

deletePod handler in the deployment controller shouldn't set owner refs

**What this PR does / why we need it**:
This PR stops the deletePod handler in the deployment controller from adopting replica sets when determining if a deployment needs to be requeued. It leaves this logic to the replication loop, removing the replica set adoption side effect.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #46933 

**Special notes for your reviewer**:
@kargakis PR for delete pod handler setting owner refs issue

**Release note**:

```release-note
```
2017-06-28 14:45:29 -07:00
Chao Xu 31d0869f83 revert 45764 2017-06-25 21:41:10 -07:00
Kubernetes Submit Queue 8679677e87 Merge pull request #47579 from wanghaoran1988/fix_43322
Automatic merge from submit-queue (batch tested with PRs 47958, 46261, 46667, 47709, 47579)

Clean up Deployment overlap annotation code

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #43322

**Special notes for your reviewer**:

**Release note**:

```
None
```
2017-06-23 07:21:36 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Haoran Wang f732e4baae Clean up Deployment overlap annotation code 2017-06-16 14:20:44 +08:00
Mayank Kumar ff503dbc32 delete dependent pods for rs when deleting deployments 2017-06-14 12:52:02 -07:00
Bo Ingram 5a99edaeb0 deletePod handler in the deployment controller shouldn't set owner refs 2017-06-06 18:28:44 -06:00
Janet Kuo d02f40a5e7 Implement DaemonSet history logic in controller
1. Create controllerrevisions (history) and label pods with template
   hash for both RollingUpdate and OnDelete update strategy
2. Clean up old, non-live history based on revisionHistoryLimit
3. Remove duplicate controllerrevisions (the ones with the same template)
   and relabel their pods
4. Update RBAC to allow DaemonSet controller to manage
   controllerrevisions
5. In DaemonSet controller unit tests, create new pods with hash labels
2017-06-03 00:44:23 -07:00
Janet Kuo 4e6f70ff67 Autogen: run hack/update-all.sh 2017-06-03 00:43:53 -07:00
Michail Kargakis 9190a47c37
Generated changes for collision count
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-05-25 12:23:17 +02:00
Michail Kargakis 4a2c5eae92
Implement hash collision avoidance mechanism
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-05-25 11:17:45 +02:00
Michail Kargakis aeb2d9b9b4
Deep equality helper should not mutate state
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-05-25 11:17:45 +02:00
Michail Kargakis fcf68ba7a7
Remove obsolete deployment helpers
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-05-25 11:17:44 +02:00
Michail Kargakis 7910dc3131
Account newly ready replicas as progress
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-05-20 21:14:50 +02:00
Zihong Zheng 5992425588 Autogenerated files 2017-05-16 21:55:51 -07:00
Zihong Zheng c0920f75cf Move API annotations into annotation_key_constants and remove api/annotations package 2017-05-16 21:55:23 -07:00
Kubernetes Submit Queue 79a2e359cd Merge pull request #44024 from zhangxiaoyu-zidif/egnew
Automatic merge from submit-queue

fix the typos of e.g.

fix the typos of e.g.


**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-05 23:41:33 -07:00
Haoran Wang b6aadd2b7e Handle maxUnavailable larger than spec.replicas 2017-04-28 13:32:24 +08:00
Mike Danese e48a4f0af7 fix various bad tests 2017-04-25 11:23:33 -07:00
Kubernetes Submit Queue d86a01570b Merge pull request #44439 from kargakis/fix-saturation-check
Automatic merge from submit-queue (batch tested with PRs 44741, 44853, 44572, 44797, 44439)

controller: fix saturation check in Deployments

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

@kubernetes/sig-apps-bugs 

I'll cherry-pick this back to 1.6 and 1.5
2017-04-25 01:56:42 -07:00
Michail Kargakis f1e8356265
Deployments complete only when all desired pods are available
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-04-22 17:18:10 +02:00
Michail Kargakis 1923cc60c9
Revert "kubectl: respect deployment strategy parameters for rollout status"
This reverts commit d20ac8766e.
2017-04-22 17:18:06 +02:00
Michail Kargakis 63e8484567
controller: fix saturation check for Deployments
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-04-20 19:22:30 +02:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Andy Goldstein e63fcf708d Make controller Run methods consistent
- startup/shutdown logging
- wait for cache sync logging
- defer utilruntime.HandleCrash()
- wait for stop channel before exiting
2017-04-14 07:27:45 -04:00
Kubernetes Submit Queue 9f92832fad Merge pull request #43942 from wanghaoran1988/fix_43323
Automatic merge from submit-queue (batch tested with PRs 44447, 44456, 43277, 41779, 43942)

Clean up pre-ControllerRef compatibility logic

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #43323 

**Special notes for your reviewer**:
No
**Release note**:

```
NONE
```
2017-04-13 15:02:03 -07:00
Kubernetes Submit Queue 44131a3658 Merge pull request #44324 from shiywang/fix-subresource
Automatic merge from submit-queue (batch tested with PRs 43900, 44152, 44324)

make deployment unit tests need to respect subresources

Fixes #42569
I check all the unit test code related to `Matches` method, seems there's only one line we could change to not break previous testing logic
@kargakis ptal, thanks

/assign @kargakis
2017-04-11 07:57:20 -07:00
shiywang b3f48f736f make deployment unit tests need to respect subresources 2017-04-11 01:24:44 +08:00
Haoran Wang 866c599198 Clean up pre-ControllerRef compatibility logic 2017-04-07 14:09:23 +08:00
Kubernetes Submit Queue 5b4a814db2 Merge pull request #43965 from kargakis/update-retry-interval-for-deployments
Automatic merge from submit-queue (batch tested with PRs 43963, 43965)

Update deployment retries to a saner count

It seems that the current retries sum up to no more than 0.2s so some transient errors may drop deployments out of the queue.
2017-04-06 02:52:20 -07:00
zhangxiaoyu-zidif 932ece5cfd e3d534b2c4 2017-04-04 14:16:34 +08:00
Michail Kargakis 189eec69d7 Update deployment retries to a saner count 2017-04-02 21:33:51 +02:00
Michail Kargakis 97fed0aff4 Wait for clean old RSs statuses in the middle of Recreate rollouts 2017-04-02 20:06:25 +02:00
Kubernetes Submit Queue 05cd33b29e Merge pull request #43508 from shiywang/first-deploy
Automatic merge from submit-queue

Fix scaled down deployments cannot identify old replica sets

Fixes https://github.com/kubernetes/kubernetes/issues/42570
2017-03-29 20:42:31 -07:00
shiywang 49161d1b18 fix Scaled down deployments cannot identify old replica sets 2017-03-30 00:13:28 +08:00
Kubernetes Submit Queue 596fc98c60 Merge pull request #43071 from zjj2wry/master
Automatic merge from submit-queue

add comment end
2017-03-24 10:27:10 -07:00
Jeff Schroeder a5afdfa17f
Fix spelling of the word successfully
Auto-generated via:
    git grep -l [Ss]uccesfully  | xargs sed -ri 's/([sS])uccesfully/\1uccessfully/g'

I noticed this when running kube-scheduler with --v4 and it is annoying.
Then manually reverted changed to the vendored bits.
2017-03-22 18:33:11 -05:00
Michail Kargakis 68b78282d7 controller: work around milliseconds skew in AddAfter 2017-03-21 16:39:32 -04:00
Anthony Yeh 0b9233648e Deflake TestSyncDeploymentDeletionRace
The cache was sometimes catching up while we were testing the case
where the cache is not yet caught up.

Before this fix, I could reproduce the failure with the following
command. After the fix, it passes.

```
go test -count 100000 -run TestSyncDeploymentDeletionRace
```
2017-03-20 11:13:26 -07:00
Kubernetes Submit Queue 47320fd3f0 Merge pull request #42938 from enisoc/orphan-race
Automatic merge from submit-queue

GC: Fix re-adoption race when orphaning dependents.

**What this PR does / why we need it**:

The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).

**Which issue this PR fixes**:

Fixes #42639

**Special notes for your reviewer**:

**Release note**:
```release-note
```

cc @kubernetes/sig-apps-pr-reviews
2017-03-20 01:30:11 -07:00
Anthony Yeh b4b8fdbca3 GC: Fix re-adoption race when orphaning dependents.
The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).
2017-03-17 15:39:26 -07:00
Kubernetes Submit Queue f37cffcf4e Merge pull request #43239 from enisoc/kubectl-controller-ref
Automatic merge from submit-queue

kubectl: Use v1.5-compatible ownership logic when listing dependents.

**What this PR does / why we need it**:

This restores compatibility between kubectl 1.6 and clusters running Kubernetes 1.5.x. It introduces transitional ownership logic in which the client considers ControllerRef when it exists, but does not require it to exist.

If we were to ignore ControllerRef altogether (pre-1.6 client behavior), we would introduce a new failure mode in v1.6 because controllers that used to get stuck due to selector overlap will now make progress. For example, that means when reaping ReplicaSets of an overlapping Deployment, we would risk deleting ReplicaSets belonging to a different Deployment that we aren't about to delete.

This transitional logic avoids such surprises in 1.6 clusters, and does no worse than kubectl 1.5 did in 1.5 clusters. To prevent this when kubectl 1.5 is used against 1.6 clusters, we can cherrypick this change.

**Which issue this PR fixes**:

Fixes #43159

**Special notes for your reviewer**:

**Release note**:
```release-note
```
2017-03-17 14:25:38 -07:00
better88 6c13a02026 Fix revision when SetDeploymentRevision 2017-03-17 23:23:41 +08:00
Anthony Yeh de92f90f12 Deployment: Clear obsolete OverlapAnnotaiton.
This ensures old clients will not assume the Deployment is blocked.
2017-03-16 14:52:01 -07:00
Anthony Yeh fa23729a6d kubectl: Use v1.5-compatible ownership logic when listing dependents.
In particular, we should not assume ControllerRefs are necessarily set.
However, we can still use ControllerRefs that do exist to avoid
interfering with controllers that do use it.
2017-03-16 12:28:38 -07:00
Anthony Yeh 725ec0cc5e kubectl: Check for Deployment overlap annotation in reaper.
This effectively reverts the client-side changes in
cec3899b96.
We have to maintain the old behavior on the client side to support
version skew when talking to old servers that set the annotation.

However, the new server-side behavior is still to NOT set the
annotation.
2017-03-16 12:28:28 -07:00
Anthony Yeh 0c015927c4 Fix Deployment upgrade test.
When the upgrade test operates on Deployments in a pre-1.6 cluster
(i.e. during the Setup phase), it needs to use the v1.5 deployment/util
logic. In particular, the v1.5 logic does not filter children to only
those with a matching ControllerRef.
2017-03-14 17:39:29 -07:00
zhengjiajin 996200b71e update annotations 2017-03-14 20:03:31 +08:00
Łukasz Oleś b32afe1720 kubectl: respect DaemonSet strategy parameters for rollout status
It handles "after-merge" comments from #41116
2017-03-09 20:02:52 +01:00
Anthony Yeh 8c4bcb38fb Deployment: Filter by ControllerRef in Reaper.
We don't want to delete ReplicaSets we don't own.
2017-03-06 15:12:08 -08:00
Anthony Yeh cec3899b96 Deployment: Remove Overlap and SelectorUpdate annotations.
These are not used anymore since ControllerRef now protects against
fighting between controllers with overlapping selectors.
2017-03-06 15:12:08 -08:00
Anthony Yeh 94b3c216a1 Deployment: Consolidate Adopt/Release unit tests. 2017-03-06 15:12:08 -08:00
Anthony Yeh f2a2895a78 Deployment: Check that ControllerRef UID matches. 2017-03-06 15:12:07 -08:00
Anthony Yeh 111b9ce9b5 Deployment: Fix data race in unit tests. 2017-03-06 15:12:07 -08:00
Anthony Yeh d96c4847b6 Deployment: Filter Pods by Deployment selector in addition to ControllerRef.
Deployment should ignore Pods that don't match the selector, even if
they have a ControllerRef pointing to one of the ReplicaSets it owns.
The ReplicaSet itself will orphan the Pod as soon as it syncs.
2017-03-06 15:12:07 -08:00
Anthony Yeh 37534b66df Deployment: Always set BlockOwnerDeletion in ControllerRef. 2017-03-06 15:12:07 -08:00
Anthony Yeh 0d9c9bfee0 Deployment: Use ControllerRef to route watch events.
This is part of the completion of ControllerRef, as described here:

https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#watches
2017-03-06 15:12:07 -08:00
Anthony Yeh 887acb07ea Deployment/util: Filter by ControllerRef.
The list functions in deployment/util are used outside the Deployment
controller itself. Therefore, they don't do actual adoption/orphaning.
However, they still need to avoid listing things that don't belong.
2017-03-06 15:12:06 -08:00
Anthony Yeh 92d75cbb23 Deployment: Use ControllerRef to list controlled objects.
Although Deployment already applied its ControllerRef to adopt matching
ReplicaSets, it actually still used label selectors to list objects that
it controls. That meant it didn't actually follow the rules of
ControllerRef, so it could still fight with other controller types.

This should mean that the special handling for overlapping Deployments
is no longer necessary, since each Deployment will only see objects that
it owns (via ControllerRef).
2017-03-06 15:12:06 -08:00
Kubernetes Submit Queue beddc4f68d Merge pull request #42535 from kargakis/require-deployment-requeue-for-rollback
Automatic merge from submit-queue (batch tested with PRs 31783, 41988, 42535, 42572, 41870)

controller: ensure deployment rollback is re-entrant

Make rollbacks re-entrant in the Deployment controller, otherwise
fast enqueues of a Deployment may end up in undesired behavior
- redundant rollbacks.

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

@kubernetes/sig-apps-bugs
2017-03-06 11:30:16 -08:00
Michail Kargakis 0eeef8e683 controller: ensure deployment rollback is re-entrant
Make rollbacks re-entrant in the Deployment controller, otherwise
fast enqueues of a Deployment may end up in undesired behavior
- redundant rollbacks.
2017-03-06 14:30:32 +01:00
Kubernetes Submit Queue 90a4eda96b Merge pull request #41809 from kargakis/rollout-status-fix
Automatic merge from submit-queue

kubectl: respect deployment strategy parameters for rollout status

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

`rollout status` now respects the strategy parameters for a RollingUpdate Deployment. This means that it will exit as soon as minimum availability is reached for a rollout (note that if you allow maximum availability, `rollout status` will succeed as soon as the new pods are created)

@janetkuo @AdoHe ptal
2017-03-04 19:35:21 -08:00
Michail Kargakis d70e63c231 controller: reduce log verbosity for deployments 2017-03-03 14:34:11 +01:00
Michail Kargakis d20ac8766e kubectl: respect deployment strategy parameters for rollout status 2017-03-03 14:12:08 +01:00
mlmhl 5440752e69 fix rsListerSynced and podListerSynced for DeploymentController 2017-03-01 14:17:51 +08:00
Łukasz Oleś b27308c317 DaemonSet updates
It implements https://github.com/kubernetes/community/blob/master/contributors/design-proposals/daemonset-update.md
Feature https://github.com/kubernetes/features/issues/124
2017-02-27 09:15:56 +01:00
Kubernetes Submit Queue 3f4ef9ae11 Merge pull request #41250 from kargakis/switch-get-from-cache
Automatic merge from submit-queue (batch tested with PRs 41621, 41946, 41941, 41250, 41729)

controller: poll replica sets from the cache
2017-02-26 06:47:00 -08:00
Kubernetes Submit Queue 734dfcb3d8 Merge pull request #41510 from kargakis/fix-progress-check-requeue
Automatic merge from submit-queue (batch tested with PRs 41714, 41510, 42052, 41918, 31515)

controller: fix requeueing progressing deployments

Drop the secondary queue and add either ratelimited or after the
required amount of time that we need to wait directly in the main
queue. In this way we can always be sure that we will sync back
the Deployment if its progress has yet to resolve into a complete
(NewReplicaSetAvailable) or TimedOut condition.

This should also simplify the deployment controller a bit.

Fixes https://github.com/kubernetes/kubernetes/issues/39785. Once this change soaks, I will move the test out of the flaky suite.

@kubernetes/sig-apps-misc
2017-02-25 02:17:53 -08:00
Kubernetes Submit Queue a8a8120ecd Merge pull request #41361 from enisoc/controller-ref-manager
Automatic merge from submit-queue (batch tested with PRs 41667, 41820, 40910, 41645, 41361)

Refactor ControllerRefManager

**What this PR does / why we need it**:

To prepare for implementing ControllerRef across all controllers (https://github.com/kubernetes/community/pull/298), this pushes the common adopt/orphan logic into ControllerRefManager so each controller doesn't have to duplicate it.

This also shares the adopt/orphan logic between Pods and ReplicaSets, so it lives in only one place.

**Which issue this PR fixes**:

**Special notes for your reviewer**:

**Release note**:
```release-note
```

cc @kubernetes/sig-apps-pr-reviews
2017-02-23 20:57:32 -08:00
Janet Kuo 51ba4d1e01 Sort slices before comparing in deployment util test 2017-02-23 12:42:42 -08:00
Janet Kuo 3718749c4a Fix deployment helper - no assumptions on only one new ReplicaSet 2017-02-22 13:18:33 -08:00
Michail Kargakis 7a8259c6a1 controller: fix requeueing progressing deployments
Drop the secondary queue and add either ratelimited or after the
required amount of time that we need to wait directly in the main
queue. In this way we can always be sure that we will sync back
the Deployment if its progress has yet to resolve into a complete
(NewReplicaSetAvailable) or TimedOut condition.
2017-02-20 18:19:23 +01:00
Anthony Yeh 70bd5fdfe5 Refactor ControllerRefManager
To prepare for implementing ControllerRef across all controllers,
this pushes the common adopt/orphan logic into ControllerRefManager
so each controller doesn't have to duplicate it.

This also shares the adopt/orphan logic between Pods and ReplicaSets,
so it lives in only one place.
2017-02-16 15:09:17 -08:00
Janet Kuo a265186aaa Deployment: filter out old RSes that are deleted or with non-zero replicas before cleanup 2017-02-16 14:48:10 -08:00