Commit Graph

31122 Commits (5a302f58a9a7eca9fd8bb5cb69f93d1c54e1ee3d)

Author SHA1 Message Date
k8s-ci-robot 020b1d5ff5
Merge pull request #68419 from xing-yang/apigroup
Make APIGroup optional in TypedLocalObjectReference
2018-09-13 06:13:17 -07:00
Pengfei Ni db470d37a4 Fix potential panic when getting azure load balancer status
The IP address and security group rules may be nil when the resources
are updating or deleting. Hence nil pointer deference may be happened
then.
2018-09-13 15:41:12 +08:00
Xing Yang 897e3c8d11 Add generated files 2018-09-12 17:34:51 -07:00
Xing Yang 6ec1ebd6ce Make APIGroup optional and modify validation 2018-09-12 17:05:29 -07:00
k8s-ci-robot 9b8b6571a2
Merge pull request #68521 from yujuhong/nil-client
kubelet: skip initializing/using the RuntimeClass in standalone mode
2018-09-12 15:05:12 -07:00
k8s-ci-robot 37ef6eeb6d
Merge pull request #68431 from dashpole/cadvisor_godep_update
Update cAdvisor godeps to v0.31.0
2018-09-12 15:04:53 -07: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
Yu-Ju Hong a1f7ae7ab3 kubelet: skip initializing/using the RuntimeClass in standalone mode
In standalone mode, kubelet will not be configured to talk to an
apiserver. The RuntimeClass manager should be disabled in this case.
2018-09-11 13:21:53 -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
ravisantoshgudimetla 1ee1e3b7b1 promote feature gate ScheduleDaemonSetPods to beta 2018-09-11 11:55:20 -04: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
k8s-ci-robot 36877dafe4
Merge pull request #68426 from verult/csi-informer-spam
Consolidated CSIDriver logic under CSIDriverRegistry flag
2018-09-10 20:26:29 -07: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
Cheng Xing 4ca39ef0ed Consolidated CSIDriver logic under CSIDriverRegistry flag 2018-09-10 13:34:40 -07:00
k8s-ci-robot 25cbd1c753
Merge pull request #67781 from dashpole/fix_priority_tests
Fix priority tests
2018-09-10 12:48:05 -07:00
David Ashpole 788196e45b update cadvisor to v0.31.0 2018-09-10 10:31:56 -07:00
Kubernetes Submit Queue ba33abd528
Merge pull request #68236 from andrewsykim/cloud-provider-updates
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.

update cloud provider deprecation notice

**What this PR does / why we need it**:
Updates cloud provider deprecation warning to clearly outline intentions set by sig cloud provider. 

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

**Special notes for your reviewer**:
also removed some extra white spaces

```release-note
NONE
```

/sig cloud-provider
cc @tpepper
2018-09-10 09:11:42 -07: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 8d1127cb41
Merge pull request #68199 from dims/deprecate-more-cloud-providers
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.

Deprecate cloudstack and ovirt controller projects

Change-Id: Icca9142940269ad1cd28f1f3491684a1bc626c55



**What this PR does / why we need it**:
Do we have folks invested in these providers trying to work on the external controllers for these providers? Is there a future for these providers? If not can we deprecate and eventually remove them?

**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**:
cc @ngtuna @sebgoa @svanharmelen (for cloudstack)
cc @simon3z 

**Release note**:

```release-note
Deprecate cloudstack and ovirt controllers
```
2018-09-08 18:28:35 -07:00
Kubernetes Submit Queue 60ec6bf359
Merge pull request #64867 from dixudx/missing_container_ready_ltt
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 missing LastTransitionTime of ContainerReady condition

**What this PR does / why we need it**:
add missing LastTransitionTime of ContainerReady condition

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

**Special notes for your reviewer**:
/cc freehan yujuhong

**Release note**:

```release-note
add missing LastTransitionTime of ContainerReady condition
```
2018-09-08 17:22:30 -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 10bde5090b
Merge pull request #68033 from yastij/instanceShutdown-azure
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 InstanceShutdownByProviderID for azure

