Commit Graph

3956 Commits (fab7009997d9da9f374f9aa48092fc94c55829b5)

Author SHA1 Message Date
houjun 9a84e413fc Fix missing 'break' 2018-10-23 17:14:05 +08:00
k8s-ci-robot e77e8ffbf5
Merge pull request #69730 from xichengliudui/fix18101204
Fix some typo
2018-10-22 23:59:24 -07:00
k8s-ci-robot dbdcb7e053
Merge pull request #70072 from yue9944882/chore/cleanup-serviceaccount-controller-options
Fixes wild serviceaccount controller resync options
2018-10-22 21:18:48 -07:00
zuoxiu.jm 4624c1319c fixes wild serviceaccount controller options 2018-10-22 13:13:02 +08:00
WanLinghao 7df1078d6f Currently, kubelet token mamanger only clean tokens who are expired. For tokens with long expiration, if the pod who creates them got killed or evicted, those tokens may stay in kubelet's memory until they are expired. It's bad for kubelet and node itself. After this patch, each time a pod was deleted, token manager would clean related tokens. 2018-10-22 09:32:59 +08:00
Jordan Liggitt fdd87a8872 Avoid dropping resourcequota metadata in controller 2018-10-19 14:52:53 -04:00
k8s-ci-robot d425258532
Merge pull request #69788 from ravisantoshgudimetla/taint-based-eviction
Add test cases for taintbasedevictions
2018-10-18 06:34:31 -07:00
k8s-ci-robot aad6437aa9
Merge pull request #64061 from wgliang/master.remove-unused-code-pkg-controller
remove unused code of (pkg/controller)
2018-10-17 19:54:05 -07:00
k8s-ci-robot 6f4b768c94
Merge pull request #65350 from liggitt/simplify-taint-manager-key
Simplify taint manager workqueue keys
2018-10-17 18:39:03 -07:00
k8s-ci-robot feb6475a30
Merge pull request #68952 from grayluck/node-cidr-size
Skip node cidr mask size check for cloud allocation
2018-10-17 16:19:49 -07:00
yankaiz e3121c1f81 Skip node cidr mask size check for cloud allocation.
Unittest added for node_ipan_controller.go.
2018-10-17 11:29:49 -07:00
Zhen Wang 7bb61c566d Put node lease lister behind feature gate 2018-10-17 09:41:30 -07:00
Jordan Liggitt 9503c64f27 Simplify taint manager workqueue keys 2018-10-17 10:47:14 -04:00
ravisantoshgudimetla d281d566b3 Add test cases for taintbasedevictions 2018-10-16 18:56:45 -04:00
Ibrahim AshShohail 2fb3ba71f1
Update usages of http.ResponseWriter.WriteHeader to use http.Error
Signed-off-by: Ibrahim AshShohail <me@ibrasho.com>
2018-10-14 05:58:00 +03:00
xichengliudui ef496320cf Remove excess 'in'
Fix some typo

