kubernetes/pkg/controller
Kubernetes Submit Queue 47e8c93e45
Merge pull request #54185 from crimsonfaith91/sync
Automatic merge from submit-queue (batch tested with PRs 54042, 54185, 54880). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

refactor ReplicaSet sync call tree

**What this PR does / why we need it**:
This PR refactors ReplicaSet sync call tree by refactoring `manageReplicas` and `syncReplicaSet` functions into smaller functions, and adding unit tests to each of the smaller functions.

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

**Release note**:

```release-note
NONE
```
**TODO**:
- `manageReplicas`
  - [x] move both outer and inner `batchSize` loops to a helper function named `slowStartBatch`, and test the function
  - [x] add a helper function returning a list named `podsToDelete`, test the function, and refactor `DeletePod` loop to use the list
  - [x] refactor skipped pod handling such that it happens after `slowStartBatch` returns

- `syncReplicaSet`
  - [x] add unit tests for `calculateStatus`
  - [x] move `canAdoptFunc` to a helper function
2017-11-01 19:38:13 -07:00
..
bootstrap use core client with explicit version globally 2017-10-27 15:48:32 +08:00
certificates remove redundant code 2017-10-27 15:49:08 +08:00
cloud use core client with explicit version globally 2017-10-27 15:48:32 +08:00
cronjob Merge pull request #54445 from crimsonfaith91/rem 2017-10-31 20:10:21 -07:00
daemon Merge pull request #52192 from liyinan926/ds-tests 2017-10-31 13:22:20 -07:00
deployment use core client with explicit version globally 2017-10-27 15:48:32 +08:00
disruption use core client with explicit version globally 2017-10-27 15:48:32 +08:00
endpoint trigger endpoint update on pod deletion 2017-10-31 10:59:37 -07:00
garbagecollector Update bazel 2017-10-18 17:24:04 +02:00
history update BUILD files 2017-10-15 18:18:13 -07:00
job Update bazel 2017-10-18 17:24:04 +02:00
namespace use core client with explicit version globally 2017-10-27 15:48:32 +08:00
node use core client with explicit version globally 2017-10-27 15:48:32 +08:00
podautoscaler Fix and update comment with api.Scheme 2017-10-30 19:54:02 +01:00
podgc use core client with explicit version globally 2017-10-27 15:48:32 +08:00
replicaset refactor replicaset sync call tree 2017-11-01 16:16:19 -07:00
replication use core client with explicit version globally 2017-10-27 15:48:32 +08:00
resourcequota Update quota controller to monitor all types 2017-10-27 11:07:53 -04:00
route use core client with explicit version globally 2017-10-27 15:48:32 +08:00
service Merge pull request #54644 from brendandburns/node-label 2017-10-28 07:26:24 -07:00
serviceaccount use core client with explicit version globally 2017-10-27 15:48:32 +08:00
statefulset use core client with explicit version globally 2017-10-27 15:48:32 +08:00
testutil Update bazel 2017-10-18 17:24:04 +02:00
ttl use core client with explicit version globally 2017-10-27 15:48:32 +08:00
volume Merge pull request #54652 from msau42/update-owners 2017-11-01 16:30:32 -07:00
.import-restrictions add import restrictions 2016-10-13 16:10:24 -07:00
BUILD remove created-by annotation 2017-10-30 12:49:44 -07:00
client_builder.go pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
controller_ref_manager.go Migrate to GetControllerOf from meta/v1 package 2017-08-06 22:41:58 +10:00
controller_ref_manager_test.go Merge pull request #50353 from zhangxiaoyu-zidif/Delete-redundant-expectError-for-controller-ref-test 2017-08-12 00:00:55 -07:00
controller_utils.go Merge pull request #54445 from crimsonfaith91/rem 2017-10-31 20:10:21 -07:00
controller_utils_test.go pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
lookup_cache.go Use fnv.New32a() in hash instead adler32 2017-02-15 14:03:54 +08:00
OWNERS remove some people from OWNERS so they don't get reviews anymore 2017-07-13 10:02:21 -07:00