**What this PR does / why we need it**: implements #66265

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Support NodeShutdown taint for azure
```
2018-09-08 10:43:34 -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
David Ashpole 90f58c1157 critical pod test should not rely on feature gate set in framework; non-critical pods are always preemptable 2018-09-07 17:43:42 -07:00
Yassine TIJANI 0048b0e8b7 implement InstanceShutdownByProviderID for azure 2018-09-07 21:11:15 +02: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 5c8ef7eb3b
Merge pull request #68320 from NickrenREN/localvolume-metricspath
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.

Fix metricsStatFS volume path for local volume

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

Fix metricsStatFS volume path for local volume

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

/kind bug
/sig storage
/assign @msau42
2018-09-06 21:41:17 -07:00
Cheng Xing becc6a9c19 Implemented logic in kubelet for registering node info, including wiring to CSINodeInfo; added unit tests for node updates; updated RBAC, NodeAuthorizer, NodeRestriction. 2018-09-06 19:16:51 -07:00
David Ashpole 137c6d638e remove feature gate from kubelet defaulting 2018-09-06 18:17:09 -07:00
Kubernetes Submit Queue 4bb3712a75
Merge pull request #68119 from WanLinghao/token_controller_cachekey_fix
Automatic merge from submit-queue (batch tested with PRs 68119, 68191). 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 token controller keyFunc bug

Currently, token manager use keyFunc like: `fmt.Sprintf("%q/%q/%#v", name, namespace, tr.Spec)`.
Since tr.Spec contains point fields, new token request would not reuse the cache at all.
This patch fix this, also adds unit test.

```release-note
NONE
```
2018-09-06 16:20:36 -07:00
Kubernetes Submit Queue 4da3bdc4eb
Merge pull request #64621 from RenaudWasTaken/pluginwatcher
Automatic merge from submit-queue (batch tested with PRs 68087, 68256, 64621, 68299, 68296). 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 plugin watcher registration mechanism

**Which issue(s) this PR fixes**: #64637

**Notes For Reviewers**:
The current API the plugin watcher exposes to kubelet is the following:
```golang
type RegisterCallbackFn func(pluginName string, endpoint string,
                             versions []string, socketPath string) (error, chan bool)	
```

The callback channel is here to signal the plugin watcher consumer when the plugin watcher API has notified the plugin of it's successful registration.
In other words the current lifecycle of a plugin is the following:
```
(pluginwatcher) GetInfo -> (pluginwatcher) NotifyRegistrationStatus -> (deviceplugin) ListWatch
```
Rather than
```
(pluginwatcher) GetInfo (race) -> (pluginwatcher) NotifyRegistrationStatus
                        (race) -> (deviceplugin) ListWatch
```

This PR changes the callback/channel mechanism to a more explicit, interfaced based contract (and more maintainable than a function to which we add more channels for more lifecycle events).

This PR also introduces three new states: {Init, Register, DeRegister}
```golang
// PluginHandler is an interface a client of the pluginwatcher API needs to implement in
// order to consume plugins
// The PluginHandler follows the simple following state machine:
//
//                         +--------------------------------------+
//                         |            ReRegistration            |
//                         | Socket created with same plugin name |
//                         |                                      |
//                         |                                      |
//    Socket Created       v                                      +        Socket Deleted
// +------------------> Validate +----------> Init +---------> Register +------------------> DeRegister
//                         +                   +                                                +
//                         |                   |                                                |
//                         | Error             | Error                                          |
//                         |                   |                                                |
//                         v                   v                                                v
//                        Out                 Out                                              Out
//
// The pluginwatcher module follows strictly and sequentially this state machine for each *plugin name*.
// e.g: If you are Registering a plugin foo, you cannot get a DeRegister call for plugin foo
//      until the Register("foo") call returns. Nor will you get a Validate("foo", "Different endpoint", ...)
//      call until the Register("foo") call returns.
//
// ReRegistration: Socket created with same plugin name, usually for a plugin update
// e.g: plugin with name foo registers at foo.com/foo-1.9.7 later a plugin with name foo
//      registers at foo.com/foo-1.9.9
//
// DeRegistration: When ReRegistration happens only the deletion of the new socket will trigger a DeRegister call

type PluginHandler interface {
        // Validate returns an error if the information provided by
        // the potential plugin is erroneous (unsupported version, ...)
        ValidatePlugin(pluginName string, endpoint string, versions []string) error
        // Init starts the plugin (e.g: contact the gRPC client, gets plugin
        // specific information, ...) but if another plugin with the same name
        // exists does not switch to the newer one.
        // Any error encountered here can still be Notified to the plugin.
        InitPlugin(pluginName string, endpoint string) error
        // Register is called once the pluginwatcher has notified the plugin
        // of its successful registration.
        // Errors at this point can no longer be bubbled up to the plugin
        RegisterPlugin(pluginName, endpoint string)
        // DeRegister is called once the pluginwatcher observes that the socket has
        // been deleted.
        DeRegisterPlugin(pluginName string)
}
```

```release-note
NONE
```
/sig node
/area hw-accelerators

/cc @jiayingz @vikaschoudhary16 @vishh @vladimirvivien @sbezverk @figo (ccing the main reviewers of the original PR, feel free to cc more people)
2018-09-06 14:49:39 -07: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
WanLinghao 794e665d7b Currently, token manager use keyFunc like: `fmt.Sprintf("%q/%q/%#v", name, namespace, tr.Spec)`.
Since tr.Spec contains point fields, new token request would not reuse
the cache at all.  This patch fix this, also adds unit test.

Signed-off-by: Mike Danese <mikedanese@google.com>
2018-09-06 09:03:26 -07:00
Renaud Gaubert 8dd1d27c03 Updated the device manager pluginwatcher handler 2018-09-06 15:34:46 +02:00
Renaud Gaubert 78b55eb5bf Updated the CSI pluginwatcher handler 2018-09-06 15:34:46 +02:00
Renaud Gaubert 29d225e90c Update pluginwatcher tests 2018-09-06 14:44:03 +02:00
Renaud Gaubert 4d18aa63cd Refactor pluginwatcher to use the new API 2018-09-06 14:42:21 +02:00
Renaud Gaubert 2eb91e89c0 Update the plugin watcher interface 2018-09-06 14:42:21 +02:00
Lucas Käldström 869d74f63c
autogenerated bazel 2018-09-06 15:03:44 +03:00
Kubernetes Submit Queue e5f55dd9d0
Merge pull request #68239 from cuppett/issue-59015
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.

Resolves #59015, Scheduler: Add support for EBS types t3, r5, & z1d

Fixes #59015

The new t3, r5, r5d and z1 need matched as well according to this:

From current AWS documentation:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html

T3, C5, C5d, M5, M5d, R5, R5d, and z1d instances support a maximum of
28 attachments, and every instance has at least one network interface
attachment. If you have no additional network interface attachments on
these instances, you could attach 27 EBS volumes.

**Release note**:

```NONE