Fix some typo
2018-10-13 09:12:42 -04:00
tanshanshan b7c7966b9f Move pkg/scheduler/algorithm/well_known_labels.go out 2018-10-13 09:10:00 +08:00
k8s-ci-robot 23a84774b1
Merge pull request #69241 from wangzhen127/heartbeat
NodeLifecycleController treats node lease renewal as a heartbeat signal
2018-10-12 03:32:15 -07:00
k8s-ci-robot b3033a7278
Merge pull request #67934 from tanshanshan/typo828
fix spelling mistakes
2018-10-11 18:26:24 -07:00
Zhen Wang e35d808aa2 NodeLifecycleController treats node lease renewal as a heartbeat signal 2018-10-11 16:07:15 -07:00
k8s-ci-robot e6c5fb4666
Merge pull request #67859 from goodluckbot/job-controller-backoffLimit
Fix pastBackoffLimitOnFailure in job controller
2018-10-11 05:49:30 -07:00
goodluckbot 53c3e103d1 Fix pastBackoffLimitOnFailure when backoffLimit is zero 2018-10-11 17:29:11 +08:00
Guoliang Wang b1ac6df4dc remove unused code of (pkg/controller) 2018-10-09 08:15:30 +08:00
k8s-ci-robot f81b72f77b
Merge pull request #68903 from logicalhan/typo
fix a few typographic errors in test utils file
2018-10-08 16:55:43 -07:00
k8s-ci-robot 8fa5d386a1
Merge pull request #66605 from islinwb/default_RevisionHistoryLimit
Default extensions/v1beta1 Deployment's RevisionHistoryLimit to MaxInt32
2018-10-08 10:41:46 -07:00
k8s-ci-robot 0f17e9ade6
Merge pull request #69386 from cblecker/go-1.11
Update to go1.11.1
2018-10-05 17:35:51 -07:00
Christoph Blecker b6366d28e6
fix vet error in pkg/controller/route/route_controller_test.go
pkg/controller/route/route_controller_test.go:101: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:102: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:105: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:106: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:118: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:121: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:122: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:135: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:136: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:148: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:149: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:150: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:151: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:154: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:155: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:167: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:168: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:171: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:172: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:185: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:197: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:198: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:199: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:202: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:203: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:215: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:216: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:217: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:220: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:221: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
pkg/controller/route/route_controller_test.go:222: *k8s.io/kubernetes/vendor/k8s.io/cloud-provider.Route composite literal uses unkeyed fields
2018-10-05 15:48:53 -07:00
Christoph Blecker 97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Walter Fender f3f46d5f5a Moving the cloudprovider interface to staging.
Individual implementations are not yet being moved.
Fixed all dependencies which call the interface.
Fixed golint exceptions to reflect the move.
Added project info as per @dims and
https://github.com/kubernetes/kubernetes-template-project.
Added dims to the security contacts.
Fixed minor issues.
Added missing template files.
Copied ControllerClientBuilder interface to cp.
This allows us to break the only dependency on K8s/K8s.
Added TODO to ControllerClientBuilder.
Fixed GoDeps.
Factored in feedback from JustinSB.
2018-10-04 14:41:20 -07:00
k8s-ci-robot c179a9c9df
Merge pull request #67356 from yliaog/master
Moved staging/src/k8s.io/client-go/tools/bootstrap to staging/src/k8s…
2018-10-02 20:35:51 -07:00
k8s-ci-robot f11ea40ed0
Merge pull request #69309 from andrewsykim/services-routes-owners
add myself and cheftako to services/routes controller OWNERS
2018-10-02 14:43:03 -07:00
Yu Liao fc21115c3f Moved staging/src/k8s.io/client-go/tools/bootstrap to staging/src/k8s.io/cluster-bootstrap 2018-10-02 09:46:13 -07:00
k8s-ci-robot 0821eed1a0
Merge pull request #69305 from wangzhen127/rename
Rename node status to node health in NodeLifecycleController
2018-10-02 04:26:24 -07:00
Zhen Wang 88e7e186f0 Rename node status to node health in NodeLifecycleController
Since we are going to treat both node status and node lease as node
heartbeat/health signals, this PR makes the renmae changes, so that the
follow-up PRs are easier to review.
2018-10-01 23:19:50 -07:00
k8s-ci-robot ec2f346e9f
Merge pull request #69260 from SataQiu/fix-20180929
fix typo
2018-10-01 22:20:49 -07:00
andrewsykim 9406b3c1e0 add myself and cheftako to services/routes controller OWNERS 2018-10-01 16:37:58 -04:00
SataQiu 2f7b86c651 fix typo 2018-09-29 18:20:01 +08:00
SataQiu 94a653f100 fix typo 2018-09-28 23:41:24 +08:00
k8s-ci-robot 40c7c837b1
Merge pull request #68673 from cofyc/fix68391
Ignore non-avaiable volumes in findMatchingVolume
2018-09-25 19:23:50 -07:00
k8s-ci-robot d1e24acee7
Merge pull request #68644 from Pingan2017/nodecondition
NodePIDPressure condition should set to unknown when node lost connne…
2018-09-25 18:12:44 -07:00
k8s-ci-robot 59ad8c0f51
Merge pull request #68121 from dixudx/remove_rs_controller_options
cleanup: remove unused options for rs controller
2018-09-25 05:02:24 -07:00
k8s-ci-robot 0805860dba
Merge pull request #67870 from yue9944882/refactor/externalize-resource-quota-admission-controller
Externalize resource quota admission controller & controller reconciliation
2018-09-25 02:41:40 -07:00
k8s-ci-robot 836ce7357a
Merge pull request #67914 from Huang-Wei/inconsistent-dscontroller-comment
fix a comment inconsistency in Daemonset Controller
2018-09-24 17:16:50 -07:00
Han Kang 1d19295645 fix typographic errors in test utils file 2018-09-24 14:59:41 -07:00
k8s-ci-robot 170dcc2ea0
Merge pull request #68754 from bradhoekstra/optional-service-env-variables
kubelet: Make service environment variables optional
2018-09-24 10:59:32 -07:00
k8s-ci-robot 3690f8fc54
Merge pull request #68831 from jbartosik/fix-first-hpa-recommendation
Fix first hpa recommendation
2018-09-19 09:48:00 -07:00
Joachim Bartosik 7d7c48a647 HPA stabilizes initial recommendation
HPA will treat initial size of autoscalee to avoid hastily overriding
recomendations made by HPA (if HPA set size and then was restarted) or by user
(initial size should be treated as human-generated recommendation).
2018-09-19 14:54:55 +02:00
Yecheng Fu 1e27a28dca Ignore non-avaiable volumes in findMatchingVolume: update tests
- Use VolumeAvaiable instead of empty or pending phase in tests
- Add a test case to verify findMatchingVolume will not choose
  non-avaiable PVs if it's not pre-bind
