Commit Graph

30898 Commits (63ce112d9e1cee3afcc16c07e90d7ea188652f62)

Author SHA1 Message Date
FengyunPan2 641693ad05 Make OpenStack cloud provider report a node hostname address
Related to: #67714
Cloud-provider-reported addresses are authoritative in 1.12, this
preserves default behavior that used the internal dns name as
the "Hostname" address on Node status.
2018-08-23 13:20:47 +08:00
Pengfei Ni 8e4ab129e9 Fix panic when choosing zone or zones for volume 2018-08-23 10:46:41 +08:00
Kubernetes Submit Queue 5a16163c87
Merge pull request #66936 from jennybuckley/dry-run-webhooks
Automatic merge from submit-queue (batch tested with PRs 67576, 66936). 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>.

Support dry run in admission webhooks

**What this PR does / why we need it**:
Follow up to https://github.com/kubernetes/kubernetes/pull/66391
- [x] add DryRun to ```admission.k8s.io/v1beta1.AdmissionReview```
- [x] add DryRunnable to ```admissionregistration.k8s.io/v1beta1.(Valid|Mut)atingWebhookConfiguration```
- [x] add dry run support to (Valid|Mut)atingAdmissionWebhook

Includes all the api-changes outlined by https://github.com/kubernetes/community/pull/2387

/sig api-machinery

**Release note**:
```release-note
To address the possibility dry-run requests overwhelming admission webhooks that rely on side effects and a reconciliation mechanism, a new field is being added to admissionregistration.k8s.io/v1beta1.ValidatingWebhookConfiguration and admissionregistration.k8s.io/v1beta1.MutatingWebhookConfiguration so that webhooks can explicitly register as having dry-run support. If a dry-run request is made on a resource that triggers a non dry-run supporting webhook, the request will be completely rejected, with "400: Bad Request". Additionally, a new field is being added to the admission.k8s.io/v1beta1.AdmissionReview API object, exposing to webhooks whether or not the request being reviewed is a dry-run.
```
2018-08-22 19:41:58 -07:00
Pengfei Ni 5b5101b563 Add unit tests for GetNodeResourceGroup and GetResourceGroups 2018-08-23 10:38:40 +08:00
Pengfei Ni 5fdc7154f2 Only set nodeSelectorTerms when there are zoned nodes 2018-08-23 10:37:57 +08:00
Kubernetes Submit Queue 687553a47a
Merge pull request #67576 from yue9944882/externalize-secret-serviceaccount-informer
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>.

Externalize serviceaacount admission controller

ref: #66680

this pull externalizes serviceaccount admission controller in which secret & serviceaccount informers will be completely replaced.

/sig api-machinery

**Release note**:

```release-note
NONE
```
2018-08-22 19:19:07 -07:00
Doug MacEachern 191d9ced30 update bazel 2018-08-22 18:49:15 -07:00
Doug MacEachern 11af6932e5 vsphere: add tests for Cloud Provider Zones implementation
- Add tests for GetZones()

- Fix bug where a host tag other than region or zone caused an error

- Fix bug where GetZones() errored if zone tag was set, but region was not

Follow up to PR #66795 / towards #64021
2018-08-22 18:47:30 -07:00
Kubernetes Submit Queue 70e7a7d189
Merge pull request #63512 from awly/gce-provider-dns-names
Automatic merge from submit-queue (batch tested with PRs 66973, 67704, 67722, 67723, 63512). 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>.

Populate internal DNS names in GCE provider

Both VM name and hostname are internally routable.

**What this PR does / why we need it**: GCE cloud provider only populated IP addresses for instances. This PR adds internal DNS names. DNS names are used e.g. in kubelet server certificates (5b77996433/pkg/kubelet/kubelet.go (L385))

**Release note**:
```release-note
NONE
```
2018-08-22 18:20:34 -07:00
Kubernetes Submit Queue 0198e3a311
Merge pull request #67722 from dougm/vcp-zones
Automatic merge from submit-queue (batch tested with PRs 66973, 67704, 67722, 67723, 63512). 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>.

godeps: update vmware/govmomi

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

Update required to continue work on #64021

- The govmomi tag API changed

- Pulling in the new vapi/simulator package for testing the VCP Zones impl

**Release note**:

```release-note
NONE
```
2018-08-22 18:20:27 -07:00
Tim Allclair 87164e0b32 Generated code 2018-08-22 17:00:53 -07:00
jennybuckley c0bf542796 Prevent side effects on dryrun in service registry 2018-08-22 16:57:44 -07:00
jennybuckley c61eac7daa Update generated 2018-08-22 16:54:41 -07:00
jennybuckley 2d0ec48f9b Support dry run in admission webhooks 2018-08-22 16:26:47 -07:00
Kubernetes Submit Queue 4e76bb487e
Merge pull request #58679 from CaoShuFeng/admission_webhook
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>.

support annotations for admission webhook

Depends on: https://github.com/kubernetes/kubernetes/pull/58143
**Release note**:
```release-note
Support annotations for remote admission webhooks.
```
2018-08-22 15:31:34 -07:00
Tim Allclair 7f64bb649b WIP: RC pods 2018-08-22 14:26:51 -07:00
Kubernetes Submit Queue 20ef0f5db9
Merge pull request #67698 from soltysh/fix_create
Automatic merge from submit-queue (batch tested with PRs 63757, 67698, 67712, 67494, 67700). 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 NameFromCommandArgs when passing command after -- 

**What this PR does / why we need it**:
This fixes `kubectl create deployment name --image=xyz -- mycommand` invocation. Currently the `NameFromCommandArgs` is unnecessarily parsing arguments after `--`. 

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

**Release note**:
```release-note
None
```
2018-08-22 14:17:18 -07:00
Kubernetes Submit Queue e98bf0fb52
Merge pull request #63757 from nak3/disruptedPods-optional
Automatic merge from submit-queue (batch tested with PRs 63757, 67698, 67712, 67494, 67700). 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>.

Make DisruptedPods in PodDisruptionBudgetStatus optional field

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

Please refer to https://github.com/kubernetes/kubernetes/issues/63756

**Which issue(s) this PR fixes**

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

**Release note**:

```release-note
NONE
```
2018-08-22 14:17:14 -07:00
Andrew Lytvynov 50e9407951 Populate internal DNS names in GCE provider
Both VM name and hostname are internally routable.
2018-08-22 16:12:51 -04:00
Doug MacEachern d4d5c1e7db vsphere: adjust to govmomi tags API changes 2018-08-22 11:22:24 -07:00
Doug MacEachern 5816a8bc18 godeps: update vmware/govmomi
Update required to continue work on #64021

- The govmomi tag API changed

- Pulling in the new vapi/simulator package for testing the VCP Zones impl
2018-08-22 11:11:11 -07:00
Jordan Liggitt 0a5f0127e1
Make aws cloud provider report a node hostname address 2018-08-22 13:29:56 -04:00
Kubernetes Submit Queue 4e19d6820d
Merge pull request #67682 from kevinburke/fix-typo
Automatic merge from submit-queue (batch tested with PRs 66229, 67682, 67585, 67641, 67697). 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>.

pkg/kubectl: fix spelling mistake

**Release note**:
```release-note
NONE
```
2018-08-22 10:04:10 -07:00
Kubernetes Submit Queue 24dc2b4204
Merge pull request #66229 from WanLinghao/indentReove
Automatic merge from submit-queue (batch tested with PRs 66229, 67682, 67585, 67641, 67697). 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>.

clean unused function

**What this PR does / why we need it**:
clean unused function
**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-08-22 10:04:07 -07:00
Jordan Liggitt 24b639afcc
Make kubectl create secret tls work with process substitution 2018-08-22 10:35:07 -04:00
Kubernetes Submit Queue 5fb32e703b
Merge pull request #67615 from rphillips/fixes/attach_func_initializer
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>.

attach: Move the AttachFunc default function to the initializer

Fixes a partially constructed AttachOptions

**What this PR does / why we need it**: NewAttachOptions partially constructs an AttachOptions structure. The defaultAttachFunc should be set automatically, so the caller can potentially override the default behavior.

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

/cc @kubernetes/sig-cli-api-reviews
2018-08-22 07:32:57 -07:00
Jonathan Hall 2a24e37378 Add missing word to help text and remove double spaces 2018-08-22 16:08:40 +02:00
Antoine Pelisse a3417fe62c diff: Fix crash when remote object doesn't exist
Since we're saving nil in an interface rather than the implementation,
we can't compare to nil to check if the remote object exists or
not. Change the struct to save in the implementation.
2018-08-22 06:36:29 -07:00
Maciej Szulik ace8386d13
Get rid of argsLenAtDash in create job 2018-08-22 15:23:15 +02:00
Maciej Szulik 59fc12006b
Fix NameFromCommandArgs when passing command after -- 2018-08-22 15:23:13 +02:00
Kenjiro Nakayama c0eedf775e Make DisruptedPods in PodDisruptionBudgetStatus optional field 2018-08-22 21:59:37 +09:00
Dr. Stefan Schimanski d8bf802b66 kube-apiserver: create always configmap/extension-apiserver-authentication
Other components read the configmap and fail if it does not exist. Possibly not
every cluster has a client-ca or a request-header-ca.
2018-08-22 12:36:13 +02:00
Krzysztof Jastrzebski 7ffa4e17e0 Reduce latency to node ready after CIDR is assigned. 2018-08-22 10:43:58 +02:00
Kubernetes Submit Queue c491d48cde
Merge pull request #67430 from choury/cpumanager
Automatic merge from submit-queue (batch tested with PRs 67430, 67550). 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>.