```
2018-09-06 04:23:56 -07:00
Lucas Käldström 83d53ea1c2
Standardize componentconfig code/comment patterns 2018-09-06 13:42:02 +03:00
Kubernetes Submit Queue 4bc9e94fee
Merge pull request #67690 from feiskyer/iptables-cross
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.

Kubelet: only sync iptables on linux

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

Iptables is only supported on Linux, kubelet should only sync NAT rules on Linux.

Without this PR, Kubelet on Windows would logs following errors on each `syncNetworkUtil()`:

```
kubelet.err.log:4692:E0711 22:03:42.103939    2872 kubelet_network.go:102] Failed to ensure that nat chain KUBE-MARK-DROP exists: error creating chain "KUBE-MARK-DROP": executable 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 #65713

**Special notes for your reviewer**:

**Release note**:

```release-note
Kubelet now only sync iptables on Linux.
```
2018-09-05 22:55:15 -07:00
Kubernetes Submit Queue 4465858afd
Merge pull request #67911 from ixdy/update-bazel-deps
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.

Update bazel deps

**What this PR does / why we need it**: updates relevant bazel dependencies to pull in minor feature enhancements and bug fixes:
* rules_go 0.15.3: some speed improvements and better compatibility on Windows and Mac, among other bugfixes / enhancements
* repo-infra: fixes needed to support rules_go 0.15.1, and also a fix for https://github.com/kubernetes/kubernetes/pull/65501#issuecomment-400761696
* rules_docker v0.5.1: various enhancements/fixes, but we need this to support new manifest lists from upstream
* busybox latest: we last updated this a while ago. since Docker hub now uses manifest lists for core images like this, we needed the rules_docker update
* gazelle 0.14.0: among other enhancements, adds a feature to remove the need to build protoc for every build, which we aren't even using.

**Special notes for your reviewer**:
Depends on https://github.com/kubernetes/repo-infra/pull/81. I believe we also need bazel 0.16+.

**Release note**:

```release-note
NONE
```
2018-09-05 21:48:36 -07:00
Kubernetes Submit Queue c3062bae21
Merge pull request #68233 from luxas/ccm_cleanup
Automatic merge from submit-queue (batch tested with PRs 68171, 67945, 68233). 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.

Move the CloudControllerManagerConfiguration to an API group in `cmd/`

**What this PR does / why we need it**:
This PR is the last piece of https://github.com/kubernetes/kubernetes/issues/67233.
It moves the `CloudControllerManagerConfiguration` to its own `cloudcontrollermanager.config.k8s.io` config API group, but unlike the other components this API group is "private" (only available in `k8s.io/kubernetes`, which limits consumer base), as it's located entirely in `cmd/` vs a staging repo.
This decision was made for now as we're not sure what the story for the ccm loading ComponentConfig files is, and probably a "real" file-loading ccm will never exist in core, only helper libraries. Eventually the ccm will only be a library in any case, and implementors will/can use the base types the ccm library API group provides. It's probably good to note that there is no practical implication of this change as the ccm **cannot** read ComponentConfig files. Hencec the code move isn't user-facing.

With this change, we're able to remove `pkg/apis/componentconfig`, as this was the last consumer. That is hence done in this PR as well (so the move is easily visible in git, vs first one "big add" then a "big remove"). The only piece of code that was used was the flag helper structs, so I moved them to `pkg/util/flag` that I think makes sense for now.

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

**Special notes for your reviewer**:

This PR builds on top of (first two commits, marked as `Co-authored by: @stewart-yu`) https://github.com/kubernetes/kubernetes/pull/67689

**Release note**:

```release-note
NONE
```
/assign @liggitt @sttts @thockin @stewart-yu
2018-09-05 21:36:41 -07:00
NickrenREN e03635e02c fix metricsStatFS volume path for local volume 2018-09-06 11:38:06 +08:00
Stephen Cuppett d85daf0f4c Resolves #59015, extends existing regex to cover t3, r5(d) & z1d instance types
From current AWS documentation:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html

T3, C5, C5d, M5, M5d, R5, R5d, and z1d instances support a maximum of
28 attachments, and every instance has at least one network interface
attachment. If you have no additional network interface attachments on
these instances, you could attach 27 EBS volumes.
2018-09-05 21:24:09 -04:00