- Add a test case to verify syncClaim will not choose non-avaibalbe PVs
  if it's not pre-bind
2018-09-19 13:13:31 +08:00
Cheng Xing 8555408f42 Removing CRD installation from attach detach controller 2018-09-18 14:25:15 -07:00
Brad Hoekstra ac8799a80d kubelet: Make service environment variables optional 2018-09-17 16:27:36 -04:00
Yecheng Fu b3cb1bdc4a Ignore non-available volumes in findMatchingVolume to reduce chance of
unnecessary binding failures.
2018-09-14 20:27:44 +08:00
Pingan2017 3b19c33be5 NodePIDPressure condition should set to unknown when node lost connnection with contorl 2018-09-14 08:50:05 +08:00
k8s-ci-robot 5be0a0ee8d
Merge pull request #67899 from ravisantoshgudimetla/ScheduleDaemonSetPods-beta
Graduate Schedule daemon set pods  by default scheduler to beta and fix tests
2018-09-12 13:18:23 -07:00
ravisantoshgudimetla b2e92f1ba2 Fix test cases and build files 2018-09-12 14:19:29 -04:00
k8s-ci-robot 45c5ddd2fb
Merge pull request #68494 from k82cn/k8s_67606_2
Added default tolerations for new pods.
2018-09-11 13:27:50 -07:00
k8s-ci-robot 7bfd0d358c
Merge pull request #68408 from k82cn/k8s_67823_2
Using node name to improve node controller performance.
2018-09-11 09:18:50 -07:00
Da K. Ma 97ba8b477a Using node name to improve node controller performance.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-09-11 21:43:19 +08:00
Da K. Ma 55199a04be Added default tolerations for new pods.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-09-11 09:14:41 +08:00
Kubernetes Submit Queue 323e1375b3
Merge pull request #64954 from k82cn/k8s_61312_2
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Added unschedulable and network-unavailable toleration.

Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
part of #61312
fixes: https://github.com/kubernetes/kubernetes/issues/67606

**Release note**:

