Commit Graph

848 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
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
Dr. Stefan Schimanski 8aa0eefce8 kube-controller-manager: disable authn/z on insecure port
This is the old behaviour and we did not intent to change it due to enabled authn/z in general.
As the kube-apiserver this sets the "system:unsecured" user info.
2018-08-30 20:17:29 +02:00
Dr. Stefan Schimanski e209b643a7 kube-controller-manager: add test server and test serving 2018-08-30 20:16:39 +02:00
Dr. Stefan Schimanski 4cc3b2e6bb kube-controller-manager: enable secure loopback 2018-08-30 20:16:39 +02:00
Dr. Stefan Schimanski 5fa8b4b2ae kube-controller-manager: enable delegated authz/authn if secure port is enabled 2018-08-30 20:16:39 +02:00
Dr. Stefan Schimanski eb27b61cdb kube-controller-manager: enable secure ports 10257, deprecate insecure port 2018-08-30 20:16:39 +02:00
Kubernetes Submit Queue b315ecfe67
Merge pull request #67362 from stewart-yu/stewart-controller-manager-codeclean#02
Automatic merge from submit-queue. 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>.

*-controller-manager: output flags in logical sections

![image](https://user-images.githubusercontent.com/30410021/44071436-8e619e72-9fbb-11e8-84c5-72c1ff9767b6.png)

```
Print *-controller-manager --help flag help in sections.
```
2018-08-27 07:31:08 -07:00
yue9944882 a4f33a6a9f align imports for cmd 2018-08-27 21:50:15 +08:00
Kubernetes Submit Queue 663551bebd
Merge pull request #67252 from jbartosik/metric-sanitization
Automatic merge from submit-queue (batch tested with PRs 66916, 67252, 67794, 67619, 67328). 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>.

Fix HPA sample sanitization

**What this PR does / why we need it**: @mwielgus pointed out a case when HPA fails as a result of my changes to HPA algorithm:
- Have pods that use a lot of CPU during initilization, become ready right after they initialize,
- Trigger a scale up,
- When new pods become ready will will count their usage (even though it's not related to any work that needs doing),
- This triggers another scale up, even though existing pods can handle work, no problem.

The fix is:
- Use all samples for non-cpu metrics.
- Only use CPU samples if:
  - Pod is ready and was started more than 2 minutes ago, or
  - Pod is unready and last readiness change happened more than 10s after it was started.

Reasoning behind this in: https://docs.google.com/document/d/1UdtYedhmCxjaJIQi6hwJMY0eHQQKxlVD8lSHZC1BPOA/edit

**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
Replace scale up forbidden window with disregarding CPU samples collected when pod was initializing.
```
2018-08-24 15:25:07 -07:00
Joachim Bartosik 4fd6a1684d Make HPA more configurable
Duration of initialization taint on CPU and window of initial readiness
setting controlled by flags.

Adding API violation exceptions following example of e50340ee23
2018-08-24 13:13:02 +02:00
Mike Danese e68f14a249 jwt: support opaque signer and push errors to token generator creation 2018-08-23 12:21:56 -07:00
stewart-yu b0eb92cc52 auto-generated file 2018-08-20 20:03:37 +08:00
stewart-yu 6daaf5af77 [kube-controller-manager]output flags in logical sections 2018-08-20 20:03:35 +08:00
Dr. Stefan Schimanski c2724793e8 Update bazel 2018-08-17 08:57:21 +02:00
Dr. Stefan Schimanski 1d9a896066 apiserver: move controller-manager's insecure config into apiserver 2018-08-17 08:56:46 +02:00
Kubernetes Submit Queue c1f7df2b0e
Merge pull request #65309 from tnozicka/add-ds-recreate-backoff
Automatic merge from submit-queue (batch tested with PRs 62441, 66702, 67254, 67421, 65309). 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>.

Add backoff for DS's pod deletion to limit fighting with kubelet failing the pod repeatedly

**What this PR does / why we need it**:
Limits consequences of DS controller on hot loop fighting with 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 https://github.com/kubernetes/kubernetes/issues/65240

**Release note**:
```release-note
DaemonSet controller is now using backoff algorithm to avoid hot loops fighting with kubelet on pod recreation when a particular DaemonSet is misconfigured.
```

TODO:
 - [x] Export the backoff settings as args or constants
 - [x] Add test a case

/cc @mfojtik 
(Will add more folks when it's ready, to avoid spamming them.)
2018-08-15 15:30:27 -07:00
Tomas Nozicka b0b1629e8d Update Bazel 2018-08-15 16:03:42 +02:00
Tomas Nozicka 63656da296 Add backoff for DS's pod deletion to limit fighting with kubelet failing the pod repeatedly 2018-08-15 16:03:39 +02:00
Kubernetes Submit Queue 108bc499b7
Merge pull request #67358 from stewart-yu/stewart-controller-manager-codeclean
Automatic merge from submit-queue (batch tested with PRs 67347, 67307, 67358, 67364, 67385). 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>.

*-controller-manager: remove the redundancy import file

**What this PR does / why we need it**:
remove the redundancy import file

**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 #

**Special notes for your reviewer**:
remove the redundancy import file @deads2k  @mikedanese 

**Release note**:

```release-note
NONE
```
2018-08-15 04:23:18 -07:00
Lucas Käldström db855a2b2d
autogenerated 2018-08-14 19:02:18 +03:00
Lucas Käldström 4bef926218
Remove references to the config structs that have moved to their own shared packages 2018-08-14 19:02:06 +03:00
stewart-yu 982249110e [kube-controller manager]remove the redundancy import 2018-08-14 14:07:43 +08:00
Joachim Bartosik 8ef369ea2d Mark --horizontal-pod-autoscaler-upscale-delay deprecated 2018-08-01 17:59:51 +02:00
Joachim Bartosik 7681c284f5 Remove UpscaleForbiddenWindow
Instead discard metric values for pods that are unready and have never
been ready (they may report misleading values, the original reason for
introducing scale up forbidden window).

Use per pod metric when pod is:
- Ready, or
- Not ready but creation timestamp and last readiness change are more
  than 10s apart.

In the latter case we asume the pod was ready but later became unready.
We want to use metrics for such pods because sometimes such pods are
unready because they were getting too much load.
2018-08-01 17:47:23 +02:00
David Eads fb7d137ea2 add debug handler capability for individual controllers 2018-07-26 13:24:36 -04:00
Mike Danese efb8827215 pkg/controller: remove old clientbuilder methods
everything has moved to client-go now so these are the same as the
original Client* methods.
2018-07-17 09:06:59 -07:00
Kubernetes Submit Queue 5232ad4a00
Merge pull request #65917 from dims/remove-stray-comment-from-merge
Automatic merge from submit-queue (batch tested with PRs 64664, 65836, 65917). 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>.

remove stray comment from a merge

Signed-off-by: Davanum Srinivas <davanum@gmail.com>



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

Remove stray comment from a merge.

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-09 08:07:04 -07:00
Kubernetes Submit Queue 3155ea2a18
Merge pull request #65549 from gnufied/fix-flexvolume-containers
Automatic merge from submit-queue (batch tested with PRs 65456, 65549). 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>.

Fix flexvolume in containerized kubelets

Fixes flex volumes in containerized kubelets.

cc @jsafrane @chakri-nelluri @verult 

Note to reviewers : e2e tests pass in local containarized cluster. 

```release-note
Fix flexvolume in containarized kubelets
```
2018-07-09 06:24:06 -07:00
Kubernetes Submit Queue d1608c2ea1
Merge pull request #65856 from deads2k/controller-01-ignored
Automatic merge from submit-queue (batch tested with PRs 65897, 65909, 65856, 65815). 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>.

only need to ignore resources that match discovery conditions

GC and quota controllers ignore resources that are too expensive to manage.  In kube this is only events.  The incompatible resources should now be excluded on the basis of discovery.  We should actually reflect that in the RESTStorage (done for GC for events) and discovery too.

@liggitt 
@kubernetes/sig-api-machinery-bugs 

```release-note
NONE
```
2018-07-06 12:25:09 -07:00
Davanum Srinivas 1eccc2f5db
remove stray comment from a merge
Change-Id: Ie8f680a36241387e04e9602dd52aacbb3b3b1dc2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2018-07-06 14:07:20 -04:00
Kubernetes Submit Queue 43b59986f4
Merge pull request #65866 from sttts/sttts-ctrl-manager-stopch
Automatic merge from submit-queue (batch tested with PRs 64511, 65865, 65867, 65866). 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>.

kube-controller-manager: add stopCh plumbing

Needed for integration testing.
2018-07-05 13:01:18 -07:00
David Eads eacbd62925 only need to ignore resources that match discovery conditions 2018-07-05 10:29:58 -04:00
Dr. Stefan Schimanski 5843bfc6b1 kube-controller-manager: create self-signed certs 2018-07-05 15:53:42 +02:00
Dr. Stefan Schimanski 8686feea6d kube-controller-manager: add stopCh plumbing 2018-07-05 15:49:11 +02:00
Hemant Kumar 8db5328c4c Implement fixes for flexvolume when kubelet is contanerized
Fix bug with nsenter root path
2018-07-03 14:04:52 -04:00
Kubernetes Submit Queue 7dcac9d2a5
Merge pull request #65648 from sttts/sttts-k8s-metrics-codegen
Automatic merge from submit-queue (batch tested with PRs 65648, 65700, 64976, 65692, 65667). 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>.

k8s.io/metrics: normalize and fix codegen script

~~Builds on https://github.com/kubernetes/kubernetes/pull/65645. Will rebase when that one merges.~~ merged
2018-07-02 19:46:09 -07:00
Kubernetes Submit Queue 47020f3318
Merge pull request #65094 from hzxuzhonghu/le-client-timeout
Automatic merge from submit-queue (batch tested with PRs 65094, 65533, 63522, 65694, 65702). 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>.

set leader election client and renew timeout

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

set leader-election client timeout

set timeout for tryAcquireOrRenew

**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 #65090 #65257

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-02 18:19:05 -07:00
Kubernetes Submit Queue 7786bd8c9a
Merge pull request #64654 from atlassian/missing-error-handling
Automatic merge from submit-queue. 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>.

Add missing error handling in schema-related code

**What this PR does / why we need it**:
Adds missing error handling to a few places.

**Which issue(s) this PR fixes**
Updates #51457. Still more work to do to fix the issue - client generation code needs to be updated (addressed in https://github.com/kubernetes/kubernetes/pull/64664).

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

/kind bug
/sig api-machinery
2018-07-02 07:14:34 -07:00
Dr. Stefan Schimanski d79cf25497 Update external k8s.io/metrics imports 2018-07-02 10:44:18 +02:00
xuzhonghu 7c6213e922 set leader election client timeout 2018-06-29 10:32:31 +08:00
wojtekt 0950084137 Autogenerated stuff 2018-06-27 13:31:10 +02:00
wojtekt c79b54db9f Enable coordination api group 2018-06-27 13:30:13 +02:00
Mikhail Mazurskiy bfe313d5f3
Add missing error handling in schema-related code 2018-06-23 21:06:32 +10:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Kubernetes Submit Queue 571b9beac5
Merge pull request #57932 from atlassian/cancellable-leader-election
Automatic merge from submit-queue (batch tested with PRs 65256, 64236, 64919, 64879, 57932). 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>.

Cancellable leader election

**What this PR does / why we need it**:
Adds ability to cancel leader election. Useful in integration tests where the whole app is started and stopped in each test.

**Special notes for your reviewer**:
I used the `context` package - it is impossible/hard to achieve the same behaviour with just channels without spawning additional goroutines but it is trivial with `context`. See `acquire()` and `renew()` methods.

**Release note**:

```release-note
NONE
```
/kind enhancement
/sig api-machinery
2018-06-20 17:22:22 -07:00
stewart-yu 440a616644 auto-generated file 2018-06-19 17:58:48 +08:00
stewart-yu 4f06f9906f move some option struct from controller manager to kube-controller manager 2018-06-19 17:58:48 +08:00
Jordan Liggitt dd5dccc740
Move service account key file arg to the service-account controller options 2018-06-18 09:51:10 -04:00
Mikhail Mazurskiy e458cfe02c
Rename context 2018-06-09 13:06:23 +10:00
Mikhail Mazurskiy 102090d1f1
Use context.TODO() to be explicit that cancellation is not implemented 2018-06-07 14:33:03 +10:00
Mikhail Mazurskiy dc32a341c0
Cancellable leader election with context 2018-06-07 14:24:02 +10:00
Mikhail Mazurskiy 1d99fff1ac
Cancellable leader election with channels 2018-06-07 14:24:01 +10:00
lichuqiang bccc8fe979 Provision interface change 2018-06-05 16:35:16 +08:00
Kubernetes Submit Queue 0340864ae9
Merge pull request #64016 from stewart-yu/stewart-controller-manager-codeclean
Automatic merge from submit-queue (batch tested with PRs 57082, 64325, 64016, 64443, 64403). 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>.

should not ignore err when convert api version

**What this PR does / why we need it**:
should not ignore err when convert api version

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-30 18:49:17 -07:00
Kubernetes Submit Queue 5fe35cdbf9
Merge pull request #61419 from enisoc/apps-v1-deploy
Automatic merge from submit-queue (batch tested with PRs 62756, 63862, 61419, 64015, 64063). 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>.

Use apps/v1 Deployment/ReplicaSet in controller and kubectl

This updates the Deployment controller and integration/e2e tests to use apps/v1, as part of #55714.

This also requires updating any other components that use the `deployment/util` package, most notably `kubectl`. That means client versions 1.11 and above will only work with server versions 1.9 and above. This is well within our client-server version skew policy of +/-1 minor version.

However, this PR *only* updates the parts of `kubectl` that used `deployment/util`. So although kubectl now requires apps/v1, it still also depends on extensions/v1beta1. Migrating other parts of kubectl to apps/v1 is beyond the scope of this PR, which was just to change the Deployment controller and fix all the fallout.

```release-note
kubectl: This client version requires the `apps/v1` APIs, so it will not work against a cluster version older than v1.9.0. Note that kubectl only guarantees compatibility with clusters that are +/-1 minor version away.
```
2018-05-23 18:14:13 -07:00
stewart-yu 956bbfd1a6 should not ignore err when convert controllermanagerconfiguration api 2018-05-23 13:14:04 +08:00
Anthony Yeh e32a15558b
Use apps/v1 in Deployment controller. 2018-05-22 13:42:10 -07:00
stewart-yu 3d20f1a99c auto generated file 2018-05-18 10:23:38 +08:00
stewart-yu f21475ac95 modify kube-controller manager config struct to adapt option change 2018-05-18 10:23:38 +08:00
stewart-yu bbb48fd068 [kube-controller manager]get rid of GenericControllerManagerOptions sub-struct 2018-05-18 10:23:38 +08:00
Kubernetes Submit Queue 5a54555f59
Merge pull request #63049 from andrewsykim/kcm-nodeipam
Automatic merge from submit-queue (batch tested with PRs 63049, 59731). 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>.

re-enable nodeipam in kube-controller-manager

**What this PR does / why we need it**:
Re-enables nodeipam controller for external clouds. Also does a small refactor so that we don't need to pass in `allocateNodeCidr` into the controller. 

In v1.10 we made a change (9187b343e1 (diff-f11913dc67d80d36b3d06a93f61c49cf) in https://github.com/kubernetes/kubernetes/pull/57492) where nodeipam would be disabled for any cluster that sets `--cloud-provider=external`. The original intention behind this was that the nodeipam controller is cloud specific for some clouds (only GCE at the moment) so it should be moved to the CCM (cloud controller manager). After some discussions with wg-cloud-provider it makes sense to re-enable nodeipam controller in KCM and have GCE CCM enable its own cloud-specific IPAM controller as part of [Initialize()](https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/cloud.go#L33-L35). This would allow for GCE to run nodeipam in both KCM (by setting --cloud-provider=gce and --allocate-node-cidr) and in the CCM (once implemented in `Initialize()`) without disabling nodeipam in the KCM for all external clouds and avoids having to implement nodeipam in CCM. 

**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 # 

**Special notes for your reviewer**:


**Release note**:
```release-note
Re-enable nodeipam controller for external clouds. 
```
2018-05-11 11:07:12 -07:00
Shyam Jeedigunta 302af9bfe4 Remove 20x factor in garbage-collector qps 2018-05-10 12:21:57 +02:00
Kubernetes Submit Queue 51d75a7b1e
Merge pull request #63444 from deads2k/client-07-gc-dynamic
Automatic merge from submit-queue (batch tested with PRs 63526, 60371, 63444). 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>.

update garbage collection to use the new dynamic client

Update GC to use the new and easy to use dynamic client.  This is one of two remaining stragglers.

@kubernetes/sig-api-machinery-pr-reviews 
@caesarxuchao @ironcladlou 

```release-note
NONE
```
2018-05-08 15:24:11 -07:00
David Eads dd97a7bc59 move client based restmappers to client-go 2018-05-08 08:11:56 -04:00
David Eads cf4f7aab65 update garbage collection to use the new dynamic client 2018-05-07 09:01:39 -04:00
hzxuzhonghu 7f93d11f9e Add RESTMapper to ControllerContext and make it generic for controllers 2018-04-28 09:58:43 +08:00
Kubernetes Submit Queue 95841fe5ea
Merge pull request #63251 from liggitt/namespace-controller-qps
Automatic merge from submit-queue. 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>.

Bump QPS on namespace controller

https://github.com/kubernetes/kubernetes/pull/62913 switched from using a client pool, where each groupVersionResource got its own rest client, to a single client.

This increases the QPS to account for increased requests using a single rest client rate limiter.

Fixes #63240

```release-note
NONE
```
2018-04-27 10:06:56 -07:00
Jordan Liggitt 1bddcdcf44
Bump QPS on namespace controller
https://github.com/kubernetes/kubernetes/pull/62913 switched from using a client pool, where each groupVersionResource got its own rest client, to a single client.

This increases the QPS to account for increased requests using a single rest client rate limiter.
2018-04-27 10:11:14 -04:00
David Eads e2fc5cf259 remove versioning interface 2018-04-27 07:56:42 -04:00
David Eads a68c57155e remove KUBE_API_VERSIONS 2018-04-26 08:27:49 -04:00
David Eads 3632037e60 add easy to use dynamic client 2018-04-25 08:55:26 -04:00
andrewsykim 0a164760dc renable nodeipam in kube-controller-manager 2018-04-23 22:28:37 -04:00
Pavel Pospisil d3ddf7eb8b Always Start pvc-protection-controller and pv-protection-controller
After K8s 1.10 is upgraded to K8s 1.11 finalizer [kubernetes.io/pvc-protection] is added to PVCs
because StorageObjectInUseProtection feature will be GA in K8s 1.11.
However, when K8s 1.11 is downgraded to K8s 1.10 and the StorageObjectInUseProtection feature is disabled
the finalizers remain in the PVCs and as pvc-protection-controller is not started in K8s 1.10 finalizers
are not removed automatically from deleted PVCs and that's why deleted PVC are not removed from the system
but remain in Terminating phase.
The same applies to pv-protection-controller and [kubernetes.io/pvc-protection] finalizer in PVs.

That's why pvc-protection-controller is always started because the pvc-protection-controller removes finalizers
from PVCs automatically when a PVC is not in active use by a pod.
Also the pv-protection-controller is always started to remove finalizers from PVs automatically when a PV is not
Bound to a PVC.

Related issue: https://github.com/kubernetes/kubernetes/issues/60764
2018-04-20 19:54:50 +02:00
Kubernetes Submit Queue 0f3de97db9
Merge pull request #60270 from stewart-yu/splitFlag
Automatic merge from submit-queue (batch tested with PRs 61306, 60270, 62496, 62181, 62234). 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>.

split up the huge set of flags into smaller option structs

**What this PR does / why we need it**:
To make generic, we do following work:

1.  Spliting `KubeControllerManagerConfiguration` in kube-controller-manager and cloud-controller-manager into fewer smaller struct options order by controller, and modify relative flag. Also part of #59483.
2. Spliting `componentconfig` in controller-manager into fewer smaller config order by controller too.

All works follow #59582, using `option+config` logic.

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-13 15:03:07 -07:00
stewart-yu ea376c9c6f auto generated file 2018-04-13 08:57:40 +08:00
stewart-yu ec6399be53 split up the component config into smaller config 2018-04-13 08:40:54 +08:00
stewart-yu 75e39073a3 split KubeControllerManagerConfiguration into fewer options struct 2018-04-13 08:40:54 +08:00
Kubernetes Submit Queue 60c6d0e0ba
Merge pull request #60197 from hzxuzhonghu/controller-manager-handler-chain
Automatic merge from submit-queue (batch tested with PRs 60197, 61614, 62074, 62071, 62301). 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 controller-manager: turn Serve func into handlerchain builder

**What this PR does / why we need it**:
follow up #59582 fix
> turn Serve func into a handler chain builder https://github.com/kubernetes/kubernetes/pull/59582#discussion_r167258465

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-10 08:56:15 -07:00
Davanum Srinivas ba2778b17a Set leader-elect for kube-scheduler to true
Thanks to some great sleuthing by ikruglov!

kube-controller-manager defaults --leader-elect to true. We should
do the same for kube-scheduler. kube-scheduler used to have this
set to true, but it got lost during refactoring in:
efb2bb71cd
2018-03-30 10:52:01 -04:00
Kubernetes Submit Queue 1aa65a1894
Merge pull request #61365 from janetkuo/sts-controller-v1
Automatic merge from submit-queue (batch tested with PRs 60455, 61365, 61375, 61597, 61491). 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>.

Check apps/v1 StatefulSet available before starting its controller

**What this PR does / why we need it**: StatefulSet controller was bumped to use `apps/v1.StatefulSet` already. Without this change, StatefulSet controller will continue to work, but will be broken when `apps/v1beta2.StatefulSet` is removed or disabled. 

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-26 15:34:42 -07:00
Janet Kuo e1c3a711ea Check apps/v1 StatefulSet available before starting its controller 2018-03-19 13:59:10 -07:00
Anthony Yeh bb407944ee
ReplicaSet: Use apps/v1 RS in kube-controller-manager. 2018-03-19 13:38:25 -07:00
hzxuzhonghu 540a1de161 Refactor controller-manager: turn Serve func into handlerchain builder 2018-03-06 09:37:25 +08:00
Kubernetes Submit Queue b8c5bcf48a
Merge pull request #60291 from hzxuzhonghu/cloud-cm-use-healthz
Automatic merge from submit-queue (batch tested with PRs 60376, 55584, 60358, 54631, 60291). 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>.

cloud-controller-manager get /healthz to wait for apiserver to be healthy

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

currently cloud-controller-manager use `restclient.ServerAPIVersions()` to wait for apiserver to be healthy.
Remove ServerAPIVersions and make use of /healthz as all other components do.

**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 #60288

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-28 03:37:37 -08:00
hzxuzhonghu 97be082fb1 cloud-controller-manager get /healthz instead of calling restclient.ServerAPIVersions to wait for apiserver being healthy 2018-02-28 17:24:59 +08:00
Maciej Pytel 66f4f9080d Add external metrics client to HPA rest client 2018-02-27 14:10:29 +01:00
Kubernetes Submit Queue 3c2a0c84c5
Merge pull request #60054 from MikeSpreitzer/issue-60042-field
Automatic merge from submit-queue (batch tested with PRs 60054, 60202, 60219, 58090, 60275). 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>.

Fixes for HTTP/2 max streams per connection setting

**What this PR does / why we need it**:
This PR makes two changes.  One is to introduce a parameter
for the HTTP/2 setting that an api-server sends to its clients
telling them how many streams they may have concurrently open in
an HTTP/2 connection.  If left at its default value of zero,
this means to use the default in golang's HTTP/2 code (which
is currently 250; see https://github.com/golang/net/blob/master/http2/server.go).

The other change is to make the recommended options for an aggregated
api-server set this limit to 1000.  The limit of 250 is annoyingly low
for the use case of many controllers watching objects of Kinds served
by an aggregated api-server reached through the main api-server (in
its mode as a proxy for the aggregated api-server, in which it uses a
single HTTP/2 connection for all calls proxied to that aggregated
api-server).

**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 #60042

**Special notes for your reviewer**:

**Release note**:

```release-note
Introduced `--http2-max-streams-per-connection` command line flag on api-servers and set default to 1000 for aggregated API servers.
```
2018-02-23 23:15:33 -08:00
Kubernetes Submit Queue e833d6880e
Merge pull request #59883 from kow3ns/ds-cntrl-v1
Automatic merge from submit-queue (batch tested with PRs 59286, 59743, 59883, 60190, 60165). 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>.

DaemonSet Controller and tests to apps/v1

**What this PR does / why we need it**:
Updates the DaemonSet controller, its integration tests, and its e2e tests to use the apps/v1 API.

**Release note**:
```release-note
The DaemonSet controller, its integration tests, and its e2e tests, have been updated to use the apps/v1 API.
```
2018-02-23 20:09:35 -08:00
Kubernetes Submit Queue 0d777b16e0
Merge pull request #59719 from hzxuzhonghu/pprof-profiling
Automatic merge from submit-queue (batch tested with PRs 59463, 59719, 60181, 58283, 59966). 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>.

components pprof profiling make use of existing genericapiserver's

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

fix #60278

Instead of writing private pprof, all components make use of generic apiserver existing profiling.

**Release note**:

```release-note
NONE
```
2018-02-23 00:34:22 -08:00
Mike Spreitzer 201c11f147 Fixes for HTTP/2 max streams per connection setting
This PR makes two changes.  One is to introduce a parameter
for the HTTP/2 setting that an api-server sends to its clients
telling them how many streams they may have concurrently open in
an HTTP/2 connection.  If left at its default value of zero,
this means to use the default in golang's HTTP/2 code (which
is currently 250).

The other change is to make the recommended options for an aggregated
api-server set this limit to 1000.  The limit of 250 is annoyingly low
for the use case of many controllers watching objects of Kinds served
by an aggregated api-server reached through the main api-server (in
its mode as a proxy for the aggregated api-server, in which it uses a
single HTTP/2 connection for all calls proxied to that aggregated
api-server).

Fixes #60042
2018-02-22 16:31:21 -05:00
Kenneth Owens f52e7ef4bf Update the DaemonSet controller to use the apps/v1 API 2018-02-22 11:38:54 -08:00
Nikhita Raghunath 6fbe8157e3 add subresources for custom resources 2018-02-22 23:26:09 +05:30
hzxuzhonghu 398a0a9e66 update bazel 2018-02-22 16:43:13 +08:00
NickrenREN dad0fa07b7 rename StorageProtection to StorageObjectInUseProtection 2018-02-21 10:48:56 +08:00
Kubernetes Submit Queue 96ec318718
Merge pull request #59842 from ixdy/update-rules_go-02-2018
Automatic merge from submit-queue. 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>.

 Update bazelbuild/rules_go, kubernetes/repo-infra, and gazelle dependencies

**What this PR does / why we need it**: updates our bazelbuild/rules_go dependency in order to bump everything to go1.9.4. I'm separating this effort into two separate PRs, since updating rules_go requires a large cleanup, removing an attribute from most build rules.

**Release note**:

```release-note
NONE
```
2018-02-19 22:23:05 -08:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Davanum Srinivas 265e5ae085 Log the command line flags
With d7ddcca231, we lost the logging
of the flags. We should at least log what the command line flags
were used to start processes as those incredibly useful for trouble shooting.
2018-02-15 18:04:04 -05:00
Kubernetes Submit Queue 859d8761be
Merge pull request #59691 from NickrenREN/csi-feature-gate
Automatic merge from submit-queue. 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>.

Remove CSI plugin from ProbeExpandableVolumePlugins

Add CSI plugin when feature gate is enabled

**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 #

**Special notes for your reviewer**:

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

/sig storage

/assign @vladimirvivien
2018-02-13 15:03:12 -08:00
Dr. Stefan Schimanski 5483ab7679 Update generated files 2018-02-13 11:16:48 +01:00
Dr. Stefan Schimanski f4564ea0b8 controller-manager: add SecureServingOptions 2018-02-13 11:16:47 +01:00
stewart-yu 0cbe0a6034 controller-manager: switch to config/option struct pattern 2018-02-13 11:16:17 +01:00
Kubernetes Submit Queue f072871b07
Merge pull request #59359 from khenidak/svc-remove-sync
Automatic merge from submit-queue. 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>.

Remove controller-manager --service-sync-period flag

**What this PR does / why we need it**:
This PR removes controller manager --service-sync-period flag which is not used anywhere in the code and is causing confusion
 
**Which issue(s) this PR fixes** 
https://github.com/kubernetes/kubernetes/issues/58776

**Special notes for your reviewer**:
@deads2k this remove the flag as per the discussion on #58776 
2 commits 
1. one for code change
2. one for auto generated code

**Release note**:
```release-note
1. Controller-manager --service-sync-period flag is removed (was never used in the code).
```
2018-02-12 13:50:09 -08:00
NickrenREN 3f51a954ce nit: remove CSI plugin from ProbeExpandableVolumePlugins 2018-02-10 21:18:23 +08:00
Davanum Srinivas 3d43b446c4 Extract instantiation of cloud provider
Add a separate method in a new file for creating cloud providers.
Currently the code is all mixed into the controller manager. We
should actively control what is made available to the cloud provider
so list explicitly the parms needed and move the code out. This will
avoid linkages to sneak in as we will catch it better during reviews.
2018-02-08 08:15:41 -05:00
Kubernetes Submit Queue 5cecc6ec68
Merge pull request #59350 from jsafrane/recycler-wait
Automatic merge from submit-queue. 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>.

Do not recycle volumes that are used by pods

**What this PR does / why we need it**:
Recycler should wait until all pods that use a volume are finished.

Consider this scenario:

1. User creates a PVC that's bound to a NFS PV.
2. User creates a pod that uses the PVC
3. User deletes the PVC.

Now the PV gets `Released` (the PVC does not exists) and recycled, however the PV is still mounted to a running pod. PVC protection won't help us, because it puts finalizers on PVC that is under user's control and user can remove it.

This PR checks that there is no pod that uses a PV before it recycles it.

**Release note**:

```release-note
NONE
```

/sig storage
2018-02-07 10:01:32 -08:00
Khaled Henidak(Kal) f9c8d7de9c auto generated items
remove ServiceSyncPeriod from tests

fixing tests
2018-02-07 03:26:51 +00:00
Kubernetes Submit Queue 9ee71b720e
Merge pull request #59059 from smarterclayton/move_partial_object
Automatic merge from submit-queue (batch tested with PRs 59158, 38320, 59059, 55516, 59357). 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>.

Promote v1alpha1 meta to v1beta1

No code changes, just renames. We can discuss if there are any field / naming changes here or in a follow-up

Parent #58536
Fixes #53224
Prereq to #55637

@kubernetes/sig-api-machinery-pr-reviews @deads2k

```release-note
The `meta.k8s.io/v1alpha1` objects for retrieving tabular responses from the server (`Table`) or fetching just the `ObjectMeta` for an object (as `PartialObjectMetadata`) are now beta as part of `meta.k8s.io/v1beta1`.  Clients may request alternate representations of normal Kubernetes objects by passing an `Accept` header like `application/json;as=Table;g=meta.k8s.io;v=v1beta1` or `application/json;as=PartialObjectMetadata;g=meta.k8s.io;v1=v1beta1`.  Older servers will ignore this representation or return an error if it is not available.  Clients may request fallback to the normal object by adding a non-qualified mime-type to their `Accept` header like `application/json` - the server will then respond with either the alternate representation if it is supported or the fallback mime-type which is the normal object response.
```
2018-02-05 12:40:37 -08:00
Kubernetes Submit Queue ffda1e2200
Merge pull request #57017 from andyzhangx/azurefile-growsize
Automatic merge from submit-queue. 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>.

add PV size grow feature for azure file

**What this PR does / why we need it**:
According to kubernetes/features#284, add size grow feature for azure file

**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 #56462 

**Special notes for your reviewer**:
Since azure file is using SMB 3.0 protocal, there is no necessary to resize filesystem on agent side, the agent node will detect the changed size automatically.

**Release note**:

```
add size grow feature for azure file
```
/sig azure
@gnufied @rootfs @brendandburns
2018-02-05 11:25:48 -08:00
Khaled Henidak(Kal) 359d8191f9 Remove --service-sync-period flag which was not in use 2018-02-05 18:16:27 +00:00
Jan Safranek c96c0495f4 Pass pod informer to PV controller 2018-02-05 15:40:25 +01:00
Clayton Coleman d07a608607 Promote v1alpha1 meta to v1beta1
No code changes, just renames
2018-02-02 14:00:45 -05:00
NickrenREN 3fee293607 Add PV protection controller 2018-01-31 20:18:54 +08:00
NickrenREN 2a2f88b939 Rename PVCProtection feature gate so that PV protection can share the feature gate with PVC protection 2018-01-31 20:02:01 +08:00
andyzhangx fc988d429b initial work for azure file grow size implementation
enable azure file grow size

fix according to comments

fix comments

fix review comments

fix comments
2018-01-30 13:36:29 +00:00
Kubernetes Submit Queue c21173d0ea
Merge pull request #55792 from dhilipkumars/statefulset-appsv1
Automatic merge from submit-queue (batch tested with PRs 55792, 58342). 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>.

Promote Statefulset controller and its e2e tests to use apps/v1

**What this PR does / why we need it**: 
Promotes the statefulset controller to use to use the latest apps group [apps/v1](https://github.com/kubernetes/kubernetes/pull/53679)


**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/55714

**Special notes for your reviewer**:

* Listerexpansion for v1 `k8s.io/client-go/listers/apps/v1`  (was recently done for v1beta2)

* `v1beta2` && `v1` had `ObservedGeneration` as `int64` where as `v1beta1` and rest of the code (including conversion) is expecting `ObservedGeneration` to be  `*int64`

```
type StatefulSetStatus struct {
	// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
	// StatefulSet's generation, which is updated on mutation by the API Server.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
```

* for kubectl's `rollback` and `history` commands a couple functions have been duplicated to allow us to use `v1` version instead of `v1beta1` for statefulsets, while the older functions are still used by other controllers.  

We should be able to remove these duplicates once all the controllers are moved. 

If this aligns with the plan then i could move other controllers too. 

cc: @kow3ns 

**Release note**:

```release-note
NONE
```
2018-01-26 06:54:33 -08:00
Kubernetes Submit Queue 49532f59a6
Merge pull request #58791 from mikedanese/jwt0
Automatic merge from submit-queue (batch tested with PRs 58626, 58791). 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>.

serviceaccount: check token is issued by correct iss before verifying

Right now if a JWT for an unknown issuer, for any subject hits the
serviceaccount token authenticator, we return a errors as if the token
was meant for us but we couldn't find a key to verify it. We should
instead return nil, false, nil.

This change helps us support multiple service account token
authenticators with different issuers.

https://github.com/kubernetes/kubernetes/issues/58790

```release-note
NONE
```
2018-01-25 14:06:37 -08:00
Mike Danese 057b7af798 serviceaccount: check token is issued by correct iss before verifying
Right now if a JWT for an unknown issuer, for any subject hits the
serviceaccount token authenticator, we return a errors as if the token
was meant for us but we couldn't find a key to verify it. We should
instead return nil, false, nil.

This change helps us support multiple service account token
authenticators with different issuers.
2018-01-24 20:21:59 -08:00
David Eads 25238441fd uniquify resource lock identities 2018-01-18 11:31:43 -05:00
David Eads d7db324c38 make the controller manager create and use a valid cobra command 2018-01-18 07:54:36 -05:00
dhilipkumars aba725a391 Promote SS to apps/v1 2018-01-18 13:48:52 +05:30
Jordan Liggitt a371f3ba8e
Track run status explicitly rather than non-nil check on stopCh 2018-01-17 11:04:55 -05:00
wackxu cd02f168e6 use shared informers for TokenCleaner controller 2018-01-15 14:56:42 +08:00
Kubernetes Submit Queue 5043c7ecc5
Merge pull request #55706 from wackxu/bss
Automatic merge from submit-queue. 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>.

use shared informers for BootstrapSigner controller

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

fix TODO: Switch to shared informers

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-12 11:42:50 -08:00
wackxu 0ae647bf33 use shared informers for BootstrapSigner controller 2018-01-12 11:50:02 +08:00
David Eads f416e38a1e make controller port exposure optional 2018-01-09 15:54:39 -05:00
Walter Fender 9187b343e1 Split the NodeController into lifecycle and ipam pieces.
Prepatory work fpr removing cloud provider dependency from node
controller running in Kube Controller Manager. Splitting the node
controller into its two major pieces life-cycle and CIDR/IP
management. Both pieces currently need the the cloud system to do their work.
Removing lifecycles dependency on cloud will be fixed ina followup PR.

Moved node scheduler code to live with node lifecycle controller.
Got the IPAM/Lifecycle split completed. Still need to rename pieces.
Made changes to the utils and tests so they would be in the appropriate
package.
Moved the node based ipam code to nodeipam.
Made the relevant tests pass.
Moved common node controller util code to nodeutil.
Removed unneeded pod informer sync from node ipam controller.
Fixed linter issues.
Factored in  feedback from @gmarek.
Factored in feedback from @mtaufen.
Undoing unneeded change.
2018-01-04 12:48:08 -08:00
Kubernetes Submit Queue f4bfcba0c8
Merge pull request #56411 from supereagle/authentication-client-with-version
Automatic merge from submit-queue (batch tested with PRs 57651, 56411, 56779, 57523, 57624). 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>.

Use authentication client with explicit version

**What this PR does / why we need it**:
Authentication client without explicit version has been deprecated, change them to the one with explicit version.

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

**Special notes for your reviewer**:
/cc @caesarxuchao @sttts

**Release note**:
```release-note
NONE
```
2018-01-02 14:09:43 -08:00
Kubernetes Submit Queue f5d5d18b2c
Merge pull request #57340 from jmcmeek/jmcmeek_57044
Automatic merge from submit-queue. 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>.

Fix garbage collector when leader-elect=false

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

In a 1.8.x master with --leader-elect=false, the garbage collector controller
does not work.

When deleting a deployment with v1meta.DeletePropagationForeground, the deployment
had its deletionTimestamp set and a foreground Deletion finalizer was added,
but the deployment, rs and pod were not deleted.

This is an issue with how the garbage collector graph_builder behaves when the
stopCh=nil.  This PR creates a dummy stop channel for the garbage collector controller (and other
controllers started by the controller-manager) so that they can work more like they do when
when the controller-manager is configured with --leader-elect=true.

**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 #57044

**Special notes for your reviewer**:

**Release note**:

```release-note
Fix garbage collection when the controller-manager uses --leader-elect=false
```
2018-01-02 11:45:25 -08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Walter Fender 070a7b5823 Seperate loop and plugin control
Seperate loop and plugin control in the kube-controller-manager.
Adding an "--external-plugin" flag to specify a plugin to load when
cloud-provider is set to "external". Flag has no effect currently
when the cloud-provider is not set to external. The expectation is
that the cloud provider and external plugin flags would go away once
all cloud providers are on stage 2 cloud-controller-manager solutions.

Managing the control loops more directly based on start up flags.
Addressing issue brought up by @wlan0

Switched to using the main node controller in CCM.
Changes to enable full NodeController to start in CCM.
Fix related tests.
Unifying some common code between KCM and CCM.
Fix related tests and comments.
Folded in feedback from @jhorwit2 and @wlan0
2017-12-18 10:58:45 -08:00
John McMeeking 880a68ade6 Fix garbage collector when leader-elect=false
**What this PR does / why we need it**:

In a 1.8.x master with --leader-elect=false, the garbage collector controller
does not work.

When deleting a deployment with v1meta.DeletePropagationForeground, the deployment
had its deletionTimestamp set and a foreground Deletion finalizer was added,
but the deployment, rs and pod were not deleted.

This is an issue with how the garbage collector graph_builder behaves when the
stopCh=nil.  This PR creates a dummy stop channel for the garbage collector controller (and other
controllers started by the controller-manager) so that they can work more like they do when
when the controller-manager is configured with --leader-elect=true.

**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 #57044

**Special notes for your reviewer**:

**Release note**:
<!--  Write your release note:
1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string "action required".
2. If no release note is required, just write "NONE".
-->
```release-note
Garbage collection doesn't work when the controller-manager uses --leader-elect=false

```
2017-12-18 11:39:51 -06:00
Vladimir Vivien 179d8e108e CSI - feature gate fix, gated RBAC rules, csi nodeID label
This commit tracks chages to fix blocking bugs such as feature gates, rbac rules, usage
of csi nodeID to derive attachment ID.
2017-12-02 05:54:54 -05:00
supereagle 7dce7fe1eb use authentication client with explicit version 2017-11-27 22:13:19 +08:00
Kubernetes Submit Queue 04d1fcc9f3
Merge pull request #52049 from cheftako/ccm-cleanup
Automatic merge from submit-queue. 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>.

Fix failure to load volume plugins for #52048

Currently we have two plugin managers.
However one of them limits the cloud plugins it loads.
This means that if cloud provider is set to external the plugins will
not be loaded in *that* plugin manager. However they will be loaded in
the other instance of the plugin manager. So it does not actually save
us anything. It does hamper the efforts to actually get stage 1
separation working.

**What this PR does / why we need it**: It allows the plugins be found for the cloud providers working on stage 1 separation.

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

**Special notes for your reviewer**:

**Release note**:
```release-note NONE
```
2017-11-23 12:53:40 -08:00
jsafrane 4ad4ee3153 Added PVC Protection Controller
This controller removes protection finalizer from PVCs that are being
deleted and are not referenced by any pod.
2017-11-23 11:46:34 +01:00
Marek Grabowski ef6f0b8c6e generated 2017-11-22 18:40:09 +00:00
gmarek 69e2a9cb48 Add new Events API group 2017-11-22 18:40:09 +00:00
Vladimir Vivien c90a68c133 CSI - Generated source code
This commit tracks all auto-generated sources.
2017-11-21 20:21:04 -05:00
Vladimir Vivien dd08d1b489 CSI - API source code implementation
This commit tracks source code update for the CSI volume plugin implementation.
2017-11-21 20:20:58 -05:00
David Zhu e5aec8645d Changed GetAllZones to only get zones with nodes that are currently
running (renamed to GetAllCurrentZones). Added E2E test to confirm this
behavior.

Added node informer to cloud-provider controller to keep track of zones
with k8s nodes in them.
2017-11-20 16:04:18 -08:00
Mike Danese 2006fe524b certs: start deprecation of signing asset default paths 2017-11-16 14:09:29 -08:00
David Eads e52383c486 add clusterrole aggregation controller 2017-11-13 08:18:00 -05:00
David Eads a53e5de3db generated 2017-11-13 08:18:00 -05:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Kubernetes Submit Queue a701a42a82
Merge pull request #49763 from supereagle/versioned-group-clients
Automatic merge from submit-queue (batch tested with PRs 55331, 55272, 55228, 49763, 55242). 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>.

use versiond group clients from client-go

**What this PR does / why we need it**:
Some **Deprecated** group clients are still used, replace them with versioned group clients.

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

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

**Release note**:
```release-note
NONE
```
2017-11-08 17:13:27 -08:00
Kubernetes Submit Queue 42d5dc709e
Merge pull request #55259 from ironcladlou/gc-partial-discovery
Automatic merge from submit-queue. 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>.

Tolerate partial discovery in garbage collector

Allow the garbage collector to tolerate partial discovery failures. On a
partial failure, use whatever was discovered, log the failures, and
allow the resync logic to try again later.

Fixes #55022.

```release-note
API discovery failures no longer crash the kube controller manager via the garbage collector.
```

/cc @caesarxuchao
2017-11-07 18:53:51 -08:00
Dan Mace c3dd82c30c Tolerate partial discovery in garbage collector
Allow the garbage collector to tolerate partial discovery failures. On a
partial failure, use whatever was discovered, log the failures, and
allow the resync logic to try again later.

Fixes #55022.
2017-11-07 16:54:49 -05:00
Kubernetes Submit Queue 576c9118a6
Merge pull request #53592 from frodenas/bootstrap-controller
Automatic merge from submit-queue (batch tested with PRs 53592, 52562, 55175, 55213). 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>.

Check RegisterMetricAndTrackRateLimiterUsage error when starting BootstrapSigner & TokenCleaner controllers

**What this PR does / why we need it**:
Prevent `BootstrapSigner` and `TokenCleaner` controllers to start if `metrics.RegisterMetricAndTrackRateLimiterUsage` returns an error.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-11-07 11:21:15 -08:00
supereagle b694d51842 use versiond group clients from client-go 2017-11-07 14:47:22 +08:00