cpumanager: rollback state if updateContainerCPUSet failed

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

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

If `updateContainerCPUSet`  failed, the container will start failed. We should rollback the state to avoid CPU leak.
**Special notes for your reviewer**:

**Release note**:

```release-note
cpumanager: rollback state if updateContainerCPUSet failed
```
2018-08-21 23:20:58 -07:00
Kubernetes Submit Queue 444373b404
Merge pull request #67599 from neolit123/owners-kubelet
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 labels to kubelet OWNERS files

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

This change makes it possible to automatically add the two labels: `area/kubelet` to PRs that touch the paths in question.

this already exists for kubeadm:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/OWNERS#L17-L19

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

**Special notes for your reviewer**:
none

**Release note**:

```release-note
NONE
```
/area kubelet
@kubernetes/sig-node-pr-reviews
2018-08-21 21:10:28 -07:00
Kubernetes Submit Queue 800615ab8f
Merge pull request #67485 from linyouchong/pr-0816
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 incorrect comment

**What this PR does / why we need it**:
These code did not Update the revisions labels, the comment is incorrect
```
                // Update the revisions name and labels
		clone.Name = ControllerRevisionName(parent.GetName(), hash)
		ns := parent.GetNamespace()
		created, err := rh.client.AppsV1().ControllerRevisions(ns).Create(clone)
```

**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**:
NONE
**Release note**:
```
NONE
```

/kind cleanup
/release-note-none
/sig apps
2018-08-21 21:10:05 -07:00
liangwei 5ea138f4e9 remove rescheduler 2018-08-22 11:49:14 +08:00
yue9944882 17306b540b externalize serviceaacount admission controller
remove unused internal serviceaccount util
2018-08-22 11:41:54 +08:00
Kubernetes Submit Queue ce8a6285df
Merge pull request #67635 from nikhita/customresource-subresource-patch-04
Automatic merge from submit-queue (batch tested with PRs 67298, 67518, 67635, 67673). 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 unstructured metadata accessors to respect omitempty semantics

Fixes #67541
Fixes #48211 
Fixes #49075
Follow up of #67562

`ObjectMeta` has fields with `omitempty` json tags. This means that when the fields have zero values, they should not be persisted in the object.

Before this PR, some of the metadata accessors for unstructured objects did not respect these semantics i.e they would persist a field even if it had a zero value.

This PR updates the accessors so that the field is removed from the unstructured object map if it contains a zero value.

/sig api-machinery
/kind bug
/area custom-resources
/cc sttts liggitt yue9944882 roycaihw 
/assign sttts liggitt 

**Release note**:

```release-note
NONE
```
2018-08-21 18:33:07 -07:00
Kubernetes Submit Queue 7cd140aa4f
Merge pull request #67518 from tallclair/runtimeclass-cri
Automatic merge from submit-queue (batch tested with PRs 67298, 67518, 67635, 67673). 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 RuntimeHandler to the CRI RunPodSandboxRequest

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