```release-note
If `TaintNodesByCondition` is enabled, add `node.kubernetes.io/unschedulable` and
 `node.kubernetes.io/network-unavailable` automatically to DaemonSet pods.
```
2018-09-09 19:46:37 -07:00
Kubernetes Submit Queue 9e9c414460
Merge pull request #68241 from krzysztof-jastrzebski/informer
Automatic merge from submit-queue (batch tested with PRs 65250, 68241). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Use informer cache instead of active pod gets in HPA controller.

**What this PR does / why we need it**:
Use informer cache instead of active pod gets in HPA controller. 

**Which issue(s) this PR fixes**:
Fixes #68217 

**Release note**:
```release-note
kube-controller-manager: use informer cache instead of active pod gets in HPA controller
```
2018-09-08 16:09:33 -07:00
Kubernetes Submit Queue f26556cc14
Merge pull request #67684 from verult/top-csi-driver-registration
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

CSI Node info registration in kubelet

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

**Special notes for your reviewer**:
Feature issue: https://github.com/kubernetes/features/issues/557
Design doc: https://github.com/kubernetes/community/pull/2034

Missing pieces:
* CSI client retry and exponential backoff logic.
* CSINodeInfo object validation
* e2e test with all the CSI machinery.

An RBAC rule is also added to support external-provisioner topology updates.

**Release note**:

```release-note
Registers volume topology information reported by a node-level Container Storage Interface (CSI) driver. This enables Kubernetes support of CSI topology mechanisms.
```
2018-09-08 00:16:52 -07:00
Cheng Xing 94d649b590 Rearranged feature flags 2018-09-07 17:45:27 -07:00
Kubernetes Submit Queue a6eb49f0dc
Merge pull request #68195 from luxas/consolidate_componentconfig_code_standards
Automatic merge from submit-queue (batch tested with PRs 67950, 68195). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Consolidate componentconfig code standards

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

This PR fixes a bunch of very small misalignments in ComponentConfig packages:
 - Add sane comments to all functions/variables in componentconfig `register.go` files
 - Make the `register.go` files of componentconfig pkgs follow the same pattern and not differ from each other like they do today.
 - Register the `openapi-gen` tag in all `doc.go` files where the pkg contains _external_ types.
 - Add the `groupName` tag where missing
 - Fix cases where `addKnownTypes` was registered twice in the `SchemeBuilder`
 - Add `Readme` and `OWNERS` files to `Godeps` directories if missing.

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


**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @sttts @thockin
2018-09-07 11:19:40 -07:00
Da K. Ma e39b510726 Added unschedulable and network-unavailable toleration.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-09-07 16:53:49 +08:00
Kubernetes Submit Queue f85d39abed
Merge pull request #68087 from grayluck/refetch
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Let the service controller retry when presistUpdate returns a conflict error

**What this PR does / why we need it**:
If a load balancer is changed while provisioning, it will fall into an error state and will not self-recover.
This PR picks up the conflict error and let serviceController retry in order to get the load balancer out of error state.

**Special notes for your reviewer**:
/assign @MrHohn @rramkumar1 

**Release note**:

```release-note
Let service controller retry creating load balancer when persistUpdate failed due to conflict.
```
2018-09-06 14:11:45 -07:00
Lucas Käldström 869d74f63c
autogenerated bazel 2018-09-06 15:03:44 +03:00
Lucas Käldström 83d53ea1c2
Standardize componentconfig code/comment patterns 2018-09-06 13:42:02 +03:00
Kubernetes Submit Queue cdfbb01db6
Merge pull request #68151 from ddebroy/ddebroy-fix67852
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Implement semantic comparison of VolumeNodeAffinity for unit tests

**What this PR does / why we need it**:
Implements a semantic comparison function for VolumeNodeAffinity that is not sensitive to ordering of various members. Previous reflect.DeepEqual was sensitive to ordering causing it to be flaky.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes # https://github.com/kubernetes/kubernetes/issues/67852