Adds the CRI portion of the [RuntimeClass](https://github.com/kubernetes/community/blob/master/keps/sig-node/0014-runtime-class.md#runtime-handler) API.

**Which issue(s) this PR fixes**:
For https://github.com/kubernetes/features/issues/585

**Special notes for your reviewer**:
The Kubernetes API is still blocked on a decision about alpha field usage, see [discussion on sig-architecture](https://groups.google.com/forum/#!topic/kubernetes-sig-architecture/y9FulL9Uq6A). I'd like to start with the CRI piece so we can unblock work on the CRI implementation side to have support ready when Kubernetes support is there.

**Release note**:
```release-note
[CRI] Adds a "runtime_handler" field to RunPodSandboxRequest, for selecting the runtime configuration to run the sandbox with (alpha feature).
```

/sig node
/milestone v1.12
/priority important-soon
/kind api-change
2018-08-21 18:33:04 -07:00
Kubernetes Submit Queue 70bc7f6877
Merge pull request #67298 from sylr/logging-calltrace
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>.

Log real file's name and line

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

Have correct location of emission in the logs

**Release note**:

pkg/kubectl/util/logs & staging/src/k8s.io/apiserver/pkg/util/logs
use `glog.info(...)` but this function is not made to be wrapped because
the underlying mechanism use a fixed call trace length to determine
where the log has been emited.

This results is having `logs.go:49` in the logs which is in the body
of the wrapper function and thus useless.

Instead use `glog.infoDepth(1, ...)` which tells the underlying mechanism
to go back 1 more level in the call trace to determine where the log
has been emitted.
2018-08-21 17:38:46 -07:00
Kevin Burke c6c23daafb
pkg/kubectl: fix spelling mistake 2018-08-21 16:27:32 -07:00
Kubernetes Submit Queue f077d6736b
Merge pull request #67658 from soltysh/staging_cli_runtime
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>.

Create cli-runtime staging repository

**What this PR does / why we need it**:
This PR creates a designated repository for CLI helpers, which are used for:
- kubectl itself
- kubectl plugins
- commands that want to mimic kubectl behavior

/assign @deads2k @juanvallejo 
@seans3 @pwittrock fyi

**Release note**:
```release-note
Create cli-runtime staging repository
```
2018-08-21 16:20:55 -07:00
Lubomir I. Ivanov 1a1d236f61 Add labels to kubelet OWNERS files 2018-08-22 00:43:32 +03:00
Lubomir I. Ivanov 21dd03dcbc add labels to kubectl OWNERS files 2018-08-22 00:40:54 +03:00
Kubernetes Submit Queue c94ececccc
Merge pull request #67672 from dims/add-labels-to-owners-files
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 Labels to various OWNERS files

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

Will reduce the burden of manually adding labels. Information pulled
from:
https://github.com/kubernetes/community/blob/master/sigs.yaml

Change-Id: I17e661e37719f0bccf63e41347b628269cef7c8b

**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-08-21 14:37:21 -07:00
Kubernetes Submit Queue 473ebb21d1
Merge pull request #67632 from feiskyer/verbose-fix
Automatic merge from submit-queue (batch tested with PRs 67661, 67497, 66523, 67622, 67632). 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>.

Reduce verbose logs of node addresses requesting

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

Kubelet build from the master branch is flushing node addresses requesting logs, which is too verbose:

```sh
Aug 16 10:09:40 node-1 kubelet[24217]: I0816 10:09:40.658479   24217 cloud_request_manager.go:97] Requesting node addresses from cloud provider for node "node-1"
Aug 16 10:09:40 node-1 kubelet[24217]: I0816 10:09:40.666114   24217 cloud_request_manager.go:116] Node addresses from cloud provider for node "node-1" collected
Aug 16 10:09:50 node-1 kubelet[24217]: I0816 10:09:50.666357   24217 cloud_request_manager.go:97] Requesting node addresses from cloud provider for node "node-1"
Aug 16 10:09:50 node-1 kubelet[24217]: I0816 10:09:50.674322   24217 cloud_request_manager.go:116] Node addresses from cloud provider for node "node-1" collected
Aug 16 10:10:01 node-1 kubelet[24217]: I0816 10:10:00.674644   24217 cloud_request_manager.go:97] Requesting node addresses from cloud provider for node "node-1"
Aug 16 10:10:01 node-1 kubelet[24217]: I0816 10:10:00.682794   24217 cloud_request_manager.go:116] Node addresses from cloud provider for node "node-1" collected
Aug 16 10:10:10 node-1 kubelet[24217]: I0816 10:10:10.683002   24217 cloud_request_manager.go:97] Requesting node addresses from cloud provider for node "node-1"
Aug 16 10:10:10 node-1 kubelet[24217]: I0816 10:10:10.689641   24217 cloud_request_manager.go:116] Node addresses from cloud provider for node "node-1" collected
Aug 16 10:10:20 node-1 kubelet[24217]: I0816 10:10:20.690006   24217 cloud_request_manager.go:97] Requesting node addresses from cloud provider for node "node-1"
Aug 16 10:10:20 node-1 kubelet[24217]: I0816 10:10:20.696545   24217 cloud_request_manager.go:116] Node addresses from cloud provider for node "node-1" collected
```

This PR sets them to level 5.

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

/cc @ingvagabund
2018-08-21 13:00:13 -07:00
Kubernetes Submit Queue 1c01372524
Merge pull request #67622 from thockin/dns-for-headless-svc-without-ports
Automatic merge from submit-queue (batch tested with PRs 67661, 67497, 66523, 67622, 67632). 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>.

Allow headless svc without ports to have endpoints

As cited in
https://github.com/kubernetes/dns/issues/174 - this is documented to
work, and I don't see why it shouldn't work.  We allowed the definition
of headless services without ports, but apparently nobody tested it very
well.

Manually tested clusterIP services with no ports - validation error.

Manually tested services with negative ports - validation error.

New tests failed, output inspected and verified.  Now pass.

xref https://github.com/kubernetes/dns/issues/174

**Release note**:
```release-note
Headless Services with no ports defined will now create Endpoints correctly, and appear in DNS.
```
2018-08-21 13:00:09 -07:00
Kubernetes Submit Queue 138fdc3d77
Merge pull request #67497 from yue9944882/refactor/externalize-node-informer-clientset
Automatic merge from submit-queue (batch tested with PRs 67661, 67497, 66523, 67622, 67632). 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>.

Externalize node informers for node authz

the pull will completely externalize node authz together with #67194

ref: #66680

**Release note**:

```release-note
NONE
```
2018-08-21 13:00:01 -07:00
Kubernetes Submit Queue 1a27e69a39
Merge pull request #67661 from ipuustin/conn-close
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>.

device manager: don't do operations on nil pointer

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

In the device plugin stub, if `grpc.DialContext()` fails, a `nil` connection is returned. Check the
error before calling `conn.Close()`.

**Release note**:

```release-note
NONE
```
2018-08-21 11:54:15 -07:00
Minhan Xia 7670d812a8 Turn on PodReadinessGate by default 2018-08-21 11:34:53 -07:00
Davanum Srinivas 9b43d97cd4
Add Labels to various OWNERS files
Will reduce the burden of manually adding labels. Information pulled
from:
https://github.com/kubernetes/community/blob/master/sigs.yaml

Change-Id: I17e661e37719f0bccf63e41347b628269cef7c8b
2018-08-21 13:59:08 -04:00
Tim Hockin 06b785ca52 Allow headless svc without ports to have endpoints
As cited in
https://github.com/kubernetes/dns/issues/174 - this is documented to
work, and I don't see why it shouldn't work.  We allowed the definition
of headless services without ports, but apparently nobody tested it very
well.

Manually tested clusterIP services with no ports - validation error.

Manually tested services with negative ports - validation error.

New tests failed, output inspected and verified.  Now pass.
2018-08-21 08:36:27 -07:00
yue9944882 f624a4efb8 externalize node admission
fixes internal pod annotation reference

completely strip internal informers from authz initialization
2018-08-21 23:33:03 +08:00
Maciej Szulik 5b55e1f8ed
Create cli-runtime staging repository 2018-08-21 17:08:30 +02:00
Joachim Bartosik 7d6676eab1 Improve HPA sample sanitization
After my previous changes HPA wasn't behaving correctly in the following
situation:

- Pods use a lot of CPU during initilization, become ready right after they initialize,
- Scale up triggers,
- When new pods become ready HPA counts their usage (even though it's not related to any work that needs doing),
- Another scale up, even though existing pods can handle work, no problem.
2018-08-21 16:22:06 +02:00
Kubernetes Submit Queue c9b79da757
Merge pull request #66737 from hanxiaoshuai/cleanup07281
Automatic merge from submit-queue (batch tested with PRs 67332, 66737, 67281, 67173). 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 aws.StringSlice replace of deprecated func stringPointerArray

**What this PR does / why we need it**:
use aws.StringSlice replace of deprecated func stringPointerArray

```
// stringPointerArray creates a slice of string pointers from a slice of strings
// Deprecated: consider using aws.StringSlice - but note the slightly different behaviour with a nil input
func stringPointerArray(orig []string) []*string {
       if orig == nil {
               return nil
       }
       return aws.StringSlice(orig)
}
```

**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-08-21 05:25:06 -07:00
Kubernetes Submit Queue da2169f899
Merge pull request #67332 from nak3/ceph-fuse-opt
Automatic merge from submit-queue (batch tested with PRs 67332, 66737, 67281, 67173). 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>.

Support mount options for cephfs with ceph-fuse mount

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

When cephfs uses ceph-fuse for the mount command, mount option and
readOnly options are disregarded. This patch adds to ceph-fuse as
well.


**Special notes for your reviewer**:

N/A

**Release note**:

```release-note
NONE
```
2018-08-21 05:25:03 -07:00
Ismo Puustinen dd3eeb3f46 device manager: don't do operations on nil pointer.
If grpc.DialContext() fails, a nil connection is returned. Check the
error before calling conn.Close().
2018-08-21 15:20:36 +03:00
Kubernetes Submit Queue d017bebf6b
Merge pull request #67145 from jiayingz/reboot-fix
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>.

Fail container start if its requested device plugin resource is unknown.

With the change, Kubelet device manager now checks whether it has cached option state for the requested device plugin resource to make sure the resource is in ready state when we start the container.



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Fail container start if its requested device plugin resource hasn't registered after Kubelet restart.
```
2018-08-21 01:48:54 -07:00
Nikhita Raghunath dabd56f7df Fix tests to support ObjectMeta omitempty semantics 2018-08-21 13:17:25 +05:30
Kubernetes Submit Queue 4cca6a89a0
Merge pull request #66862 from resouer/sync-map
Automatic merge from submit-queue (batch tested with PRs 66862, 67618). 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 sync.map to scale equiv class cache better

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

Change the current lock in first level ecache into  `sync.Map`, which is known for scaling better than `sync. Mutex ` on machines with >8 CPUs

ref: https://golang.org/pkg/sync/#Map
 
And the code is much cleaner in this way.

5k Nodes, 10k Pods benchmark with ecache enabled in 64 cores VM:

```bash
// before
BenchmarkScheduling/5000Nodes/0Pods-64             10000          17550089 ns/op

// after
BenchmarkScheduling/5000Nodes/0Pods-64             10000          16975098 ns/op
```
Comparing to current implementation, the improvement after this change is noticeable, and the test is stable in 8, 16, 64 cores VM.

**Special notes for your reviewer**:

**Release note**:

```release-note
Use sync.map to scale ecache better
```
2018-08-21 00:24:01 -07:00
Pengfei Ni 2d82cd811f Reduce verbose logs of node addresses requesting 2018-08-21 13:23:01 +08:00
Kubernetes Submit Queue 5d8a79f2e1
Merge pull request #67337 from linyouchong/pr-0813-issue67225
Automatic merge from submit-queue (batch tested with PRs 67493, 67617, 67582, 67337). 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 bug:DaemonSet didn't create pod after node have enough resource

**What this PR does / why we need it**:
Fix bug:DaemonSet didn't create pod after node have enough resource

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

**Special notes for your reviewer**:
NONE

**Release note**:
```release-note
DaemonSet: Fix bug- daemonset didn't create pod after node have enough resource
```
2018-08-20 20:39:17 -07:00
Kubernetes Submit Queue 7c4cbbb0a0
Merge pull request #67493 from soltysh/nil_int_percent
Automatic merge from submit-queue (batch tested with PRs 67493, 67617, 67582, 67337). 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 nil input in GetValueFromIntOrPercent

**What this PR does / why we need it**:
`GetValueFromIntOrPercent` accepts pointer argument but does not validate it. This PR fixes that problem preventing from panics.

/assign @deads2k @sttts 

**Release note**:
```release-note
NONE
```
2018-08-20 20:39:07 -07:00
Kubernetes Submit Queue 8f4ab6fe76
Merge pull request #67596 from nikhita/add-apimachinery-label-owners
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 sig/api-machinery label to apimachinery OWNERS files

Inspired by https://github.com/kubernetes/kubernetes/pull/67548. List of OWNERS files taken from https://github.com/kubernetes/community/blob/master/sig-api-machinery/README.md#subprojects.

**Release note**:

```release-note
NONE
```
2018-08-20 14:02:17 -07:00
Ryan Phillips 9abe17f0a0 attach: Move the AttachFunc default function to the initializer
Fixes a partially constructed AttachOptions
2018-08-20 14:10:15 -05:00
Kubernetes Submit Queue 83db13a952
Merge pull request #55600 from yanxuean/api-unit-test
Automatic merge from submit-queue (batch tested with PRs 55600, 67386). 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 deplicate code for PodRequestsAndLimits

remove deplicate code for PodRequestsAndLimits
add unit test for PodRequestsAndLimits 

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

**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-08-20 08:46:00 -07:00
Pengfei Ni 8aaeafa166 Get VirtualMachineScaleSets and VirtualMachineScaleSetVMs from cached resource groups 2018-08-20 23:21:06 +08:00
Pengfei Ni f83fb14452 Get VirtualMachines with cached resource groups 2018-08-20 23:21:06 +08:00
Pengfei Ni d499855ba2 Add caches for cross node resource groups and unmanaged nodes. 2018-08-20 23:21:03 +08:00
Nikhita Raghunath 6e47ba1fde Add sig/api-machinery label to apimachinery OWNERS files 2018-08-20 18:46:47 +05:30
Maciej Szulik 53b4c6387a
Tolarate nil inputs on maxSurge and maxUnavailable when parsing IntOrString 2018-08-20 15:15:57 +02:00
Kubernetes Submit Queue 39e341c11f
Merge pull request #66639 from hanxiaoshuai/fix07251
Automatic merge from submit-queue (batch tested with PRs 66592, 66639). 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 some hard code in pkg/util/ipset/ipset.go

**What this PR does / why we need it**:
refactor some hard code in pkg/util/ipset/ipset.go
**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-08-19 22:40:00 -07:00
Kubernetes Submit Queue 4c08bd9abc
Merge pull request #66592 from hanxiaoshuai/addut0723
Automatic merge from submit-queue (batch tested with PRs 66592, 66639). 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 unit test for func EntryString in util/ipset

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

**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**:
add unit test for func EntryString in util/ipset
**Release note**:

```release-note
NONE
```
2018-08-19 22:39:57 -07:00
Cao Shufeng edc3e40dce run make update 2018-08-20 09:15:55 +08:00
Cao Shufeng b4a71bbd8a add annotations to admission webhook 2018-08-18 17:40:57 +08:00
linyouchong c42439c676 Fix bug:DaemonSet didn't create pod after node have enough resource 2018-08-18 16:15:15 +08:00
Kubernetes Submit Queue ef388fee53
Merge pull request #66948 from mohamed-mehany/anti-affinity-optimization
Automatic merge from submit-queue (batch tested with PRs 67041, 66948). 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>.

Anti affinity optimization

**What this PR does / why we need it**:
This pull request aims to optimize the performance of anti-affinity rules lookup of existing pods
This optimization maps the topology values to a list of pods running on nodes that match this value and store that map in the pod metadata. Accordingly, when validating anti-affinity rules of existing pods we will only check those running on nodes with similar topology values to the current candidate (node) for 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 #63937

**Special notes for your reviewer**:
/sig scalability
/sig scheduling
**Release note**:

```release-note
improve performance of anti-affinity predicate of default scheduler.
```
2018-08-17 19:14:08 -07:00
yanxuean efca28f8a5 remove deplicate code for PodRequestsAndLimits
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2018-08-18 09:22:28 +08:00
Kubernetes Submit Queue c2c0d9e441
Merge pull request #67472 from islinwb/pkg_proxy_util-add-ut
Automatic merge from submit-queue (batch tested with PRs 66733, 67472). 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 ut for PortPart()

**What this PR does / why we need it**:
improve ut coverage

**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-08-17 17:50:05 -07:00
Kubernetes Submit Queue 8c1bfeb0cf
Merge pull request #66733 from bsalamat/subset_nodes
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 a feature to the scheduler to score fewer than all nodes in every scheduling cycle

**What this PR does / why we need it**:
Today, the scheduler scores all the nodes in the cluster in every scheduling cycle (every time a posd is attempted). This feature implements a mechanism in the scheduler that allows scoring fewer than all nodes in the cluster. The scheduler stops searching for more nodes once the configured number of feasible nodes are found. This can help improve the scheduler's performance in large clusters (several hundred nodes and larger).
This PR also adds a new structure to the scheduler's cache, called NodeTree, that allows scheduler to iterate over various nodes in different zones in a cluster. This is needed to avoid scoring the same set of nodes in every scheduling cycle.

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

**Special notes for your reviewer**:
This is a large PR, but broken into a few logical commits. Reviewing would be easier if you review by commits.

**Release note**:

```release-note
Add a feature to the scheduler to score fewer than all nodes in every scheduling cycle. This can improve performance of the scheduler in large clusters.
```
2018-08-17 17:21:32 -07:00
Ahmad Diaa b4c7d190cd using set instead of lists for topologyPairsMaps attributes 2018-08-18 01:02:48 +02:00
Ahmad Diaa 0f4c3064fd created struct for topologyPairs maps 2018-08-18 01:02:48 +02:00
Ahmad Diaa f6659e4543 further enhancements removing matchingTerms from metadata 2018-08-18 01:02:47 +02:00
Mohamed Mehany 3fb6912d08 add topologyValue map to reduce search space 2018-08-18 01:02:46 +02:00
Kubernetes Submit Queue 8b52ca1ab9
Merge pull request #67433 from deads2k/controller-02-quotadiscovery
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>.

allow failed discovery on initial quota controller start

Fixes #65005

Aggregated API servers now correctly provide 503s on discovery endpoints for groups that cannot be reached.  This means that the kube-controller-manager process is now sensitive to discovery failures in the quota controller.  This change allows discovery failures in the initial quota replenishment controller resource discovery.

@liggitt suspects similar races exist to those he found GC last release, but this pull doesn't make that better or worse.

@kubernetes/sig-api-machinery-bugs
2018-08-17 16:01:31 -07:00
Kubernetes Submit Queue 567b3025ce
Merge pull request #67194 from yue9944882/refactor/storage-object-inuse-protection-externalize
Automatic merge from submit-queue (batch tested with PRs 67194, 67540). 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>.

Externalize PV/PVC informer for StorageObjectInUseProtection & NodeAuthorizer

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

/sig api-machinery

ref: #66680

We move on and make the change happen for PV/PVC. 

> PV: NodeAuthorizer, StorageObjectInUseProtection
> PVC: StorageObjectInUseProtection

1. Externalize PV and PVC informers for `StorageObjectInUseProtection`
2. Copy utility functions for PV from `pkg/api/persistentvolume` to `pkg/api/v1/persistentvolume` and make it accept external types.
3. Bump PV informer in NodeAuthorizer

**Release note**:

```release-note
NONE
```
2018-08-17 13:23:06 -07:00
Kubernetes Submit Queue 1737a43324
Merge pull request #66876 from juanvallejo/jvallejo/prototype-plugins
Automatic merge from submit-queue (batch tested with PRs 67062, 67169, 67539, 67504, 66876). 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 the kubectl plugin mechanism

**Release note**:
```release-note
The plugin mechanism functionality to closely follow the git plugin design
```

Replace the existing plugin mechanism with the design proposed in https://github.com/kubernetes/community/pull/2437.

~~_The full implementation of the plugin mechanism itself is entirely contained within the first commit._~~

## Walkthrough

Under the new design, there is no plugin installation or loading required to use plugins.
A plugin is simply any executable file on a user's PATH whose name begins with `kubectl-`.
- Plugins receive the inherited environment from the `kubectl` binary. All environment variables
accessible by `kubectl` become accessible by the plugin.
- Plugins decide which command path they wish to implement based on their name. For example, a plugin wanting to provide a new command `foo`, would simply be named `kubectl-foo`.

### Creating a plugin

Below is an example plugin, that we will use for this walkthrough. Plugins may be written in any language, and handle arguments and flags in any way, optionally (as a convention) providing a way to retrieve their version via a `version` subcommand.

```bash
#!/bin/bash

# optional argument handling
if [[ "$1" == "version" ]]
then
    echo "1.0.0"
    exit 0
fi

# optional argument handling
if [[ "$1" == "config" ]]
then
    echo $KUBECONFIG
    exit 0
fi

echo "I am a plugin named kubectl-foo"
```

### Using a plugin

To use a plugin, simply make it executable:

```bash
sudo chmod +x ./kubectl-foo
```

and place it anywhere in your PATH:

```bash
sudo mv ./kubectl-foo /usr/local/bin
```

You may now invoke your plugin as a `kubectl` command:

```bash
$ kubectl foo
I am a plugin named kubectl-foo
```

All args and flags are passed as-is to the executable:

```bash
$ kubectl foo version
1.0.0
```

All environment variables are also passed as-is to the executable:

```bash
$ export KUBECONFIG=~/.kube/config
$ kubectl foo config
/home/<user>/.kube/config

$ KUBECONFIG=/etc/kube/config kubectl foo config
/etc/kube/config
```

Additionally, the first argument that is passed to a plugin will always be the full path to the location where it was invoked (`$0` would equal `/usr/local/bin/kubectl-foo` in our example above).

### Plugin discoverability

Seeing as how the `kubectl plugin` command is left as a no-op with this PR (perhaps it could serve as an entrypoint towards additional plugin functionality in the future), a small subcommand has been included that _lists all available plugin executables on a user's PATH_, along with any warnings it finds.

Example usage of this new subcommand is included below:

```bash
$ kubectl plugin list
The following kubectl-compatible plugins are available:

test/fixtures/pkg/kubectl/plugins/kubectl-foo
plugins/kubectl-foo
  - warning: plugins/kubectl-foo is overshadowed by a similarly named plugin: test/fixtures/pkg/kubectl/plugins/kubectl-foo
plugins/kubectl-invalid
  - warning: plugins/kubectl-invalid identified as a kubectl plugin, but it is not executable
plugins/kubectl-bar

error: 2 plugin warnings were found
```

cc @kubernetes/kubectl-maintainers @kubernetes/sig-cli-pr-reviews @soltysh @seans3 @mengqiy
2018-08-17 11:58:22 -07:00
Kubernetes Submit Queue 027d0fcfdf
Merge pull request #67062 from cofyc/fix66287
Automatic merge from submit-queue (batch tested with PRs 67062, 67169, 67539, 67504, 66876). 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>.

Double check PVC if not found in syncVolume

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

Double check PVC if not found in syncVolume.
    
If PV is bound by external PV binder (e.g. kube-scheduler), it's possible on heavy load that corresponding PVC is not synced to controller local cache yet.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Double check PVC if not found in syncVolume to prevent reclaiming PV wrongly.
```
2018-08-17 11:58:06 -07:00
Bobby (Babak) Salamat 2860743c86 Autogenerated files 2018-08-17 11:18:52 -07:00
Bobby (Babak) Salamat abb70aee98 Add a scheduler config argument to set the percentage of nodes to score 2018-08-17 11:18:51 -07:00
Tim Allclair e6eb2e7dea Add RuntimeHandler to the CRI RunPodSandboxRequest 2018-08-17 10:56:49 -07:00
Kubernetes Submit Queue 53ee2e5307
Merge pull request #67528 from andyzhangx/azuredisk-sku
Automatic merge from submit-queue (batch tested with PRs 66920, 67316, 67363, 67528, 66963). 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 more storage account sku support for azure disk

add error msg



**What this PR does / why we need it**:
Original hard coded storage account sku list is not good design, swith to use `storage.PossibleSkuNameValues()` to add more sku support for azure disk

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

**Special notes for your reviewer**:

**Release note**:

```
add more storage account sku support for azure disk
```

/sig azure
@feiskyer 
FYI @khenidak
2018-08-17 10:37:17 -07:00
Kubernetes Submit Queue 4fff352371
Merge pull request #67316 from m1kola/67314_fix_regression
Automatic merge from submit-queue (batch tested with PRs 66920, 67316, 67363, 67528, 66963). 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 regression in kubectl logs: the --all-containers=true option didn't work

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

Fixes regression introduced in #66398 and adds unit tests for logging with `--all-containers=true`. See #67314 for more details.

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

**Special notes for your reviewer**:

I didn't cover cases with `coreinternal.PodList` and `coreinternal.Pod` in tests, because it doesn't look like we need them: I didn't manage to find any callers of the `logsForObjectWithClient` and `logsForObject` functions, so, probably, we can remove them. I'll double check and try to do that separately once this PR is merged.

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

/sig cli
2018-08-17 10:37:09 -07:00
Bobby (Babak) Salamat a5045d107e Add NodeTree to the scheduler cache 2018-08-17 09:56:51 -07:00
Bobby (Babak) Salamat c1896c97ea Add a node tree that allows iterating over nodes in regions and zones 2018-08-17 09:56:51 -07:00
Kubernetes Submit Queue b9544382ba
Merge pull request #67060 from sttts/sttts-unify-insecure-serving
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>.

kube-{apiserver,ctrl-mgr}: unify into DeprecatedInsecureServingOptions

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

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

```
2018-08-17 08:50:36 -07:00
David Eads 4c8e9de293 allow failed discovery on initial quota controller start 2018-08-17 11:42:54 -04:00
Kubernetes Submit Queue 40af953850
Merge pull request #67068 from sttts/sttts-non-fatal-ratelimitermetircs-reuse
Automatic merge from submit-queue (batch tested with PRs 66793, 67405, 67068, 67501, 67484). 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>.

pkg/util/metrics: make re-registration of RateLimiterMetric non-fatal

In integration tests we might register these metrics multiple times in parallel. Instead of unregistering and making somehow sure those tests can run in parallel, we just make the registration idem-potent.

Prerequisite for controller manager integration tests https://github.com/kubernetes/kubernetes/pull/64149.
2018-08-17 05:05:17 -07:00
Kubernetes Submit Queue c927968903
Merge pull request #67405 from MorrisLaw/default_load_balancer_name_comment
Automatic merge from submit-queue (batch tested with PRs 66793, 67405, 67068, 67501, 67484). 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>.

Updated comment for DefaultLoadBalancerName to provide further context

**What this PR does / why we need it**:
Updates the comment for DefaultLoadBalancerName to provide better context and also as a reminder that it should eventually be removed.

**Release note**:

```release-note
NONE
```
2018-08-17 05:05:13 -07:00
choury 36b92b9b29 cpumanager: rollback state if updateContainerCPUSet failed 2018-08-17 18:08:58 +08:00
Kubernetes Submit Queue 5a4e9d11f0
Merge pull request #67498 from hanxiaoshuai/addut0816
Automatic merge from submit-queue (batch tested with PRs 66209, 67380, 67499, 67437, 67498). 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 unit test for pkg/kubeapiserver/options/authentication.go

**What this PR does / why we need it**:
add unit test for pkg/kubeapiserver/options/authentication.go
**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-08-17 03:01:20 -07:00
Kubernetes Submit Queue b345cee91a
Merge pull request #67437 from fisherxu/sourcecode
Automatic merge from submit-queue (batch tested with PRs 66209, 67380, 67499, 67437, 67498). 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 versioned api in kube-proxy

**What this PR does / why we need it**:
Now in kube-proxy someplace still use the internal version api, change to use versioned api. 

**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-08-17 03:01:16 -07:00
Kubernetes Submit Queue 4819c65028
Merge pull request #67380 from tianshapjq/nits-in-manager.go
Automatic merge from submit-queue (batch tested with PRs 66209, 67380, 67499, 67437, 67498). 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>.

nits in manager.go

**What this PR does / why we need it**:
just found some nits in the manager.go

**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-08-17 03:01:09 -07:00
Kubernetes Submit Queue eeb3389f3b
Merge pull request #63260 from misterikkit/ecache-metrics
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>.

scheduler: add metrics to equivalence cache

This adds counters to equiv. cache reads & writes. Reads are labeled by
hit/miss, while writes are labeled to indicate whether the write was
discarded.

This will give us visibility into,
- hit rate of cache reads
- ratio of reads to writes
- rate of discarded writes



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-08-17 01:10:51 -07:00
Dr. Stefan Schimanski e8300dea52 pkg/util/metrics: idem-potent registration of RateLimiterMetric and never cleanup 2018-08-17 09:15:33 +02:00
Dr. Stefan Schimanski c2724793e8 Update bazel 2018-08-17 08:57:21 +02:00
Dr. Stefan Schimanski d787213d1b kube-apiserver: switch apiserver's DeprecatedInsecureServingOptions 2018-08-17 08:56:47 +02:00
Dr. Stefan Schimanski 1d9a896066 apiserver: move controller-manager's insecure config into apiserver 2018-08-17 08:56:46 +02:00
andyzhangx aa4594ffae add more sku support for azure disk
add error msg

update bazel
2018-08-17 06:52:46 +00:00
yue9944882 e7d0983707 externalize pv informer in node authorizer 2018-08-17 11:14:43 +08:00
yue9944882 b497570e50 util for external pv
prune unused pv utils and its test
2018-08-17 11:14:42 +08:00
Cheng Xing e5cf6f5c71 Added set and map structural validation for AllowedTopologies 2018-08-16 16:27:24 -07:00
Kubernetes Submit Queue d17bbf8d38
Merge pull request #67372 from tanshanshan/priority-814
Automatic merge from submit-queue (batch tested with PRs 67137, 67372, 67505, 67373, 67357). 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 apiserver crashed when priority classs already exists

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

when priority classs already exists , ignore error 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-08-16 10:34:15 -07:00
Kubernetes Submit Queue d3a0bb6a84
Merge pull request #67137 from juanvallejo/jvallejo/usability-fix-kube-get
Automatic merge from submit-queue (batch tested with PRs 67137, 67372, 67505, 67373, 67357). 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>.

prevent "No resources found" output on forbidden error

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

This was originally fixed in https://github.com/kubernetes/kubernetes/pull/35115, but made its way back. Added a small test

cc @soltysh
2018-08-16 10:34:11 -07:00
Kubernetes Submit Queue 3817e21c03
Merge pull request #55840 from yanxuean/v1-configmap-test
Automatic merge from submit-queue (batch tested with PRs 67399, 67471, 66815, 67301, 55840). 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 unit test for v1.configmap and remove replicate code

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

**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-08-16 09:03:21 -07:00
Kubernetes Submit Queue 21c2af131e
Merge pull request #67301 from dixudx/use_apimachinery_NameIsDNSSubdomain
Automatic merge from submit-queue (batch tested with PRs 67399, 67471, 66815, 67301, 55840). 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 NameIsDNSSubdomain validation from staging

**What this PR does / why we need it**:
> // TODO update all references to these functions to point to the apimachineryvalidation ones

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

**Special notes for your reviewer**:
/cc seans3
@kubernetes/sig-apps-pr-reviews 
@kubernetes/sig-api-machinery-pr-reviews 

**Release note**:

```release-note
None
```
2018-08-16 09:03:16 -07:00
Kubernetes Submit Queue 46fd351b89
Merge pull request #66815 from fseldow/dev
Automatic merge from submit-queue (batch tested with PRs 67399, 67471, 66815, 67301, 55840). 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 load balancer IP change when updating service

**What this PR does / why we need it**:
To fix bug in azure load balancer. Change frontend IP Configuration while updating service without changing its internal annotation

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

```release-note
NONE
```
2018-08-16 09:03:13 -07:00
Kubernetes Submit Queue 4ccee77fad
Merge pull request #67399 from deads2k/cli-04-patch
Automatic merge from submit-queue (batch tested with PRs 67399, 67471, 66815, 67301, 55840). 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 patch to work with --local and avoid extra requests

--local wasn't being respected by the resourcebuilder and then the later refreshes were unnecessary and violated --local in some cases.

@kubernetes/sig-cli-maintainers 
@juanvallejo 

```release-note
kubectl patch now respects --local
```
2018-08-16 09:03:06 -07:00
Kubernetes Submit Queue 2744f264f5
Merge pull request #67451 from janetkuo/deploy-owner
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>.

replace mfojtik as approver of Deployment

**Release note**:

```release-note
NONE
```
2018-08-16 06:29:42 -07:00
hangaoshuai cacf18f859 add unit test for func ToAuthenticationConfig 2018-08-16 19:24:11 +08:00
hangaoshuai 4157f5a1ae add unit test for Authentication Validate 2018-08-16 18:13:58 +08:00
Xinhe Li 006310b78e fix load balancer IP change when updating service 2018-08-16 16:49:07 +08:00
Kubernetes Submit Queue 59fdc02b13
Merge pull request #67353 from yguo0905/tpu-api-timeout
Automatic merge from submit-queue (batch tested with PRs 67375, 67353). 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>.

Allow passing timeout on TPU API operations via context

The caller will provide a context with timeout attached.

**Release note**:

```release-note
None
```

/assign @vishh
2018-08-16 00:54:59 -07:00
linyouchong b4c27a1501 Remove incorrect comment 2018-08-16 15:52:00 +08:00
andyzhangx 3013df9e9e change default value of kind for azure disk 2018-08-16 07:13:01 +00:00
Pengfei Ni 680e64f6ae Add unit tests for InstanceID 2018-08-16 14:38:30 +08:00
Pengfei Ni a09bcb20c7 Reduce API calls for Azure instance metadata 2018-08-16 14:38:04 +08:00
Kubernetes Submit Queue da3f1a3ea1
Merge pull request #64445 from squeed/more-cni-capabilities
Automatic merge from submit-queue (batch tested with PRs 64445, 67459, 67434). 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>.

dockershim/network: pass ipRange CNI capabilities

**What this PR does / why we need it**:
Updates the dynamic (capability args) passed from Kubernetes to the CNI plugin. This means CNI plugin authors can offer more features and / or reduce their dependency on the APIServer.

Currently, we only pass the `portMappings` capability. CNI now supports `bandwidth` for bandwidth limiting and `ipRanges` for preferred IP blocks. This PR adds support for these two new capabilities.

Bandwidth limits are provided - as implemented in kubenet - via the pod annotations `kubernetes.io/ingress-bandwidth` and `kubernetes.io/egress-bandwidth`.

The ipRanges field simply passes the PodCIDR. This does mean that we need to change the NodeReady algorithm. Previously, we would only set NodeNotReady on missing PodCIDR when using Kubenet. Now, if the CNI configuration includes the `ipRanges` capability, we need to do the same.

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

**Release note**:

```release-note
The dockershim now sets the "bandwidth" and "ipRanges" CNI capabilities (dynamic parameters). Plugin authors and administrators can now take advantage of this by updating their CNI configuration file. For more information, see the [CNI docs](https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md#dynamic-plugin-specific-fields-capabilities--runtime-configuration)
```
2018-08-15 22:54:07 -07:00
Morten Torkildsen 8e497274c9 Better error message when checking rollout status for StatefulSet with OnDelete strategy type 2018-08-15 21:39:14 -07:00
Kubernetes Submit Queue cffa2aed0e
Merge pull request #64601 from hzxuzhonghu/cm-dynamic-loglevel-set
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>.

Other components support set log level dynamically

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

#63777 introduced a way to set glog.logging.verbosity dynamically. 
We should enable this for all other components, which is specially useful in debugging. 


**Release note**:

```release-note
Expose `/debug/flags/v` to allow kubelet dynamically set glog logging level.  If want to change glog level to 3, you only have to send a PUT request like `curl -X PUT http://127.0.0.1:8080/debug/flags/v -d "3"`.
```
2018-08-15 21:32:46 -07:00
Weibin Lin 2f30751db3 add ut for PortPart() 2018-08-16 11:49:48 +08:00
Kubernetes Submit Queue 825548df95
Merge pull request #67464 from misterikkit/deadcode
Automatic merge from submit-queue (batch tested with PRs 67461, 67464, 67416). 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>.

Delete dead code in pkg/scheduler

**What this PR does / why we need it**:
This is just some cleanup. I found some unused code while evaluating the scheduler code.

**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 cleanup
/sig scheduling
2018-08-15 20:09:09 -07:00
Kubernetes Submit Queue ccef02e04f
Merge pull request #67461 from janetkuo/ds-collision-count
Automatic merge from submit-queue (batch tested with PRs 67461, 67464, 67416). 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>.

Avoid unnecessary DaemonSet collisionCount bump

**What this PR does / why we need it**: Sometimes DaemonSet controller will bump its collisionCount more than necessary when the collisionCount of the DaemonSet in the cache store hasn't been updated. This won't affect users, as collisionCount is only used for creating unique hash and the number doesn't matter as long as it changes. This fix avoids the unnecessary collisionCount updates and de-flakes the DaemonSet test for collisionCount. 

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

**Special notes for your reviewer**: @kubernetes/sig-apps-pr-reviews 

**Release note**:

```release-note
NONE
```
2018-08-15 20:09:05 -07:00
yanxuean 9770ff9082 improve GetExistingContainerStatus
remove duplicate

Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
2018-08-16 11:03:12 +08:00
Yecheng Fu 493502d0ae Double check PVC if not found in syncVolume.
If PV is bound by external PV binder (e.g. kube-scheduler), it's
possible on heavy load that corresponding PVC is not synced to
controller local cache yet.
2018-08-16 10:33:28 +08:00
fisherxu 5a9bea0353 update bazel 2018-08-16 09:59:33 +08:00
x00416946 fisherxu 79e17e6cd7 use versioned api in kube-proxy 2018-08-16 09:59:33 +08:00
Kubernetes Submit Queue 92fc828d63
Merge pull request #67456 from Huang-Wei/pods-incresing-issue
Automatic merge from submit-queue (batch tested with PRs 65561, 67109, 67450, 67456, 67402). 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 an issue in NodeInfo.Clone()

- usedPorts is a map-in-map struct, add fix to ensure it's deep copied
- updated unit test

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

Due to PR "Refactor HostIP predicate algorithm #55910", internal `usedPorts` data structure was changed from "map[string]bool" to "map[string]map[ProtocolPort]struct{}".

However, it breaks behavior of `NodeInfo.Clone()`: in the before, one loop `for k, v := range usedPorts` worked fine because it's a safe assignment, but it's not safe any more for a map-in-map using original code. A similar go playground sample is here: https://play.golang.org/p/puqMN71cmSO.

**Which issue(s) this PR fixes**:
Fixes #67453 (_Might_ also related with #66568)

**Special notes for your reviewer**:
- No matter pod preemption is enabled or disabled, #67453 can be triggered.
- As #55910 was introduced in 1.10, this fix needs to back ported to 1.10 and 1.11 release branches.

**Release note**:
```release-note
Fix an issue that pods using hostNetwork keep increasing.
```
2018-08-15 18:15:16 -07:00
Kubernetes Submit Queue b904a3dc48
Merge pull request #67109 from MHBauer/error-typo
Automatic merge from submit-queue (batch tested with PRs 65561, 67109, 67450, 67456, 67402). 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>.

error text refers to wrong stream type

**What this PR does / why we need it**:
clarify error text

**Special notes for your reviewer**:
I think this was a copy and paste error.

**Release note**:
```release-note
NONE
```
2018-08-15 18:15:10 -07:00
Kubernetes Submit Queue 6faf115870
Merge pull request #65561 from k82cn/k8s_65372_1
Automatic merge from submit-queue (batch tested with PRs 65561, 67109, 67450, 67456, 67402). 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>.

Compared preemption by priority in Kubelet

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)*:
Fixes #65372 

**Release note**:
```release-note
None
```
2018-08-15 18:15:06 -07:00
morrislaw df4f26ef39 Updated cloud providers with todo comment if using DefaultLoadBalancerName 2018-08-15 21:03:44 -04:00
morrislaw 4f8fe9d922 Update DefaultLoadBalancerName method and add that its deprecated 2018-08-15 20:54:29 -04:00
tanshanshan a99b619c11 fix apiserver crashed when priority classs already exists 2018-08-16 08:46:55 +08:00
Jonathan Basseri fbf3d2b84c Delete dead code in pkg/scheduler.
This deletes some unused functions from the `Configurator` interface.
2018-08-15 17:14:38 -07:00
Jonathan Basseri a77e3bd16b Delete dead code.
This removes a fake Cache implementation that is not used anywhere
(anymore).
2018-08-15 17:14:37 -07:00
Janet Kuo fd7a694440 Avoid unnecessary DaemonSet collisionCount bump 2018-08-15 16:16:41 -07:00
Jonathan Basseri b874d2789b Add metrics to equivalence cache.
This adds counters to equiv. cache reads & writes. Reads are labeled by
hit/miss, while writes are labeled to indicate whether the write was
discarded.

This will give us visibility into,
- hit rate of cache reads
- ratio of reads to writes
- rate of discarded writes
2018-08-15 15:51:13 -07: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
Kubernetes Submit Queue f01be5031c
Merge pull request #67421 from islinwb/minor-fix
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>.

use glog.V().Infof() for formatting output; return nil when err's nil

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

**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-08-15 15:30:24 -07:00
Kubernetes Submit Queue 8f63f7b010
Merge pull request #67254 from andrewsykim/doc-instance-stopped
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>.

document expectations for stopped/shutdown instances in cloudprovider.Instances interface

**What this PR does / why we need it**:
Add comments which outline expectations for how cloud providers should handle nodes that are stopped/shutdown/sleeping. 

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
It doesn't fix https://github.com/kubernetes/kubernetes/issues/46442 since some providers still delete node resources for stopped instances (though there are PRs already open to fix this) but we've (mostly?) agreed that not deleting node resources for stopped instances is the correct behavior, or at least the behavior that we want consistent across providers at the moment. 

**Special notes for your reviewer**:

```release-note
NONE
```

/sig cloud-provider
2018-08-15 15:30:21 -07:00
Kubernetes Submit Queue 939f08a24e
Merge pull request #62441 from chentao1596/certificate_controller_utils_ut
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>.

UT case of certificate_controller
2018-08-15 15:04:59 -07:00
Wei Huang 976797c0b8
fix an issue in NodeInfo.Clone()
- usedPorts is a map-in-map struct, add fix to ensure it's deep copied
- updated unit test
2018-08-15 13:31:16 -07:00
Janet Kuo 3fa639f775 Add mfojtik as approver of Deployment 2018-08-15 12:15:22 -07:00
juanvallejo 4bdc636380
add updated plugin mechanism 2018-08-15 15:06:29 -04:00
juanvallejo df0077f362
prevent "No resources found" output on forbidden error 2018-08-15 13:54:23 -04:00
Kubernetes Submit Queue 4414ae3d75
Merge pull request #66666 from bertinatto/metrics_ad_controller
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 more metrics for A/D Controller:

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

This PR adds a few metrics described in the [Metrics Spec](https://docs.google.com/document/d/1Fh0T60T_y888LsRwC51CQHO75b2IZ3A34ZQS71s_F0g/edit#heading=h.ys6pjpbasqdu):

* Number of Volumes in ActualStateOfWorld and DesiredStateOfWorld
* Number of times A/D Controller performs force detach

**Release note**:

```release-note
NONE
```
2018-08-15 09:42:06 -07:00
Casey Callendrello 5d9ec20d7e kubelet/dockershim/network: pass ipRange dynamically to the CNI plugin
CNI now supports passing ipRanges dynamically. Pass podCIDR so that
plugins no longer have to look it up.
2018-08-15 17:41:09 +02:00
Kubernetes Submit Queue c5d15cb0b8
Merge pull request #66115 from jasonrichardsmith/add-serviceAccount-fieldselector
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>.

added serviceAccountName to field selectors

What this PR does / why we need it:

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

Special notes for your reviewer:

```release-note
NONE
```
2018-08-15 08:24:57 -07:00
Kubernetes Submit Queue 2a81c37d4c
Merge pull request #67229 from feiskyer/unzoned-disks
Automatic merge from submit-queue (batch tested with PRs 66884, 67410, 67229, 67409). 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 node affinity for Azure unzoned managed disks

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

Continue of [Azure Availability Zone feature](https://github.com/kubernetes/features/issues/586).

Add node affinity for Azure unzoned managed disks, so that unzoned disks only scheduled to unzoned nodes.

This is required because Azure doesn't allow attaching unzoned disks to zoned VMs.

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

Unzoned nodes would label `failure-domain.beta.kubernetes.io/zone=0` and the value is fault domain ( while availability zone is used for zoned nodes). So fault domain is used to populate unzoned disks.

Since there are at most 3 fault domains in each region, the PR adds 3 terms for them:

```yaml
kubectl describe pv pvc-bdf93a67-9c45-11e8-ba6f-000d3a07de8c
Name:              pvc-bdf93a67-9c45-11e8-ba6f-000d3a07de8c
Labels:            <none>
Annotations:       pv.kubernetes.io/bound-by-controller=yes
                   pv.kubernetes.io/provisioned-by=kubernetes.io/azure-disk
                   volumehelper.VolumeDynamicallyCreatedByKey=azure-disk-dynamic-provisioner
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      azuredisk-unzoned
Status:            Bound
Claim:             default/unzoned-pvc
Reclaim Policy:    Delete
Access Modes:      RWO
Capacity:          5Gi
Node Affinity:     
  Required Terms:  
    Term 0:        failure-domain.beta.kubernetes.io/region in [southeastasia]
                   failure-domain.beta.kubernetes.io/zone in [0]
    Term 1:        failure-domain.beta.kubernetes.io/region in [southeastasia]
                   failure-domain.beta.kubernetes.io/zone in [1]
    Term 2:        failure-domain.beta.kubernetes.io/region in [southeastasia]
                   failure-domain.beta.kubernetes.io/zone in [2]
Message:           
Source:
    Type:         AzureDisk (an Azure Data Disk mount on the host and bind mount to the pod)
    DiskName:     k8s-5b3d7b8f-dynamic-pvc-bdf93a67-9c45-11e8-ba6f-000d3a07de8c
    DiskURI:      /subscriptions/<subscription>/resourceGroups/<rg-name>/providers/Microsoft.Compute/disks/k8s-5b3d7b8f-dynamic-pvc-bdf93a67-9c45-11e8-ba6f-000d3a07de8c
    Kind:         Managed
    FSType:       
    CachingMode:  None
    ReadOnly:     false
Events:           <none>
```

**Release note**:

```release-note
Add node affinity for Azure unzoned managed disks
```

/sig azure
/kind feature

/cc @brendandburns @khenidak @andyzhangx @msau42
2018-08-15 07:10:15 -07:00
Kubernetes Submit Queue c5e74d128d
Merge pull request #66884 from NickrenREN/attacher-detacher-refactor
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>.

Attacher/Detacher refactor for local storage

Proposal link: https://github.com/kubernetes/community/pull/2438

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

Attacher/Detacher refactor for the plugins which just need to mount device, but do not need to attach, such as local storage plugin.

**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
Attacher/Detacher refactor for local storage
```

/sig storage
/kind feature
2018-08-15 07:03:48 -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
andrewsykim 6ea5053531 document expectations for stopped/shutdown instances in cloudprovider.Instances interface 2018-08-15 09:15:24 -04:00
Kubernetes Submit Queue 5aea00d885
Merge pull request #67097 from chakri-nelluri/EIO-Unmountfix
Automatic merge from submit-queue (batch tested with PRs 67396, 67097, 67395, 67365, 67099). 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>.

Ignore EIO error in unmount path

**What this PR does / why we need it**:
This PR ignores EIO in unmount path. XFS shuts down filesystem when the target is down and it returns EIO for the stat calls used in unmount path.

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

**Special notes for your reviewer**:
We already handle ESTALE & ENOTCONN errors in isCorruptedMnt Call. Adding EIO to that list covers the XFS shutdown case.

Also Flexvolume doesn't check for these errors in its current form. Updated Flexvolume code to handle it.

```release-note
NONE
```
2018-08-15 05:45:17 -07:00
Tomas Nozicka dc2cfd5d20 Update Bazel 2018-08-15 13:34:31 +02:00
Tomas Nozicka e434f3189e Deprecate ListWatchUntil, fix it and call places 2018-08-15 13:34:31 +02:00
Kubernetes Submit Queue a8fbaf95f9
Merge pull request #67385 from nikhita/patch-no-op-msg
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>.

kubectl: update message for a no-op patch

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

/cc liggitt juanvallejo soltysh timoreimann 
/sig cli

**Release note**:

```release-note
NONE
```
2018-08-15 04:23:24 -07:00
xuzhonghu 815799638b run update all 2018-08-15 17:18:27 +08:00
xuzhonghu c867bf9cab kubelet support dynamically set glog log level --v 2018-08-15 17:18:25 +08:00
Kubernetes Submit Queue c65f65cf6a
Merge pull request #65065 from sjenning/reduce-backoff-logging
Automatic merge from submit-queue (batch tested with PRs 66177, 66185, 67136, 67157, 65065). 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>.

kubelet: reduce logging for backoff situations

xref https://bugzilla.redhat.com/show_bug.cgi?id=1555057#c6

Pods that are in `ImagePullBackOff` or `CrashLoopBackOff` currently generate a lot of logging at the `glog.Info()` level.  This PR moves some of that logging to `V(3)` and avoids logging in situations where the `SyncPod` only fails because pod are in a BackOff error condition.

@derekwaynecarr @liggitt
2018-08-15 02:09:20 -07:00
Fabio Bertinatto 4ce2058ef6 Add more metrics for A/D Controller:
* Number of Volumes in ActualStateofWorld and DesiredStateofWorld
* Numer of times A/D Controller performs force detach
2018-08-15 10:01:57 +02:00
Kubernetes Submit Queue fba4cf6f4c
Merge pull request #67334 from fqsghostcloud/indent-error-flow
Automatic merge from submit-queue (batch tested with PRs 67294, 67320, 67335, 67334, 67325). 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>.

indent error flow
2018-08-15 00:07:18 -07:00
Kubernetes Submit Queue cfb4a5e95a
Merge pull request #67039 from mortent/AvoidDuplicateRevisionsForStatefulSet
Automatic merge from submit-queue (batch tested with PRs 67071, 66906, 66722, 67276, 67039). 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 for duplicate revisions created by StatefulSet

**What this PR does / why we need it**: This PR replaces PR #65038 as a fix to issue #55159. The statefulset controller can in some situations create more controller revisions than necessary and this change makes sure the controller checks with the API server and only create new revision if the raw data is different.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Avoid creating new controller revisions for statefulsets when cache is stale
```
2018-08-14 22:43:29 -07:00
Kubernetes Submit Queue aad9f0536a
Merge pull request #67276 from seans3/kubectl-extract-2
Automatic merge from submit-queue (batch tested with PRs 67071, 66906, 66722, 67276, 67039). 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>.

Move dependency within kubernetes core to staging

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

This PR moves a dependency from with Kubernetes core (k8s.io/kubernetes/pkg/apis/core) to staging

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

Helps Fix: Remove Kubectl dependencies on kubernetes/pkg/api and kubernetes/pkg/apis

https://github.com/kubernetes/kubectl/issues/83

**Release note**:

```release-note
NONE
```
2018-08-14 22:43:25 -07:00
Kubernetes Submit Queue 698eb760d9
Merge pull request #66722 from luxas/reference_new_generic_structs
Automatic merge from submit-queue (batch tested with PRs 67071, 66906, 66722, 67276, 67039). 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 references to the structs that have moved to their own packages

**What this PR does / why we need it**:
Follows-up https://github.com/kubernetes/kubernetes/pull/66058 and  https://github.com/kubernetes/kubernetes/pull/66059 to remove the structs that now aren't needed in `pkg/apis/componentconfig`

**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 https://github.com/kubernetes/community/pull/2354

**Special notes for your reviewer**:

This PR depends on:
 - [x] https://github.com/kubernetes/kubernetes/pull/67090
 - [x] https://github.com/kubernetes/kubernetes/pull/67149
 - [x] https://github.com/kubernetes/kubernetes/pull/67159
 - [x] https://github.com/kubernetes/kubernetes/pull/67207

**Only review commit 'Remove references to the structs that have moved to their own packages' please**

**Release note**:

```release-note
NONE
```
/kind cleanup
/assign @sttts @thockin @jbeda @liggitt
2018-08-14 22:43:22 -07:00
Kubernetes Submit Queue b6f0aed056
Merge pull request #66906 from tnozicka/rename-until
Automatic merge from submit-queue (batch tested with PRs 67071, 66906, 66722, 67276, 67039). 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>.

#50102 Task 1: Move apimachinery/pkg/watch.Until into client-go/tools/watch.UntilWithoutRetry

**What this PR does / why we need it**:
This is a split off from https://github.com/kubernetes/kubernetes/pull/50102 to go in smaller pieces.

Moves `apimachinery/pkg/watch.Until` into `client-go/tools/watch.UntilWithoutRetry` and adds context so it is cancelable.

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

**Dev release note**:
```dev-release-note
`apimachinery/pkg/watch.Until` has been moved to `client-go/tools/watch.UntilWithoutRetry`.
While switching please consider using the new `client-go/tools/watch.UntilWithSync` or `client-go/tools/watch.Until`.
```

/cc @smarterclayton @kubernetes/sig-api-machinery-pr-reviews 
/milestone v1.12
/priority important-soon
/kind bug
(bug after the main PR which is this split from)
2018-08-14 22:43:19 -07:00
Kubernetes Submit Queue bc60801d18
Merge pull request #66895 from ctriple/master
Automatic merge from submit-queue (batch tested with PRs 61212, 66369, 66446, 66895, 66969). 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>.

pkg/volume/cephfs: fix doc typo, nfs -> cephfs
2018-08-14 21:18:15 -07:00
Kubernetes Submit Queue b4bfb1847c
Merge pull request #66446 from bertinatto/metrics_volume_manager
Automatic merge from submit-queue (batch tested with PRs 61212, 66369, 66446, 66895, 66969). 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 more metrics for Volume Manager

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

This PR adds a few metrics described in the [Metrics Spec](https://docs.google.com/document/d/1Fh0T60T_y888LsRwC51CQHO75b2IZ3A34ZQS71s_F0g/edit#heading=h.ys6pjpbasqdu):

* Number of volumes in ActualStateofWorld and DesiredStateofWorld
* Number of times ReconstructVolume Spec on kubelet failed

**Release note**:

```release-note
NONE
```
2018-08-14 21:18:12 -07:00
Weibin Lin c702a24182 use glog.V().Infof() for formatting output; return nil when err's nil 2018-08-15 11:48:59 +08:00
Kubernetes Submit Queue 1f86c1cf26
Merge pull request #61212 from charrywanganthony/duplicated_import
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 duplicated import

**Release note**:

```release-note
NONE
```
2018-08-14 20:18:00 -07:00
Kubernetes Submit Queue 99053fbf33
Merge pull request #64877 from AdamDang/patch-11
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>.

Typo fix in returned message: utilites->utilities

Line 250: utilites->utilities
2018-08-14 18:57:50 -07:00
Kubernetes Submit Queue d655c9a873
Merge pull request #66923 from jarrpa/pvc-protect-until-pod-delete
Automatic merge from submit-queue (batch tested with PRs 66491, 66587, 66856, 66657, 66923). 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>.

PVC Protection: Wait for Pod delete

Currently, the PVC protection controller will remove its finalizer when
all Pods using a PVC reach at least a Terminating state. However,
certain volumes cannot be guaranteed to be umounted until a Pod is
deleted. Only Pods not in the current pods list can be considered
deleted, so we're removing the exception to not check Terminating Pods.

```release-note
NONE
```

Resolves: #65552

Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
2018-08-14 17:55:17 -07:00
Kubernetes Submit Queue d7634dcf23
Merge pull request #66856 from charrywanganthony/scheduler_space
Automatic merge from submit-queue (batch tested with PRs 66491, 66587, 66856, 66657, 66923). 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 space for output

**Release note**:
```release-note
NONE
```
2018-08-14 17:55:11 -07:00
Kubernetes Submit Queue af2f72af47
Merge pull request #66587 from feiskyer/revert-63905
Automatic merge from submit-queue (batch tested with PRs 66491, 66587, 66856, 66657, 66923). 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>.

Revert #63905: Setup dns servers and search domains for Windows Pods

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

From https://github.com/kubernetes/kubernetes/pull/63905#issuecomment-396709775:

> I don't think this change does anything on Windows. On windows, the network endpoint configuration is taken care of completely by CNI. If you would like to pass on the custom dns polices from the pod spec, it should be dynamically going to the cni configuration that gets passed to CNI. From there, it would be passed down to platform and would be taken care of appropriately by HNS.

> etc\resolve.conf is very specific to linux and that should remain linux speicfic implementation. We should be trying to move away from platform specific code in Kubelet.
Docker is not managing the networking here for windows. So it doens't really care about any network settings. So passing it to docker shim's hostconfig also doens;t make sense here.

DNS for Windows containers will be set by CNI plugins.  And this change also introduced two endpoints for sandbox container.  So this PR reverts #63905 .


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

The PR should also be cherry-picked to release-1.11.

Also, https://github.com/kubernetes/kubernetes/issues/66588 is opened to track the process of pushing this to CNI.

**Release note**:

```release-note
Revert #63905: Setup dns servers and search domains for Windows Pods. DNS for Windows containers will be set by CNI plugins.
```

/sig windows
/sig node
/kind bug
2018-08-14 17:55:07 -07:00
Kubernetes Submit Queue 61226bdd7b
Merge pull request #66491 from Lion-Wei/ipvs-nodeip
Automatic merge from submit-queue (batch tested with PRs 66491, 66587, 66856, 66657, 66923). 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>.

optimize ipvs get nodeIP

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

Optimize ipvs get nodeIP.

The original ipvs `NodeIPs` need first get all local type address to set1, then get address of dummy device `kube-ipvs0` to set2, then do diff of set1 and set2 to get local addresses we need.
This work gonna result in unnecessary resource consumption, especially for large cluster, will have lots address in dummy device `kube-ipvs0`. 

This pr optimized the workaround.

**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-08-14 17:55:04 -07:00
tianshapjq 81081dc9e7 nits in manager.go 2018-08-15 08:16:04 +08:00
Kubernetes Submit Queue 101bf89ae2
Merge pull request #67404 from janetkuo/workloads-owners
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 workloads controller owner files

**Release note**:

```release-note
NONE
```
2018-08-14 16:21:25 -07:00
morrislaw 522db8fce8 Updated comment for DefaultLoadBalancerName to provide further context 2018-08-14 18:20:03 -04:00
Janet Kuo 1fca77dc12 Update workloads controller owner files 2018-08-14 14:20:34 -07:00
Kubernetes Submit Queue cd786bda64
Merge pull request #66863 from cofyc/fix64549
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>.

attachdetach controller: attach volumes immediately when Pod's PVCs are bound

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

Let attachdetach controller to attach volumes immediately when Pod's PVCs are bound.

Current attachdetach controller calls `util.ProcessPodVolume` to add pod volumes into `desiredStateOfWorld` on these events:

- podAdd event
- podUpdate event
- podDelete event
- periodical `desiredStateOfWorldPopulator.findAndAddActivePod`

But if a pod is created with PVCs not bound, no volumes will be added into `desiredStateOfWorld` [because PVCs not bound](https://github.com/kubernetes/kubernetes/blob/v1.12.0-alpha.0/pkg/controller/volume/attachdetach/util/util.go#L99). When pv controller binds PVCs successfully, attachdetach controller will not add pod volumes immediately because it does not watch on PVC events.

It will wait until a pod update event is triggered (normally will not happen because no new status will be reported by kubelet) or `desiredStateOfWorldPopulator.findAndAddActivePod` is called (maybe 0~3 minutes later, see [timer configs](https://github.com/kubernetes/kubernetes/blob/v1.12.0-alpha.0/pkg/controller/volume/attachdetach/attach_detach_controller.go)).

In bad case, pod start time will be very long (~3 minutes + ~2 minutes (kubelet max exponential backoff)), for example: https://github.com/kubernetes/kubernetes/issues/64549#issuecomment-409440546.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
attachdetach controller attaches volumes immediately when Pod's PVCs are bound
```
2018-08-14 13:46:35 -07:00
David Eads 562209d632 update patch to work with --local and avoid extra requests 2018-08-14 15:53:47 -04:00
Kubernetes Submit Queue 76434bd62a
Merge pull request #66780 from NetApp/volumeresize
Automatic merge from submit-queue (batch tested with PRs 66780, 67330). 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>.

Changed admission controller to allow volume expansion for all volume plugins

**What this PR does / why we need it**:
There are two motivations for this change:

1. CSI plugins are soon going to support volume expansion. For such plugins, admission controller doesn't know whether the plugins are capabale of supporting volume expansion or not.
2. Currently, admission controller rejects PVC updates for in-tree plugins that don't support volume expansion (e.g., NFS, iSCSI). This change allows external controllers to expand volumes similar to how external provisioners are accommodated.

**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**:
This PR mimics the behavior of the PV controller when PVs are provisioned externally by logging and setting a new event for PVs that are being expanded externally. As SIG Storage is planning new types of operations on PVs, it may make more sense to a have a single event for all actions taken by external controllers.

**Release note**:

```release-note
The check for unsupported plugins during volume resize has been moved from the admission controller to the two controllers that handle volume resize.
```
/sig storage
/assign @gnufied @jsafrane @wongma7
2018-08-14 12:22:00 -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
Nikhita Raghunath 3d33301332
kubectl: update message for a no-op patch 2018-08-14 18:42:27 +05:30
tianshapjq 27c5ced809 should not event directly 2018-08-14 14:35:47 +08:00
Pengfei Ni dbdfd0fab2 Set nodeAffinity for unmanaged disks 2018-08-14 14:25:15 +08:00
Pengfei Ni cf4981fc80 Update bazel 2018-08-14 14:14:01 +08:00