**Special notes for your reviewer**:
We want to able to successfully match `VolumeNodeAffinity{Required:&NodeSelector{NodeSelectorTerms:[{[{a In [1]} {b In [2 3]}] []}],},}` and `VolumeNodeAffinity{Required:&NodeSelector{NodeSelectorTerms:[{[{b In [3 2]} {a In [1]}] []}],},}` without being sensitive to the ordering of requirements with key `a` and `b` or the order of values with key `b`. This fix enables such semantic comparison of VolumeNodeAffinity

We can move `volumeNodeAffinitiesEqual` to volume/utils post code freeze

**Release note**:

```release-note
NONE
```

/sig storage
cc @msau42
2018-09-05 12:09:53 -07:00
Krzysztof Jastrzebski 985ba931b1 Use informer cache instead of active pod gets in HPA controller. 2018-09-05 11:31:27 +02:00
Kubernetes Submit Queue 2fdd328d05
Merge pull request #67556 from msau42/fix-assume
Automatic merge from submit-queue (batch tested with PRs 67709, 67556). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Fix volume scheduling issue with pod affinity and anti-affinity

**What this PR does / why we need it**:
The previous design of the volume scheduler had volume assume + bind done before pod assume + bind.  This causes issues when trying to evaluate future pods with pod affinity/anti-affinity because the pod has not been assumed while the volumes have been decided.

This PR changes the design so that volume and pod are assumed first, followed by volume and pod binding.  Volume binding waits (asynchronously) for the operations to complete or error. This eliminates the subsequent passes through the scheduler to wait for volume binding to complete (although pod events or resyncs may still cause the pod to run through scheduling while binding is still in progress).   This design also aligns better with the scheduler framework design, so will make it easier to migrate in the future.

Many changes had to be made in the volume scheduler to handle this new design, mostly around:
* How we cache pending binding operations.  Now, any delayed binding PVC that is not fully bound must have a cached binding operation.  This also means bind API updates may be repeated.
* Waiting for the bind operation to fully complete, and detecting failure conditions to abort the bind and retry scheduling.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Fixes issue where pod scheduling may fail when using local PVs and pod affinity and anti-affinity without the default StatefulSet OrderedReady pod management policy
```
2018-09-04 23:19:37 -07:00
Kubernetes Submit Queue 416f63c050
Merge pull request #68159 from saad-ali/csiClusterRegFix
Automatic merge from submit-queue (batch tested with PRs 66840, 68159). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

CSI Cluster Registry and Node Info CRDs Improvements

**What this PR does / why we need it**:
https://github.com/kubernetes/kubernetes/pull/67803 merged before I could address @lavalamp's feedback. This PR addresses his feedback

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Follow up on PR https://github.com/kubernetes/kubernetes/pull/67803

**Special notes for your reviewer**:

**Release note**:

```release-note

```

/assign @lavalamp 
/assign @thockin 

CC @jsafrane @vladimirvivien @verult @gnufied @childsb
2018-09-04 20:49:39 -07:00
Michelle Au 8fcbcafc11 Use rwlock for caches 2018-09-04 16:47:43 -07:00
Michelle Au 37d46a1e3f Volume scheduling library changes:
* FindPodVolumes
    * Prebound PVCs are treated like unbound immediate PVCs and will error
    * Always check for fully bound PVCs and cache bindings for not fully
      bound PVCs
* BindPodVolumes
    * Retry API updates for not fully bound PVCs even if the assume cache
      already marked it
    * Wait for PVCs to be fully bound after making the API updates
    * Error when detecting binding/provisioning failure conditions
2018-09-04 16:30:14 -07:00
yankaiz 267252d9e1 Let the service controller retry when presistUpdate returns a conflict error. 2018-09-04 15:34:26 -07:00
Janet Kuo 13b76d5fb4 Autogen
make clean && make generated_files
2018-09-04 14:21:14 -07:00
Janet Kuo cbdc9b671f Make number of workers configurable 2018-09-04 14:21:14 -07:00
Janet Kuo 5186807587 Add TTL GC controller 2018-09-04 13:11:18 -07:00
stewart-yu 3fd3e40803 add OWNERS file 2018-09-04 19:40:13 +08:00
stewart-yu cef2ab756c [kube-controller-manager] auto-generated file 2018-09-04 19:40:10 +08:00
stewart-yu 1c6c45563f [kube-controller-manager] create package to hold kube-controller-manager component api 2018-09-04 19:39:35 +08:00
stewart-yu be4a437e71 [kube-controller-manager] just only remove struct and default about KubeControllerManagerConfiguration from pkg/apis/componentconfig 2018-09-04 19:38:48 +08:00
Kubernetes Submit Queue 5b355f5d40
Merge pull request #68122 from krzysztof-jastrzebski/scale_down
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Replace scale down window

**What this PR does / why we need it**:
Replace scale down forbidden window with scale down stabilization window.

This allows scale down based on more than one sample, to avoid rapidly changing size up and down for controllers with fluctuating load.

A bit more in https://docs.google.com/document/d/1IdG3sqgCEaRV3urPLA29IDudCufD89RYCohfBPNeWIM

This PR is copy of #67771 with resolved comments.

**Release note**:
```release-note
Replace scale down forbidden window with scale down stabilization window. Rather than waiting a fixed period of time between scale downs HPA now scales down to the highest recommendation it during the scale down stabilization window.
```
2018-09-03 21:39:02 -07:00
Kubernetes Submit Queue 06ffb07e8e
Merge pull request #68135 from shyamjvs/add-random-backoff-to-cidr-allocator
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Use random backoff for retries in cloud-cidr-allocator

Ref https://github.com/kubernetes/kubernetes/pull/68084#issuecomment-417651247
/cc @wojtek-t 

```release-note
NONE
```
2018-09-03 18:41:40 -07:00
Kubernetes Submit Queue 54978d7080
Merge pull request #67959 from gnufied/approver-attach-detach
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Add gnufied as approver for attach/detach controller

Hopefully has reviewed and made enough fixes in this
area to understand the code thoroughly.

```release-note
None
```

/assign @saad-ali @jsafrane
2018-09-02 12:51:16 -07:00
saad-ali 247bad23f0 Improve CSI CRD installation code 2018-09-02 09:23:36 -07:00
Deep Debroy 7946c6e21b Implement semantic comparison of VolumeNodeAffinity for unit tests
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-08-31 19:05:05 -07:00
Klaus Ma 85a19b109a Taint node in paralle.
Signed-off-by: Klaus Ma <klaus1982.cn@gmail.com>
2018-09-01 09:57:02 +08:00
Kubernetes Submit Queue 85300f4f5d
Merge pull request #67803 from saad-ali/csiClusterReg3
Automatic merge from submit-queue (batch tested with PRs 64283, 67910, 67803, 68100). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

CSI Cluster Registry and Node Info CRDs

**What this PR does / why we need it**:
Introduces the new `CSIDriver` and `CSINodeInfo` API Object as proposed in https://github.com/kubernetes/community/pull/2514 and https://github.com/kubernetes/community/pull/2034

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes https://github.com/kubernetes/features/issues/594

**Special notes for your reviewer**:
Per the discussion in https://groups.google.com/d/msg/kubernetes-sig-storage-wg-csi/x5CchIP9qiI/D_TyOrn2CwAJ the API is being added to the staging directory of the `kubernetes/kubernetes` repo because the consumers will be attach/detach controller and possibly kubelet, but it will be installed as a CRD (because we want to move in the direction where the API server is Kubernetes agnostic, and all Kubernetes specific types are installed).

**Release note**:

```release-note
Introduce CSI Cluster Registration mechanism to ease CSI plugin discovery and allow CSI drivers to customize Kubernetes' interaction with them.
```

CC @jsafrane
2018-08-31 16:46:41 -07:00
saad-ali fdeb895d25 Automatically install CRDs during controller init 2018-08-31 12:25:59 -07:00
Jan Safranek 7d673cb8f0 Pass new CSI API Client and informer to Volume Plugins 2018-08-31 12:25:59 -07:00
Krzysztof Jastrzebski 958cba1c82 Replace scale down forbidden window
Replacement is scale down stabilization window. HPA will scale down only
    to max of recommendations it made during that window. More details in

    https://docs.google.com/document/d/1IdG3sqgCEaRV3urPLA29IDudCufD89RYCohfBPNeWIM
2018-08-31 20:24:38 +02:00
Kubernetes Submit Queue 2548fb08cd
Merge pull request #68068 from krzysztof-jastrzebski/hpas2
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Change CPU sample sanitization in HPA.

**What this PR does / why we need it**:
Change CPU sample sanitization in HPA.
    Ignore samples if:
    - Pod is beeing initalized - 5 minutes from start defined by flag
        - pod is unready
        - pod is ready but full window of metric hasn't been colected since
        transition
    - Pod is initialized - 5 minutes from start defined by flag:
        - Pod has never been ready after initial readiness period.

**Release notes:**
```release-note
Improve CPU sample sanitization in HPA by taking metric's freshness into account.
```
2018-08-31 10:17:44 -07:00
Shyam Jeedigunta 8123a9ac7b Use random backoff for retries in cloud-cidr-allocator 2018-08-31 16:07:20 +02:00
wojtekt fcd2882722 Fix retrying in ipam controller 2018-08-31 13:41:16 +02:00
Di Xu 8afdda1030 cleanup: remove unused options for rs controller 2018-08-31 19:00:59 +08:00
Krzysztof Jastrzebski 5357bf9eac Change CPU sample sanitization in HPA.
Ignore samples if:
- Pod is beeing initalized - 5 minutes from start defined by flag
    - pod is unready
    - pod is ready but full window of metric hasn't been colected since
    transition
- Pod is initialized - 5 minutes from start defined by flag:
    - Pod has never been ready after initial readiness period.
2018-08-30 23:13:14 +02:00
Bowei Du d3facac6ef Make CIDR allocation retry backoff exponentially
This also sets to the retry time to be less aggressive

fixes #67348
2018-08-30 12:03:05 -07:00
Kubernetes Submit Queue e3969fed1d
Merge pull request #67825 from nikopen/master
Automatic merge from submit-queue (batch tested with PRs 67745, 67432, 67569, 67825, 67943). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Fix VMWare VM freezing bug by reverting #51066

**What this PR does / why we need it**: kube-controller-manager, VSphere specific: When the controller tries to attach a Volume to Node A that is already attached to Node B, Node A freezes until the volume is attached.  Kubernetes continues to try to attach the volume as it thinks that it's 'multi-attachable' when it's not. #51066 is the culprit.


**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes https://github.com/vmware/kubernetes/issues/500 / https://github.com/vmware/kubernetes/issues/502 (same issue)

**Special notes for your reviewer**:

- Repro:

Vsphere installation, any k8s version from 1.8 and above, pod with attached PV/PVC/VMDK:

1. cordon the node which the pod is in
2. `kubectl delete po/[pod] --force --grace-period=0`
3. the pod is immediately rescheduled to a new node. Grab the new node from a `kubectl describe [pod]` and attempt to Ping it or SSH into it.
4. you can see that pings/ssh fail to reach the new node. `kubectl get node` shows it as 'NotReady'. New node is frozen until the volume is attached - usually 1 minute freeze for 1 volume in a low-load cluster, and many minutes more with higher loads and more volumes involved.

- Patch verification:

Tested a custom patched 1.9.10 kube-controller-manager with #51066 reverted and the above bug is resolved - can't repro it anymore. New node doesn't freeze at all, and attaching happens quite quickly, in a few seconds.


**Release note**:

``` 
Fix VSphere VM Freezing bug by reverting #51066 

```
2018-08-29 15:19:41 -07:00
lichuqiang 4c43d626f2 related test update 2018-08-29 10:30:16 +08:00
lichuqiang b4a57f6855 combine feature gate VolumeScheduling and DynamicProvisioningScheduling into one 2018-08-29 10:30:08 +08:00