Commit Graph

27505 Commits (f9a44969540c832ac255caf4cc00e45c0d1e5f31)

Author SHA1 Message Date
Kubernetes Submit Queue 9a8b675d2c
Merge pull request #59630 from k82cn/k8s_59194_0
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>.

Task 0: Added Alpha flag for NoDaemonSetScheduler feature.

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

**Release note**:
```release-note
None
```
2018-02-15 09:10:58 -08:00
Khaled Henidak(Kal) 53036bf755 Code review + resync VMSS changes 2018-02-15 16:49:47 +00:00
Kubernetes Submit Queue 7e8de5422c
Merge pull request #56394 from porridge/fetch-token-retry-longer
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>.

Try longer to fetch initial token.

**What this PR does / why we need it**:
Step towards fixing #56293

**Special notes for your reviewer**:
/kind bug
/priority critial-urgent
@kubernetes/sig-scalability-bugs
/cc @shyamjvs please add to v1.9

**Release note**:
```release-note
NONE
```
2018-02-15 08:31:03 -08:00
Jan Safranek e260096392 Rework volume manager log levels
- all normal logs to go to level 4
- too frequent / duplicate logs go to level 5 (e.g. when something else logged similar message not too far away).
2018-02-15 16:33:17 +01:00
juanvallejo 765f9ec68b
update -o name format to kind.group/name 2018-02-15 10:33:06 -05:00
Ilias Tsitsimpis 6590c3fe35 csi: Remove stale volume path
The CSI mounter creates the following paths during SetUp():

   * .../pods/<podID>/volumes/kubernetes.io~csi/<specVolId>/mount/
   * .../pods/<podID>/volumes/kubernetes.io~csi/<specVolId>/volume_data.json

During TearDown(), it does not remove the `.../kubernetes.io~csi/<specVolId>/`
directory, leaving behind orphan volumes: method cleanupOrphanedPodDirs()
complains with 'Orphaned pod found, but volume paths are still present
on disk'.

Fix that by removing the above directory in removeMountDir().

Signed-off-by: Ilias Tsitsimpis <iliastsi@arrikto.com>
2018-02-15 13:30:36 +02:00
Davanum Srinivas c423be11d5 Process existing cloud nodes in CCM
Existing nodes are sent via update and not via the add function,
so let's add an UpdateCloudNode and just forward it to the
AddCloudNode. This works fine as all we do is look for the cloud
taint and bail out if it is not present.
2018-02-15 06:29:48 -05:00
Marcin Owsiany 3a5d48700c Try longer to fetch initial token. 2018-02-15 10:57:35 +01:00
Kubernetes Submit Queue 7377c5911a
Merge pull request #59892 from JulienBalestra/revert-host-ip
Automatic merge from submit-queue (batch tested with PRs 59877, 59886, 59892). 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: revert the status HostIP behavior

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

This PR partially revert #57106 to fix #59889.

The PR #57106 changed the behavior of `generateAPIPodStatus` when a **kubeClient** is nil.

**Release note**:
```release-note
NONE
```
2018-02-15 00:01:35 -08:00
Kubernetes Submit Queue 4efa72da60
Merge pull request #59877 from dims/standardize-on-kube-proxy-mode-param
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>.

Standardize on KUBE_PROXY_MODE (not KUBEPROXY_MODE)

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

There's a disconnect between 12d4eac038
and the earlier a6af827898. One says
KUBEPROXY_MODE and another says KUBE_PROXY_MODE. Let's just pick one.
Currently we fail with the following error:

hack/local-up-cluster.sh: line 808: KUBEPROXY_MODE: unbound variable

**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-02-14 23:31:23 -08:00
Kubernetes Submit Queue 4b147e0361
Merge pull request #59588 from jiayingz/v1beta1
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 pkg/kubelet/apis/deviceplugin/v1beta1 directory.

The proto stays the same as v1alpha. Only changes Version in
constants.go to "v1beta1" and the BUILD file to pick up the new dir.

```release-note
Adding pkg/kubelet/apis/deviceplugin/v1beta1 API.
```
2018-02-14 22:51:32 -08:00
Kubernetes Submit Queue a8060ab0a1
Merge pull request #59646 from mlmhl/fix_volume_metrics_e2e
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 bound/unbound pv/pvc volume metrics

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

Fix two bugs in bound/unbound pv/pvc volumes metric e2e test:

1. Check `HasRegisteredMaster` in `BeforeEach` instead of each tests because we will grab the metrics in `BeforeEach`

2. Fix `calculateRelativeValues` bug, if there are other PV/PVC exist in the cluster, `calculateRelativeValues` will return a map like `map[string]int64{"some-storage-class-name": 0}`, this will lead to test failure. We should skip these unchanged numbers.

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

**Release note**:

```release-note
NONE
```

/sig storage
2018-02-14 22:10:45 -08:00
Kubernetes Submit Queue 4949b63e0a
Merge pull request #59335 from resouer/equiv-vol
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>.

Fixes volume predicate handler for equiv class

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

Per discussion in #58797 , we are missing some predicate handler in factory.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 #58797

Ref #58222

**Special notes for your reviewer**:

Kindly ping @msau42

**Release note**:

```release-note
Fixes volume predicate handler for equiv class
```
2018-02-14 20:57:08 -08:00
Michael Taufen d8cc440dd6 Rename ConfigOK to KubeletConfigOk
This is a more accurate name for the condition, as it describes the
status of the Kubelet's configuration.

Also cleans up capitalization of internal names.
2018-02-14 19:36:52 -08:00
Kubernetes Submit Queue d38e2234b7
Merge pull request #59878 from humblec/error-string
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>.

Correct error strings and variable name.
2018-02-14 19:30:06 -08:00
Davanum Srinivas 692f2ec305 Standardize on KUBE_PROXY_MODE (not KUBEPROXY_MODE)
There's a disconnect between 12d4eac038
and the earlier a6af827898. One says
KUBEPROXY_MODE and another says KUBE_PROXY_MODE. Let's just pick one.
Currently we fail with the following error:

hack/local-up-cluster.sh: line 808: KUBEPROXY_MODE: unbound variable
2018-02-14 21:26:54 -05:00
Michael Taufen 9ebaf5e7d2 Move the kubeletconfig v1alpha1 API to beta, rename to kubelet.config.k8s.io 2018-02-14 17:30:22 -08:00
JulienBalestra 2130f5bc55 kubelet: revert the status HostIP behavior 2018-02-14 23:38:09 +01:00
Kubernetes Submit Queue 6535c955bf
Merge pull request #59440 from vmware/rohitj-upstream
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use SetInformers method to register for Node events. (#449)

Till 1.9.2 Kubernetes release vSphere Cloud Provider needs a separate service account which is not needed.

**What this PR does / why we need it**: 
In this fix, vSphere CLoud Provider is now implementing SetInformer API to get the required NodeInformer. With this change vSphere Cloud Provider no more requires separate service account for listening NodeEvents.

**Which issue(s) this PR fixes** 
Fixes #58747

**Special notes for your reviewer**:
VMware vSphere Cloud Provide internal change

**Release note**:
```release-note
With this fix, separate service account is not needed for vSphere Cloud Provider for listening node events.
```
2018-02-14 13:46:48 -08:00
Kai Chen 9ca0d32fbb Improve comments for kubelet 2018-02-14 12:03:46 -08:00
steveperry-53 cc7cea74ae Merge branch 'master' into ipv6 2018-02-14 10:45:27 -08:00
Kubernetes Submit Queue 63380d12db
Merge pull request #59666 from mtaufen/kc-secure-componentconfig-defaults
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>.

Secure Kubelet's componentconfig defaults while maintaining CLI compatibility

This updates the Kubelet's componentconfig defaults, while applying the legacy defaults to values from options.NewKubeletConfiguration(). This keeps defaults the same for the command line and improves the security of defaults when you load config from a file.

See: https://github.com/kubernetes/kubernetes/issues/53618
See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166669931

Also moves EnableServer to KubeletFlags, per @tallclair's comments on #53833.

We should find way of generating documentation for config file defaults, so that people can easily look up what's different from flags.

```release-note
Action required: Default values differ between the Kubelet's componentconfig (config file) API and the Kubelet's command line. Be sure to review the default values when migrating to using a config file.
```
2018-02-14 10:09:13 -08:00
Humble Chirammal 64e8111f75 Correct error strings and variable name.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-02-14 23:19:19 +05:30
Kubernetes Submit Queue 429f71bb01
Merge pull request #59846 from wackxu/renamepsc
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>.

rename func ValidatePodSecurityContext to ValidatePod

**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**:
/assign @tallclair 

**Release note**:

```release-note
NONE
```
2018-02-14 09:31:03 -08:00
Shawn Hsiao 4a0bbf2363 kubectl port-forward support resolving service port to target port, and support Service as resource type 2018-02-14 12:02:57 -05:00
Kubernetes Submit Queue 79b1589657
Merge pull request #59788 from Lihua93/fix/typos
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix typos

**What this PR does / why we need it**:
To fix some typos
**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-02-14 08:51:31 -08:00
Jan Safranek 161972272c Add jsafrane as AWS approver. 2018-02-14 17:41:18 +01:00
Jan Safranek c232a0165a Fix DownwardAPI refresh race.
WaitForAttachAndMount should mark only pod in DesiredStateOfWorldPopulator (DSWP)
and DSWP should mark the volume to be remounted only when the new pod has been
processed.

Otherwise DSWP and reconciler race who gets the new pod first. If it's reconciler,
then DownwardAPI and Projected volumes of the pod are not refreshed with new
content and they are updated after the next periodic sync (60-90 seconds).
2018-02-14 16:54:25 +01:00
Kubernetes Submit Queue a129c0f984
Merge pull request #59832 from shyamjvs/fix-fake-docker-client-ip-collision
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>.

Fake docker-client assigns random IPs to containers

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

/cc @wojtek-t @Random-Liu
2018-02-14 07:08:24 -08:00
Shyam Jeedigunta 517301df21
Fake docker-client assigns random IPs to containers 2018-02-14 14:28:52 +01:00
Kubernetes Submit Queue 0dda5c8a7b
Merge pull request #59749 from zioproto/issues/59421-CheckCIDR
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>.

Detect CIDR IPv4 or IPv6 version to select nexthop

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

The node `InternalIP` is used as nexthop by the Kubernetes master to create routes in the Neutron router for Pods reachability.
If a node has more than one `InternalIP`s, eventually IPv4 and IPv6, a random `InternalIP` from the list is returned.
This can lead to the bug described in https://github.com/kubernetes/kubernetes/issues/59421
We need to check when we build a route that the CIDR and the nexthop belong to the same IP Address Family (both IPv4 or both IPv6)

**Which issue(s) this PR fixes** :
Fixes https://github.com/kubernetes/kubernetes/issues/59421
It is related to https://github.com/kubernetes/kubernetes/issues/55202

**Special notes for your reviewer**:
This is the suggested way to fix the problem after the discussion in https://github.com/kubernetes/kubernetes/pull/59502

**Release note**:
```release-note
NONE
```
2018-02-14 04:10:10 -08:00
Kubernetes Submit Queue f2b6e49e6c
Merge pull request #58433 from yue9944882/bugfix/lstat-parent-with-abs-path
Automatic merge from submit-queue (batch tested with PRs 59103, 58433). 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>.

bugfix(mount): lstat with abs path of parent instead of '/..'

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

If a nfs volume with improper permission is mounted on a Pod, operation of deleting this Pod will fail and the pod itself will be stuck at a 'TERMINATING' status. Kubelet cannot reconcile it correctly.

This is because kubelet will try to find the mount-point with '..' file which needs `x` permission of dir.  When it's forbidden, the nfs volume will never umount without a correct mount-point finded.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Get parent dir via canonical absolute path when trying to judge mount-point
```
2018-02-14 03:55:34 -08:00
mlmhl 6f83110e77 add number measurement for bound/unbound pv/pvc 2018-02-14 17:31:14 +08:00
Pengfei Ni 68dcacf6e0 Fix instanceID for vmss nodes 2018-02-14 16:38:49 +08:00
Kubernetes Submit Queue d89e64110a
Merge pull request #59716 from feiskyer/vmss-disk
Automatic merge from submit-queue (batch tested with PRs 59489, 59716). 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 AzureDisk support for vmss nodes

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

This PR adds AzureDisk support for vmss nodes. Changes include

- Upgrade vmss API to 2017-12-01
- Upgrade vmss clients with new version API
- Abstract AzureDisk operations for vmss and vmas
- Added AzureDisk support for vmss
- Unit tests and fake clients fix
 
**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 #43287

**Special notes for your reviewer**:

~~Depending on #59652 (the first two commits are from #59652).~~

**Release note**:

```release-note
Add AzureDisk support for vmss nodes
```
2018-02-14 00:14:34 -08:00
Kubernetes Submit Queue 58dcf3c533
Merge pull request #59489 from pohly/master-tmpdir
Automatic merge from submit-queue (batch tested with PRs 59489, 59716). 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>.

devicemanager testing: dynamically choose tmp dir

This avoids the test issue #59488 that I was running into.

I believe I have a reasonable explanation for the race condition in that issue (TLDR: it's probably part of the gRPC API and k8s can only avoid the issue until a proper solution gets worked out together with gRPC), therefore I suggest to merge this PR now both because it avoids the issue and because using fixed tmp directories is something that should be avoided anyway.

/assign @jiayingz
2018-02-14 00:14:31 -08:00
Kubernetes Submit Queue 2368f70959
Merge pull request #59523 from gnufied/revert-57872-volume_metric_bound_pvc
Automatic merge from submit-queue (batch tested with PRs 57445, 59523). 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 "add number measurement for bound/unbound pv/pvc"

Reverts kubernetes/kubernetes#57872

Fixes : https://github.com/kubernetes/kubernetes/issues/59517
2018-02-13 21:29:29 -08:00
wackxu 9342eff20d rename func ValidatePodSecurityContext to ValidatePod 2018-02-14 10:55:50 +08:00
Kubernetes Submit Queue b22e9a0289
Merge pull request #59685 from cheftako/pkg_master
Automatic merge from submit-queue (batch tested with PRs 59532, 59685, 59797). 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>.

Extend timeout to deal with pkg/master flake.

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

Workaround for bug #59450.
Related to PR #59441.
Locally test runs about 90 seconds.
However on the bazel-test CI the test frequently runs over 5 minutes.
Extending the timeout as a work-around to ease the rerun problem.
As @mikedanese notes :-

The Validate calls to the vendored go-openapi library are which make the test slow:
https://github.com/kubernetes/kubernetes/blob/master/pkg/master/master_openapi_test.go#L91
We should probably do more perf and send a patch to upstream.

**Special notes for your reviewer**:
This is intended as a work-around to unblock other PRs while someone investigates the timeout issue.

**Release note**:
```release-note
NONE
```
2018-02-13 18:48:31 -08:00
Michael Taufen c1e34bc725 Secure Kubelet's componentconfig defaults while maintaining CLI compatibility
This updates the Kubelet's componentconfig defaults, while applying the
legacy defaults to values from options.NewKubeletConfiguration().
This keeps defaults the same for the command line and improves the
security of defaults when you load config from a file.

See: https://github.com/kubernetes/kubernetes/issues/53618
See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166669931
2018-02-13 18:10:15 -08:00
Kubernetes Submit Queue 7b678dc403
Merge pull request #57106 from JulienBalestra/kubelet-update-local-pods
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>.

Kubelet status manager sync the status of local Pods

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

In the kubelet, when using `--pod-manifest-path` the kubelet creates static pods but doesn't update the status accordingly in the `PodList`.

This PR fixes the incorrect status of each Pod in the kubelet's `PodList`.

This is the setup used to reproduce the issue:

**manifest**:

```bash
cat ~/kube/staticpod.yaml
```

```yaml
apiVersion: v1
kind: Pod
metadata:
  labels:
    app: nginx
  name: nginx
  namespace: default
spec:
  hostNetwork: true
  containers:
  - name: nginx
    image: nginx:latest
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - name: os-release
      mountPath: /usr/share/nginx/html/index.html
      readOnly: true

  volumes:
  - name: os-release
    hostPath:
      path: /etc/os-release
```


**kubelet**:

```bash
~/go/src/k8s.io/kubernetes/_output/bin/kubelet --pod-manifest-path ~/kube/ --cloud-provider="" --register-node --kubeconfig kubeconfig.yaml
```


You can observe this by querying the kubelet API `/pods`:

```bash
curl -s 127.0.0.1:10255/pods | jq .
```

```json
{
  "kind": "PodList",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "metadata": {
        "name": "nginx-nodeName",
        "namespace": "default",
        "selfLink": "/api/v1/namespaces/default/pods/nginx-nodeName",
        "uid": "0fdfa64c73d9de39a9e5c05ef7967e72",
        "creationTimestamp": null,
        "labels": {
          "app": "nginx"
        },
        "annotations": {
          "kubernetes.io/config.hash": "0fdfa64c73d9de39a9e5c05ef7967e72",
          "kubernetes.io/config.seen": "2017-12-12T18:42:46.088157195+01:00",
          "kubernetes.io/config.source": "file"
        }
      },
      "spec": {
        "volumes": [
          {
            "name": "os-release",
            "hostPath": {
              "path": "/etc/os-release",
              "type": ""
            }
          }
        ],
        "containers": [
          {
            "name": "nginx",
            "image": "nginx:latest",
            "resources": {},
            "volumeMounts": [
              {
                "name": "os-release",
                "readOnly": true,
                "mountPath": "/usr/share/nginx/html/index.html"
              }
            ],
            "terminationMessagePath": "/dev/termination-log",
            "terminationMessagePolicy": "File",
            "imagePullPolicy": "IfNotPresent"
          }
        ],
        "restartPolicy": "Always",
        "terminationGracePeriodSeconds": 30,
        "dnsPolicy": "ClusterFirst",
        "nodeName": "nodeName",
        "hostNetwork": true,
        "securityContext": {},
        "schedulerName": "default-scheduler",
        "tolerations": [
          {
            "operator": "Exists",
            "effect": "NoExecute"
          }
        ]
      },
      "status": {
        "phase": "Pending",
        "conditions": [
          {
            "type": "PodScheduled",
            "status": "True",
            "lastProbeTime": null,
            "lastTransitionTime": "2017-12-12T17:42:51Z"
          }
        ]
      }
    }
  ]
}
```

The status of the nginx `Pod` will remain in **Pending** state phase.

```bash
curl -I 127.0.0.1
HTTP/1.1 200 OK
```

It's reported as expected on the apiserver side:

```bash
kubectl get po --all-namespaces -w

NAMESPACE   NAME                    READY     STATUS    RESTARTS   AGE
default     nginx-nodeName   0/1       Pending   0          0s
default     nginx-nodeName   1/1       Running   0          2s
```


It doesn't work either with a standalone kubelet:

```bash
~/go/src/k8s.io/kubernetes/_output/bin/kubelet --pod-manifest-path ~/kube/ --cloud-provider="" --register-node false
```

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-02-13 16:46:33 -08:00
Pengfei Ni fbc871be32 Add vmType checking in Azure disk controller common 2018-02-14 08:38:34 +08:00
Khaled Henidak(Kal) f909859b6d fix json tag on Azure.config 2018-02-13 22:22:25 +00:00
Kubernetes Submit Queue 2a8049890a
Merge pull request #59492 from dims/remove-old-keystone-authenticator
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 experimental keystone authenticator

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

experimental-keystone-url and experimental-keystone-ca-file were always
experimental. So we don't need a deprecation period.
KeystoneAuthenticator was on the server side and needed userid/password
to be passed in and used that to authenticate with Keystone. We now
have authentication and authorization web hooks that can be used. There
is a external repo with a webook for keystone which works fine along
with the kubectl auth provider that was added in:
a0cebcb559

So we don't need this older style / hard coded / experimental code
anymore.

**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
kube-apiserver: the experimental in-tree Keystone password authenticator has been removed in favor of extensions that enable use of Keystone tokens.
```
2018-02-13 14:14:45 -08:00
Khaled Henidak(Kal) 9e4f1441b4 Merge branch 'master' of https://github.com/kubernetes/kubernetes into az-ratelimit 2018-02-13 20:57:05 +00:00
Khaled Henidak(Kal) a86062c259 Configuration changes 2018-02-13 20:56:53 +00:00
Khaled Henidak(Kal) 5bf6b0fd70 WIP - create read/writer rate limiter 2018-02-13 20:05:20 +00:00
Kubernetes Submit Queue 1d97b6a4f1
Merge pull request #59705 from phsiao/15180_port_forward_with_resource_name
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>.

kubectl port-forward allows using resource name to select a matching pod

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

#15180 describes use cases that port-foward should use resource name for selecting a pod.

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

Add support so resource/name can be used to select a pod.

**Special notes for your reviewer**:

I decided to reuse `AttachablePodForObject` to select a pod using resource name, and extended it to support Service (which it did not).   I think that should not be a problem, and may help improve attach's use case.  If it makes more sense to fork the function I'd be happy to do so.  The practice of waiting for pods to become ready is also copied over.

In keeping the change to minimal, I also decided to resolve pod from resource name in Complete(), following the pattern in attach.

**Release note**:

```release-note
kubectl port-forward now allows using resource name (e.g., deployment/www) to select a matching pod, as well as allows the use of --pod-running-timeout to wait till at least one pod is running.
kubectl port-forward no longer support deprecated -p flag
```
2018-02-13 11:51:46 -08:00
Kubernetes Submit Queue 2cd6cd6e86
Merge pull request #59818 from msau42/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 reviewers to util/mount

**What this PR does / why we need it**:
Add some more reviewers

**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-02-13 11:13:04 -08:00
Kubernetes Submit Queue bd6b71d015
Merge pull request #59582 from sttts/sttts-ctrl-mgr-auth
Automatic merge from submit-queue (batch tested with PRs 59653, 58812, 59582, 59665, 59511). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

controller-manager: switch to options+config pattern and add https+auth

This PR switch the {kube,cloud}-controller-managers to use the Options+Config struct pattern for bootstrapping, as we use it throughout all apiservers. This allows us to easily plug in https and authn/z support.

Fixes parts of https://github.com/kubernetes/kubernetes/issues/59483

This is equivalent to https://github.com/kubernetes/kubernetes/pull/59408 after squashing.

```release-note
Deprecate insecure HTTP port of kube-controller-manager and cloud-controller-manager. Use `--secure-port` and `--bind-address` instead.
```
2018-02-13 11:12:47 -08:00
Michelle Au 377bff614d add reviewers to util/mount 2018-02-13 10:06:27 -08:00
Kubernetes Submit Queue 9de5839944
Merge pull request #59681 from mtaufen/kc-empty-eviction-hard
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>.

Ignore 0% and 100% eviction thresholds

Primarily, this gives a way to explicitly disable eviction, which is
necessary to use omitempty on EvictionHard.
See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166672137

As justification for this approach, neither 0% nor 100% make sense as
eviction thresholds; in the "less-than" case, you can't have less than
0% of a resource and 100% perpetually evicts; in the
"greater-than" case (assuming we ever add a resource with this
semantic), the reasoning is the reverse (not more than 100%, 0%
perpetually evicts).

```release-note
Eviction thresholds set to 0% or 100% are now ignored.
```
2018-02-13 09:48:11 -08:00
Shawn Hsiao 139c62c3e9 kubectl port-forward allows using resource name to select a matching pod 2018-02-13 12:10:02 -05:00
Kubernetes Submit Queue 01bd3c4b74
Merge pull request #59734 from mlmhl/format_imports
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>.

Format some import statements in scheduler pkg

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

As the title says, apply `goimports` on some files under `pkg/scheduler` pkg.

**Release note**:

```release-note
NONE
```
2018-02-13 08:04:15 -08:00
Kubernetes Submit Queue f61b4a4e4a
Merge pull request #59779 from timothysc/timothysc
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 myself (timothysc) from OWNERS files on areas that I do not maintain

I do not actively participate in api-machinery, so I'm removing myself from the OWNERS files.  

/cc @ncdc
2018-02-13 07:15:36 -08:00
Dan Winship 07ead7d8e2 Don't create no-op iptables rules for services with no endpoints 2018-02-13 07:52:47 -05:00
Kubernetes Submit Queue fd553ca8e2
Merge pull request #53766 from liggitt/ui-redirect
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 /ui/ redirect

The existing kube-apiserver hard-codes `/ui` to redirect to an optional add-on, which is not appropriate. It does not work in the following scenarios:
* https-enabled dashboards
* the dashboard is deployed to a different namespace or service name
* the dashboard is not installed at all
* authorization is enabled and does not allow access to /ui

This PR removes the hard-coded `/ui` redirect.

```release-note
apiserver: the /ui kube-dashboard redirect has been removed. Follow instructions specific to your deployment to access kube-dashboard
```
2018-02-13 04:29:18 -08:00
Dr. Stefan Schimanski f4564ea0b8 controller-manager: add SecureServingOptions 2018-02-13 11:16:47 +01:00
Dr. Stefan Schimanski 4e0114b0dd apiserver: make SecureServingOptions and authz/n options re-usable 2018-02-13 11:16:38 +01:00
stewart-yu 0cbe0a6034 controller-manager: switch to config/option struct pattern 2018-02-13 11:16:17 +01:00
Saverio Proto 2eff8bf31f Detect CIDR IPv4 or IPv6 version to select nexthop
https://github.com/kubernetes/kubernetes/issues/59421
https://github.com/kubernetes/kubernetes/issues/55202
2018-02-13 09:50:31 +01:00
Lihua Tang cad52f6576 Fix typos 2018-02-13 16:17:37 +08:00
Kubernetes Submit Queue ba791275ce
Merge pull request #59671 from bsalamat/sched_queue_perf
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>.

Improve performance of scheduling queue by adding a hash map to track all pods with a nominatedNodeName

**What this PR does / why we need it**:
Our investigations show that there is a performance regression in the new scheduling queue which is not enabled by default and is enabled only if "priority and preemption" which is an alpha feature is enabled. This PR is an important performance improvement for those who want to use priority and preemption in larger clusters.
The PR adds a hash table to track nominated Pods so that finding such Pods will be faster.
Other than improving performance, we don't expect this PR to change behavior of scheduler.

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

ref/ #56032
ref/ #57471 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig scheduling
2018-02-13 00:07:58 -08:00
Kubernetes Submit Queue 9438e14d39
Merge pull request #52528 from m1093782566/refactor-proxy
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>.

Refactor kube-proxy service/endpoints update so that can be consumed among different proxiers

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

There are huge duplication among different proxiers.  For example, the service/endpoints list/watch part in iptables, ipvs and windows kernel mode(to be get in soon).

I think the more places this is replicated the harder it becomes to keep correct. We may need to refactor it and let different proxiers consume the same code.

**Which issue this PR fixes**: 

fixes #52464

**Special notes for your reviewer**:

* This refactor reduces **500** Lines in iptables proxy, so it will reduce **500*N**(number of proxiers) lines in total. People no need to care the service/endpoints update logic any more and can be more focus on proxy logic.

* I would like to do the following things in follow-ups:

1. rsync it to ipvs proxier

2. rsync it to winkernel proxier

**Release note**:

```release-note
Refactor kube-proxy service/endpoints update so that can be consumed among different proxiers
```
2018-02-12 23:29:50 -08:00
Kubernetes Submit Queue ff7918d1f1
Merge pull request #59499 from soltysh/cronjob_short
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 short name for cronjob

**What this PR does / why we need it**:
Following https://github.com/kubernetes/kubernetes/pull/59061 I'm adding short name for cronjob, since I was asked about it several times and was thinking about this for a long.


**Release note**:
```release-note
CronJobs can be accessed through cj alias
```
2018-02-12 20:19:56 -08:00
Kubernetes Submit Queue 757c24d224
Merge pull request #57969 from jsafrane/aws-approver
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 gnufied as AWS approver.

@gnufied has been maintaining the storage part of AWS cloud provider for a long while and he deserves to be approver.

```release-note
NONE
```

/sig aws
2018-02-12 19:41:02 -08:00
Kubernetes Submit Queue 91c783e20b
Merge pull request #59739 from andyzhangx/azuredisk-initaccount
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix the error prone account creation method of blob disk

**What this PR does / why we need it**:
use new account generation method for blob disk to fix the error prone account creation method of blob 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 #59738

**Special notes for your reviewer**:

**Release note**:

```
fix the error prone account creation method of azure blob disk
```

/assign @karataliu 
/sig azure
2018-02-12 19:03:37 -08:00
Kubernetes Submit Queue 821cf9234d
Merge pull request #59246 from huangjiuyuan/scheduler/add-tests-for-schedulercache
Automatic merge from submit-queue (batch tested with PRs 59479, 59246). 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 tests for schedulercache

**What this PR does / why we need it**:
Add tests for `node_info.go` under `schedulercache` package.

**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**:
```
NONE
```
2018-02-12 17:14:31 -08:00
Timothy St. Clair da77826d08 Remove myself (timothysc) from OWNERS files on areas that I do not
actively maintain.
2018-02-12 18:56:41 -06:00
Kubernetes Submit Queue ab2e1cb02a
Merge pull request #59479 from tossmilestone/avoid-ecahe-update-race
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>.

Avoid race condition when updating equivalence cache

**What this PR does / why we need it**:
Lock the ecache to update the ecache on each predicate running, to avoid race condition.

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

**Special notes for your reviewer**:
None

**Release note**:

```release-note
None
```
2018-02-12 16:38:07 -08:00
Kubernetes Submit Queue 4afdc33c57
Merge pull request #56454 from mtanino/volumehandler-refactor
Automatic merge from submit-queue (batch tested with PRs 59767, 56454, 59237, 59730, 55479). 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>.

Block Volume: Refactor volumehandler in operationexecutor

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

Based on discussion with @saad-ali at #51494, we need refactor volumehandler in operationexecutor
for Block Volume feature. We don't need to add volumehandler as separated object.

```
VolumeHandler does not need to be a separate object that is constructed inline like this. 
You can create a new operation, e.g. UnmountOperation to which you pass the spec,
and it can return either a UnmountVolume or UnmapVolume.
```

**Which issue(s) this PR fixes** : no related issue.

**Special notes for your reviewer**:

@saad-ali @msau42 

**Release note**:

```release-note
NONE
```
2018-02-12 15:44:33 -08:00
Kubernetes Submit Queue 4efbb71bf6
Merge pull request #59767 from sjenning/check-phase-transition
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>.

kubelet: check for illegal phase transition

I have been unable to root cause the transition from `Failed` phase to `Succeeded`.  I have been unable to recreate as well.  However, our CI in Origin, where we have controllers that look for these transitions and rely on the phase transition rules being respected, obviously indicate that the illegal transition does occur.

This PR will prevent the illegal phase transition from propagating into the kubelet caches or the API server.

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

xref https://github.com/openshift/origin/issues/17595

@dashpole @yujuhong @derekwaynecarr @smarterclayton @tnozicka
2018-02-12 15:13:21 -08:00
Michael Taufen 21dbbe14f2 Ignore 0% and 100% eviction thresholds
Primarily, this gives a way to explicitly disable eviction, which is
necessary to use omitempty on EvictionHard.
See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166672137

As justification for this approach, neither 0% nor 100% make sense as
eviction thresholds; in the "less-than" case, you can't have less than
0% of a resource and 100% perpetually evicts; in the
"greater-than" case (assuming we ever add a resource with this
semantic), the reasoning is the reverse (not more than 100%, 0%
perpetually evicts).
2018-02-12 14:13:00 -08:00
Kubernetes Submit Queue f072871b07
Merge pull request #59359 from khenidak/svc-remove-sync
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

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

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

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

**Release note**:
```release-note
1. Controller-manager --service-sync-period flag is removed (was never used in the code).
```
2018-02-12 13:50:09 -08:00
Khaled Henidak(Kal) 82e1fdaebf Merge branch 'master' of https://github.com/kubernetes/kubernetes into az-ratelimit 2018-02-12 21:29:04 +00:00
Seth Jennings 9ab9ddeb19 kubelet: check for illegal phase transition 2018-02-12 15:28:10 -06:00
Kubernetes Submit Queue 245ca8ef1f
Merge pull request #59291 from bsalamat/fix_validation
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 validation failure of Pod priority when the feature is disabled

**What this PR does / why we need it**:
I learned that fields specified in the API should be silently ignored when the feature is disabled. This makes sense as downgrading a cluster would fail otherwise. This PR removes the validation logic that ensures Pod priority is not set when priority feature is disabled.

**Special notes for your reviewer**:

**Release note**:

```release-note
Pod priority can be specified ins PodSpec even when the feature is disabled, but it will be effective only when the feature is enabled.
```

/sig scheduling
ref: #57471
2018-02-12 11:54:39 -08:00
Kubernetes Submit Queue 7488d1c921
Merge pull request #59571 from dims/skip-test-routes-when-there-are-no-vms
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>.

Skip TestRoutes when there are no vm(s)

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

TestRoutes assumes that there is at least one vm in the OpenStack it
is connecting to. So let's limit this test to run properly only when
we are running in a VM or one was created already outside of the
test harness


**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**:
Please see https://github.com/dims/openstack-cloud-controller-manager/issues/73 for some more context

**Release note**:

```release-note
NONE
```
2018-02-12 10:25:55 -08:00
Bobby (Babak) Salamat df5fc09411 compare Pods by UID, not by name and namespace 2018-02-12 10:13:13 -08:00
Jordan Liggitt f8e206e802
Remove /ui/ redirect 2018-02-12 10:54:33 -05:00
Kubernetes Submit Queue 66ccfcb4c7
Merge pull request #59640 from jianglingxia/jlx-2018020917
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>.

correct the ConstructVolumeSpec func path value

**What this PR does / why we need it**:
the path value is incorrect
**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-02-12 07:15:13 -08:00
andyzhangx 8a7198b036 use new account generation method for blob disk
fix comments

change azureDiskSharedAccountNamePrefix var

rename sharedDiskAccountNamePrefix

use default vhd container name as "vhds"

use one commaon func: SearchStorageAccount

fix comments
2018-02-12 13:09:29 +00:00
Kubernetes Submit Queue 4cc993a720
Merge pull request #59747 from feiskyer/fix-59746
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>.

Map correct vmset name for internal load balancers

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

When creating an internal loadbalancer, e.g.

```sh
cat << EOF | kubectl create -f -
apiVersion: v1
kind: Service
metadata:
  name: ingress-nginx
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
spec:
  type: LoadBalancer
  ports:
  - name: http
    port: 80
    targetPort: 80
    protocol: TCP
  - name: https
    port: 443
    targetPort: 443
    protocol: TCP
  selector:
    app: ingress-nginx
EOF
```

Then wait a while, and no target backends present for the internal load balancer even after 15 mins.

![](https://user-images.githubusercontent.com/10303889/36070528-54aa9848-0f22-11e8-834b-7401a2fa7611.png)

Refer https://github.com/Azure/acs-engine/issues/2151#issuecomment-364726846.

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

**Special notes for your reviewer**:

Should cherry pick to v1.9, v1.8, and v1.7 (and requires resolving conflicts manually).

**Release note**:

```release-note
Map correct vmset name for internal load balancers
```
2018-02-12 04:46:00 -08:00
Kubernetes Submit Queue 198a098d9d
Merge pull request #59506 from juanvallejo/jvallejo/handle-watch-multiple-reqs
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix --watch on multiple requests

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

`kubectl get <resource> --watch` only supports watching a single resource kind at a time.
This check fails if more than one resource `Info` is returned.

When dealing with large quantities of a single resource kind, or an amount that exceeds the value of `--chunk-size`, more than one request is made to the server causing a resource `Info` to be created for each of the requests, ultimately causing the above check to fail even though we are dealing with the same type of resource.

This patch modifies that check to take into account the GVKs of all infos returned, and only fail if at least one differs.

cc @deads2k
2018-02-12 02:25:45 -08:00
Pengfei Ni 8c382649ba Add unit tests for mapLoadBalancerNameToVMSet 2018-02-12 16:07:11 +08:00
Pengfei Ni d3e0280c3a Map correct vmset name for internal load balancers 2018-02-12 15:56:57 +08:00
Pengfei Ni 1976983e79 Fix unit tests for vmss 2018-02-12 14:07:05 +08:00
Pengfei Ni 4b453fb3ed update azure API for auth 2018-02-12 14:07:05 +08:00
Pengfei Ni 890b7efb1d Add azure disk support of vmss 2018-02-12 14:07:05 +08:00
Pengfei Ni 5042cea857 Use new clients for vmss cache 2018-02-12 14:07:05 +08:00
Pengfei Ni 3b7cc3dd5e Update Azure GO SDK to v12.4.0-beta 2018-02-12 14:07:05 +08:00
Pengfei Ni 5d16067ddd Update vmss fake clients 2018-02-12 14:07:05 +08:00
Pengfei Ni 829e0946e5 Update vmss client to new version 2018-02-12 14:07:05 +08:00
Pengfei Ni 11e5399dde Abstract disk operation interfaces in VMSet 2018-02-12 14:07:05 +08:00
Pengfei Ni 6dcd56549a Use full instanceID as lun lock key
This is because the last part of VMSS instances are numbers, which may
be same if there are multiple VMSS within same cluster.
2018-02-12 14:07:05 +08:00
Kubernetes Submit Queue 69324f90e6
Merge pull request #59652 from feiskyer/vmss-cache
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 generic cache for Azure VMSS

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

This PR adds a generic cache for VMSS and removes old list-based cache.

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

Continue of ##58770.

**Special notes for your reviewer**:

Depends on #59520.

**Release note**:

```release-note
Add generic cache for Azure VMSS
```
2018-02-11 21:22:45 -08:00
Pengfei Ni bde2989c7a Add unit tests for extractVmssVMName 2018-02-12 11:21:08 +08:00
mlmhl b3fff71161 format some import statements in scheduler pkg 2018-02-12 09:04:00 +08:00
Kubernetes Submit Queue 74089bc4bb
Merge pull request #58737 from NickrenREN/fix-scheduler-ephemeral-storage
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>.

Subtract local ephemeral storage resource from NodeInfo when removing pod

**What this PR does / why we need it**:
When we are removing pods, we need to subtract local ephemeral storage resource from NodeInfo

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

**Special notes for your reviewer**:

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

/kind bug
/sig storage
/sig scheduling

/assign @jingxu97  @bsalamat
2018-02-11 13:43:01 -08:00
Yecheng Fu fecff55c59 Fix kubelet PVC metrics using a volume stats collector.
Volumes on each node changes, we should not only add PVC metrics into
gauge vector. It's better use a collector to collector metrics from
stats.
2018-02-11 23:48:06 +08:00
Kubernetes Submit Queue cfa6774540
Merge pull request #56557 from andyzhangx/azurefile-createaccount
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix the create azure file pvc failure if there is no storage account in current resource group

**What this PR does / why we need it**:
When create an azure file PVC, there will be error if there is no storage account in current resource group.
With this PR, a storage account will be created if there is no storage account in current resource group.

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

**Special notes for your reviewer**:
1. rephrase the code logic of `CreateFileShare` func.
```
if accountName is empty, then 
    find a storage account that matches accountType
    if no storage account found, then
        create a new account
else
    we only use user specified storage account

create a file share according to found storage account
```
2. Use func `getStorageAccountName` to get a unique storage account name by UUID, a storage account for azure file would be like `f0b2b0bd40c010112e897fa`. And in next PR, I will use this function to create storage account for azure disk, the storage account for azure disk would be like `d8f3ad8ad92000f1e1e88bd`.

**Release note**:

```
fix the create azure file pvc failure if there is no storage account in current resource group
```
/sig azure
/assign @rootfs
2018-02-11 05:03:32 -08:00
xiangpengzhao 131ce79c65 Update fuzzer to reflect FeatureGates type change. 2018-02-11 15:15:22 +08:00
xiangpengzhao 58bb1447e9 Auto generated files. 2018-02-11 14:40:13 +08:00
xiangpengzhao 57071d85ee Migrate FeatureGates type of kube-proxy from string to map[string]bool 2018-02-11 14:40:13 +08:00
andyzhangx aa21bef677 create storage account if necessary when create azure file pvc
use new storage account name generation method

use uuid to generate account name

change azure file account prefix

use uniqueID to generate a storage account name

fix comments

fix comments

fix comments

fix a storage account matching bug

only use UUID in getStorageAccountName func

use shorter storage account prefix for azure file

fix comments

fix comments

fix comments

fix rebase build error

rewrite CreateFileShare code logic

fix gofmt issue

fix test error

fix comments

fix a location matching bug
2018-02-11 06:29:05 +00:00
Kubernetes Submit Queue 317853c90c
Merge pull request #59464 from dixudx/fix_all_typos
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix all the typos across the project

**What this PR does / why we need it**:
There are lots of typos across the project. We should avoid small PRs on fixing those annoying typos, which is time-consuming and low efficient.

This PR does fix all the typos across the project currently. And with #59463, typos could be avoided when a new PR gets merged.

**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**:
/sig testing
/area test-infra
/sig release
/cc @ixdy 
/assign @fejta 

**Release note**:

```release-note
None
```
2018-02-10 22:12:45 -08:00
Kubernetes Submit Queue 21eff15056
Merge pull request #59715 from dims/switch-FengyunPan-id-to-FengyunPan2
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>.

New github id - FengyunPan -> FengyunPan2

PanFengyun <pan_feng_yun@163.com>'s previous github id was @FengyunPan

Due to some problem with github, he lost access to @FengyunPan and
is not using @FengyunPan2. So let's switch over to the new id. Github
has promised to release the previous id back in 6 months, so we may
have to switch it back later.



**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-02-10 20:40:34 -08:00
Kubernetes Submit Queue da8b79ecfe
Merge pull request #58364 from stewart-yu/fixiptableError
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-proxy]fix bad error message in kube-proxy.log when run cluster in local

**What this PR does / why we need it**:
When run `hack/local-up-cluster.sh` in local with `iptable` proxymode, we can see `/tmp/kube-proxy.log ` include some error messages, like that:
```shell
E0117 09:10:45.720142  108141 proxier.go:863] Error deleting dummy device kube-ipvs0 created by IPVS proxier: error deleting a non-exist dummy device: kube-ipvs0
E0117 09:10:45.729617  108141 proxier.go:838] Failed to execute iptables-restore for nat: exit status 1 (iptables-restore: line 7 failed
)
E0117 09:10:45.730508  108141 proxier.go:876] Error removing ipset KUBE-LOOP-BACK, error: error destroying set KUBE-LOOP-BACK:, error: exit status 1
E0117 09:10:45.731329  108141 proxier.go:876] Error removing ipset KUBE-CLUSTER-IP, error: error destroying set KUBE-CLUSTER-IP:, error: exit status 1
E0117 09:10:45.732100  108141 proxier.go:876] Error removing ipset KUBE-LOAD-BALANCER, error: error destroying set KUBE-LOAD-BALANCER:, error: exit status 1
E0117 09:10:45.732855  108141 proxier.go:876] Error removing ipset KUBE-NODE-PORT-TCP, error: error destroying set KUBE-NODE-PORT-TCP:, error: exit status 1
E0117 09:10:45.735082  108141 proxier.go:876] Error removing ipset KUBE-NODE-PORT-UDP, error: error destroying set KUBE-NODE-PORT-UDP:, error: exit status 1
E0117 09:10:45.735829  108141 proxier.go:876] Error removing ipset KUBE-EXTERNAL-IP, error: error destroying set KUBE-EXTERNAL-IP:, error: exit status 1
E0117 09:10:45.736619  108141 proxier.go:876] Error removing ipset KUBE-LOAD-BALANCER-SOURCE-IP, error: error destroying set KUBE-LOAD-BALANCER-SOURCE-IP:, error: exit status 1
E0117 09:10:45.737360  108141 proxier.go:876] Error removing ipset KUBE-LOAD-BALANCER-SOURCE-CIDR, error: error destroying set KUBE-LOAD-BALANCER-SOURCE-CIDR:, error: exit status 1
E0117 09:10:45.738114  108141 proxier.go:876] Error removing ipset KUBE-LOAD-BALANCER-MASQ, error: error destroying set KUBE-LOAD-BALANCER-MASQ:, error: exit status 1
```
**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/58366](https://github.com/kubernetes/kubernetes/issues/58366)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-10 20:40:20 -08:00
Davanum Srinivas 7ef4f207c2 New github id - FengyunPan -> FengyunPan2
PanFengyun <pan_feng_yun@163.com>'s previous github id was @FengyunPan

Due to some problem with github, he lost access to @FengyunPan and
is not using @FengyunPan2. So let's switch over to the new id. Github
has promised to release the previous id back in 6 months, so we may
have to switch it back later.
2018-02-10 22:28:51 -05:00
Pengfei Ni f32bd6a081 Adjust unit tests for vmss 2018-02-11 11:09:22 +08:00
Pengfei Ni 4d5e7b7cfb Use generic cache for vmss 2018-02-11 11:09:22 +08:00
Kubernetes Submit Queue f0e573d6d5
Merge pull request #59520 from feiskyer/new-cache
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 generic cache for Azure VM/LB/NSG/RouteTable

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

Part of #58770. This PR adds a generic cache of Azure VM/LB/NSG/RouteTable for reducing ARM calls.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Add generic cache for Azure VM/LB/NSG/RouteTable
```
2018-02-10 19:06:02 -08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
hangaoshuai 7cfb94cbc5 Use SeekStart, SeekCurrent, and SeekEnd repalace of deprecated constant 2018-02-11 11:02:23 +08:00
stewart-yu 2e67243497 fix deleting dummy device error in kube-proxy.log when run cluster in local 2018-02-11 10:59:09 +08:00
stewart-yu 970f6528f2 fix "destroying ipset" error in kube-proxy.log when run cluster in local 2018-02-11 10:59:09 +08:00
Kubernetes Submit Queue 9d33926d5c
Merge pull request #59628 from mtaufen/kc-hide-trial-duration
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>.

Bury KubeletConfiguration.ConfigTrialDuration for now

Based on discussion in https://github.com/kubernetes/kubernetes/pull/53833/files#r166669046, this PR chooses not to expose a knob for the trial duration yet. It is unclear exactly which shape this functionality should take in the API.

```release-note
The alpha KubeletConfiguration.ConfigTrialDuration field is no longer available.
```
2018-02-10 14:03:08 -08:00
Kubernetes Submit Queue dd71bf035f
Merge pull request #51339 from zjj2wry/kubectl-run
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 error logs in kubectl run

**What this PR does / why we need it**:
closes issue #29307 
now will get log with different cases:
```bash
kubectl run hello-node --image=aronchick/hello-node:2.0 --port=8080 --expose=true
service "hello-node" created
deployment "hello-node" created
kubectl run hello-node --image=aronchick/hello-node:2.0 --port=8080 --expose=true
Error from server (AlreadyExists): deployments.extensions "hello-node" already exists
Error from server (AlreadyExists): services "hello-node" already exists
kubectl delete deploy hello-node
deployment "hello-node" deleted
kubectl run hello-node --image=aronchick/hello-node:2.0 --port=8080 --expose=true
deployment "hello-node" created
Error from server (AlreadyExists): services "hello-node" already exists
kubectl delete svc hello-node
service "hello-node" deleted
kubectl run hello-node --image=aronchick/hello-node:2.0 --port=8080 --expose=true
service "hello-node" created
Error from server (AlreadyExists): deployments.extensions "hello-node" already exists
```

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-10 13:27:02 -08:00
Jesse Haka 6665fa7144 taint also node controller
fix function

fix gofmt

fix function return value

fix tests

skip notimplemented error

remove factory unused

in openstack we should try to find instanceid from all states instead of ACTIVE, all other cloudproviders do this already

fix tests and lint

fix gofmt

fix nodelifecycletest

fix lint errors
2018-02-10 15:41:24 +02:00
huangjiuyuan 7d12796297 Add tests for schedulercache 2018-02-10 16:24:16 +08:00
Kubernetes Submit Queue 28b4bb0fd6
Merge pull request #59540 from andyzhangx/azurefile-windows-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>.

return error if New-SmbGlobalMapping failed when mounting azure file on Windows

**What this PR does / why we need it**:
This PR will return error if New-SmbGlobalMapping failed when mounting azure file on Windows.
User wants to create a pod moutning with azure file pvc using static provisioning([doc](https://github.com/andyzhangx/Demo/tree/master/windows/azurefile#static-provisioning-for-azure-file-on-windows-server-version-1709support-from-v17x])) and user uses a wrong storage account name or key, current behavior is if mount azure file on Windows, it will create an empty directory, and user would not know actually it fails.

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

**Special notes for your reviewer**:

**Release note**:

```
return error if New-SmbGlobalMapping failed when mounting azure file on Windows
```
2018-02-09 23:21:53 -08:00
NickrenREN 6e44d9522c release local ephemeral storage resource when removing pod 2018-02-10 11:36:11 +08:00
Walter Fender 68bb96d0ae Extend timeout to deal with pkg/master flake.
Workaround for bug #59450.
Related to PR #59441.
Locally test runs about 90 seconds.
However on the bazel-test CI the test frequently runs over 5 minutes.
Extending the timeout as a work-around to ease the rerun problem.
As @mikedanese notes :-

The Validate calls to the vendored go-openapi library are which make the test slow:
https://github.com/kubernetes/kubernetes/blob/master/pkg/master/master_openapi_test.go#L91
We should probably do more perf and send a patch to upstream.
2018-02-09 17:24:08 -08:00
Bobby (Babak) Salamat 69d62a9288 Improve performance of scheduling queue by adding a hash map to track all pods in with a nominatedNodeName. 2018-02-09 14:07:29 -08:00
Kubernetes Submit Queue 15ad217603
Merge pull request #59382 from bsalamat/no_system_priority
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>.

Disallow PriorityClass names with 'system-' prefix for user defined priority classes

**What this PR does / why we need it**:
This PR changes our Priority admission controller to disallow PriorityClass names with 'system-' prefix for user defined priority classes. Please refer to #59381 for reasons why we need this.

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

**Release note**:

```release-note
Disallow PriorityClass names with 'system-' prefix for user defined priority classes.
```

ref #57471
/sig scheduling
/assign @liggitt
2018-02-09 13:29:56 -08:00
mtanino bc86537f18 Autogenerated files 2018-02-09 15:41:15 -05:00
mtanino 973583e781 Refactor volumehandler in operationexecutor 2018-02-09 15:39:55 -05:00
juanvallejo aea8deee03
fix --watch on multiple requests 2018-02-09 15:17:02 -05:00
Kubernetes Submit Queue a35acccaf8
Merge pull request #59447 from verult/pd-alpha
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>.

Fixes the regression of GCEPD not provisioning correctly on GKE alpha clusters.

Fixes the regression by better distinguishing between single-zone and multi-zone PDs.

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

**Special notes for your reviewer**: All PD and dynamic provisioning e2e tests pass, manually verified provision, delete, attach, and detach of both single-zone and multi-zone PDs. Will create e2e tests for multizone PDs in a separate PR.

**Release note**:


/sig storage
/assign @saad-ali
2018-02-09 11:55:10 -08:00
Patrick Ohly 0d828e061b devicemanager testing: time out sooner
Each individual step should not take longer than a second.
Suggest by Vikas Choudhary (https://github.com/kubernetes/kubernetes/pull/59489#discussion_r167205672).
2018-02-09 20:51:54 +01:00
Kubernetes Submit Queue 76e6da25fa
Merge pull request #59481 from rojkov/dm-unittests
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>.

devicemanager: increase code coverege of endpoint's unit test

Particularly cover the code path when an unhealthy device
becomes healthy.
2018-02-09 10:35:22 -08:00
Kubernetes Submit Queue 977d03bd8b
Merge pull request #59232 from liubin/fix4
Automatic merge from submit-queue (batch tested with PRs 59607, 59232). 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 log content more information

And change some `fmt.Errorf` to `fmt.Error`
2018-02-09 08:54:34 -08:00
Kubernetes Submit Queue afaabe05f7
Merge pull request #59607 from harsh-px/px-pvc
Automatic merge from submit-queue (batch tested with PRs 59607, 59232). 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>.

Pass pvc namespace and annotations to Portworx Create API

Signed-off-by: Harsh Desai <harsh@portworx.com>

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

Fixes #59606

**Release note**:

```release-note
NONE
```
2018-02-09 08:54:30 -08:00
Vladimir Vivien 18722910eb CSI - Marking CSIPersistentVolumeSource Beta 2018-02-09 11:10:42 -05:00
Patrick Ohly 1325c2f8be devicemanager testing: dynamically choose tmp dir
Hard-coding the tests to use /tmp/device_plugin for sockets is
problematic because it prevents running tests in parallel on the same
machine (perhaps because there are multiple developers, perhaps
because testing is done independently on different code checkouts).
/tmp/device_plugin also was not removed after testing.

This is probably not that relevant. But more importantly, this change
also fixes https://github.com/kubernetes/kubernetes/issues/59488.
"make test" failed in TestDevicePluginReRegistration because something
removed /tmp/device_plugin/device-plugin.sock while something else
tried to connect to it:

2018/02/07 14:34:39 Starting to serve on /tmp/device_plugin/device-plugin.sock
[pid 29568] connect(14, {sa_family=AF_UNIX, sun_path="/tmp/device_plugin/server.sock"}, 33) = 0
[pid 29568] unlinkat(AT_FDCWD, "/tmp/device_plugin/server.sock", 0) = 0
[pid 29568] unlinkat(AT_FDCWD, "/tmp/device_plugin/device-plugin.sock", 0) = 0
[pid 29568] --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=29568, si_uid=1000} ---
[pid 29568] connect(6, {sa_family=AF_UNIX, sun_path="/tmp/device_plugin/device-plugin.sock"}, 40) = -1 ENOENT (No such file or directory)
E0207 14:34:39.961321   29568 endpoint.go:117] listAndWatch ended unexpectedly for device plugin mock with error rpc error: code = Unavailable desc = transport is closing
strace: Process 29623 attached
[pid 29574] connect(3, {sa_family=AF_UNIX, sun_path="/tmp/device_plugin/device-plugin.sock"}, 40) = -1 ENOENT (No such file or directory)
[pid 29623] connect(3, {sa_family=AF_UNIX, sun_path="/tmp/device_plugin/device-plugin.sock"}, 40) = -1 ENOENT (No such file or directory)
[pid 29574] connect(3, {sa_family=AF_UNIX, sun_path="/tmp/device_plugin/device-plugin.sock"}, 40) = -1 ENOENT (No such file or directory)
E0207 14:34:49.961324   29568 endpoint.go:60] Can't create new endpoint with path /tmp/device_plugin/device-plugin.sock err failed to dial device plugin: context deadline exceeded
E0207 14:34:49.961390   29568 manager.go:340] Failed to dial device plugin with request &RegisterRequest{Version:v1alpha2,Endpoint:device-plugin.sock,ResourceName:fake-domain/resource,}: failed to dial device plugin: context deadline exceeded
panic: test timed out after 2m0s

It's not entirely certain which code was to blame for this unlinkat()
calls (perhaps some cleanup code from a previous test running in a
goroutine?) but this no longer happened after switching to per-test
socket directories.
2018-02-09 14:01:13 +01:00
Pengfei Ni 7634eacb4f Add error handling and new tests 2018-02-09 20:38:29 +08:00
Kubernetes Submit Queue aee2cff1b8
Merge pull request #59548 from linyouchong/lyc-201802082
Automatic merge from submit-queue (batch tested with PRs 59466, 58912, 59605, 59548). 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 incorrect logic in canSupport

**What this PR does / why we need it**:
if `spec.PersistentVolume` is nil or `spec.Volume` is nil, func `canSupport` should return false.

**Release note**:
```
NONE
```
/release-note-none
/sig storage
2018-02-09 03:44:41 -08:00
Kubernetes Submit Queue 3ee818c259
Merge pull request #58912 from mlmhl/volume_mount
Automatic merge from submit-queue (batch tested with PRs 59466, 58912, 59605, 59548). 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>.

return a more human readable error message if mount an unformatted vo…

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

If an unformatted volume is requested as read only mode, according device mount operation will fail, and the message is verbose and obscure. We should check this scenario and return a more human readable message.

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

**Release note**:

```release-note
NONE
```

/sig storage
2018-02-09 03:44:35 -08:00
Kubernetes Submit Queue 8268f6d5e7
Merge pull request #59466 from humblec/hide-configuration
Automatic merge from submit-queue (batch tested with PRs 59466, 58912, 59605, 59548). 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>.

Gluster: Remove provisioner configuration from info message.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>



**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-02-09 03:44:32 -08:00
jianglingxia 2d805c727e correct the ConstructVolumeSpec func path value 2018-02-09 17:29:24 +08:00
m1093782566 b7dbaab96a update bazel BUILD 2018-02-09 17:26:22 +08:00
m1093782566 8dd4cbe88b ipvs part changes 2018-02-09 17:20:55 +08:00
m1093782566 f3512cbbb9 iptables proxier part changes 2018-02-09 17:20:51 +08:00
m1093782566 6edcf02d9e proxy endpoints part changes 2018-02-09 17:20:47 +08:00
m1093782566 9e85b526cb proxy service part changes 2018-02-09 17:20:44 +08:00
tossmilestone e155582662 Avoid race condition when updating equivalence cache. 2018-02-09 16:26:41 +08:00
WanLinghao 31bf31601e remove unused function in
pkg/controller/replicaset/replica_set_test.go
2018-02-09 15:42:47 +08:00
Da K. Ma 61b27d4024 Task 0: Added Alpha flag for NoDaemonSetScheduler feature. 2018-02-09 14:33:37 +08:00
Kubernetes Submit Queue 5d8f6ed452
Merge pull request #59619 from jianliao82/patch-1
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 azure_loadbalancer.md to fix typo

fix typo 
incase -> in case
selction -> selection



**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
fix typo 
incase -> in case
selction -> selection
```
2018-02-08 21:49:54 -08:00
Michael Taufen 9c8eab96d0 Bury KubeletConfiguration.ConfigTrialDuration for now 2018-02-08 21:41:21 -08:00
Kubernetes Submit Queue 0b6a0a6977
Merge pull request #59490 from agau4779/gce-unittest
Automatic merge from submit-queue (batch tested with PRs 58437, 59490, 55684). 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>.

[GCE] Unit test ExternalLoadBalancer

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

- Unit tests for `pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go`
- Tests creating, updating, and deleting an external LoadBalancer

**Future Improvements**
In order to further test `gce_loadbalancer_external.go`, we should add tests for the following cases:

- Network Tiers - when the current/desired network tier doesn't match, existing resources with the wrong tier should be torn down
- Expect an error when the TargetPool does not exist
- Expect an error when the LoadBalancer Firewall does not exist
- Case when TargetPool needs to be recreated 
- Case when IP needs to be released (calls gce.DeleteRegionAddress)
```release-note
NONE
```
2018-02-08 21:34:37 -08:00
Kubernetes Submit Queue c179b8a05c
Merge pull request #58437 from tossmilestone/scheduler-golint
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>.

Enable golinting for scheduler packages.

**What this PR does / why we need it**:
Enable golinting for scheduler packages

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

**Special notes for your reviewer**:
- `pkg/scheduler/api` and `pkg/scheduler/api/v1` are not removed from `hack/.golint_failures`, because there are auto-generated go files by `deepcopy-gen` in the package, which have golint errors and are not suggested manually edited.
- Please help to refine the comments if there are error or inaccurate descriptions. Thanks! 

**Release note**:

```release-note
Enable golint for `pkg/scheduler` and fix the golint errors in it.
```
2018-02-08 21:02:24 -08:00
liaoj 953cbb11a1
Update azure_loadbalancer.md
fix typo 
incase -> in case
selction -> selection
2018-02-09 12:52:59 +08:00
Kubernetes Submit Queue 30f54b4028
Merge pull request #56974 from gnufied/speed-up-attach-detach
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>.

Make AWS attach/detach operations faster

Most attach/detach operations on AWS finish within 1-4seconds.
By using a shorter time interval and higher exponetial
factor  we can shorten time taken for attach and detach to complete. 

After this change retry interval looks like:

```
[1, 1.8, 3.24, 5.832000000000001, 10.4976]
```

Before it was:
```
[10, 12.0, 14.399999999999999, 17.279999999999998]
```


/sig aws

```release-note
AWS: Make attach/detach operations faster. from 10-12s to 2-6s
```
2018-02-08 20:24:10 -08:00
linyouchong e92f6eb0fe fix incorrect logic in canSupport 2018-02-09 11:45:15 +08:00
Kubernetes Submit Queue b24bc2cfdc
Merge pull request #59475 from Random-Liu/use-mountpoint
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 mountpoint as CRI image filesystem storage identifier.

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

This PR changes CRI to use mountpoint as storage identifier. See https://github.com/kubernetes/kubernetes/issues/57356#issuecomment-363608733.

Note that:
1) This doesn't work with devicemapper for now. Please feel free to propose change for device mapper, we can discuss more about this after this first version is merged. @mrunalp @runcom
2) `mountpoint` is added as new field in `StorageIdentifier` now. After https://github.com/kubernetes/kubernetes/pull/58973 is merged, we can remove the UUID field in `v1alpha2`. 

/cc @yujuhong @feiskyer @yguo0905 @dashpole @mikebrow @abhi @kubernetes/sig-node-api-reviews 

**Release note**:

```release-note
CRI starts using moutpoint as image filesystem identifier instead of UUID.
```
2018-02-08 19:41:57 -08:00
Kubernetes Submit Queue 23e4133cda
Merge pull request #59127 from fanzhangio/category
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>.

Cleanup and add category doc

**What this PR does / why we need it**:
CategoryExpender interface and some implements structs in package pkg/kubectl/categories are quite confusing to contributors due to the insufficiency documents and illustration.

This PR does:
1. Clean up some useless or vague comments
2. Add illustration for CategoryExpender and implements structs

@pwittrock @droot
2018-02-08 19:03:50 -08:00
Kubernetes Submit Queue d6625f857a
Merge pull request #58177 from jingxu97/Jan/reconstruct
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>.

Redesign and implement volume reconstruction work

This PR is the first part of redesign of volume reconstruction work. The detailed design information is https://github.com/kubernetes/community/pull/1601

The changes include
1. Remove dependency on volume spec stored in actual state for volume
cleanup process (UnmountVolume and UnmountDevice)

Modify AttachedVolume struct to add DeviceMountPath so that volume
unmount operation can use this information instead of constructing from
volume spec

2. Modify reconciler's volume reconstruction process (syncState). Currently workflow
is when kubelet restarts, syncState() is only called once before
reconciler starts its loop.
a. If volume plugin supports reconstruction, it will use the
reconstructed volume spec information to update actual state as before.
b. If volume plugin cannot support reconstruction, it will use the
scanned mount path information to clean up the mounts.

In this PR, all the plugins still support reconstruction (except
glusterfs), so reconstruction of some plugins will still have issues.
The next PR will modify those plugins that cannot support reconstruction
well.

This PR addresses issue #52683
2018-02-08 18:21:34 -08:00
Kubernetes Submit Queue 98abac70ce
Merge pull request #59598 from Random-Liu/remove-unnecessary-summary-call
Automatic merge from submit-queue (batch tested with PRs 59344, 59595, 59598). 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 unnecessary summary api call.

Summary API call is not as cheap as we think. Especially for CRI container runtime, it means:
1) Extra cgroups parsing (because cpu/memory are considered to be on demand);
2) Extra grpc encoding/decoding `ListPodSandboxes`, `ListContainers`, `ListContainerStats`;

I don't think it is necessary to call summary twice inside the same function.
/cc @kubernetes/sig-node-pr-reviews @dashpole @jingxu97 

Signed-off-by: Lantao Liu <lantaol@google.com>

**Release note**:

```release-note
none
```
2018-02-08 18:06:37 -08:00
Harsh Desai 79ea511ec6 Pass pvc namespace and annotations to Portworx Create API
Closes #59606

Signed-off-by: Harsh Desai <harsh@portworx.com>
2018-02-08 17:46:08 -08:00
Pengfei Ni daec2bd745 Add cache for route tables 2018-02-09 09:09:25 +08:00
Pengfei Ni 21c8a63689 Add cache for network security groups 2018-02-09 09:09:25 +08:00
Pengfei Ni d22b6d9ebe Add cache for load balancer 2018-02-09 09:09:25 +08:00
Pengfei Ni 2badf1ff55 Add cache for virtual machines 2018-02-09 09:09:25 +08:00
Pengfei Ni 035c8da63d New unit tests for timedCache 2018-02-09 09:09:25 +08:00
Pengfei Ni 259dbf8da7 Make azure cache general for all objects 2018-02-09 09:09:25 +08:00
Jiaying Zhang 90c2098103 Create pkg/kubelet/apis/deviceplugin/v1beta1 directory.
The proto stays the same as v1alpha. Only changes Version in
constants.go to "v1beta1" and the BUILD file to pick up the new dir.
2018-02-08 17:04:43 -08:00
Kubernetes Submit Queue 2172a2a806
Merge pull request #59569 from tsmetana/fix-aws-detach
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>.

AWS: Do not ignore errors from EC2::DescribeVolume in DetachDisk

The DetachDisk method of AWS cloudprovider indirectly calls
EC2::DescribeVolume AWS API function to check if the volume
being detached is really attached to the specified node.

The AWS API call may fail and return error which is logged however
the DetachDisk then finishes successfully. This may cause the AWS
volumes to remain attached to the instances forever because the
attach/detach controller will mark the volume as attached. The PV
controller will never be able to delete those disks and they need
to be detached manually.

This patch ensures the error from DescribeVolume is propagated to
attach/detach controller and the detach operation is re-tried.

cc: @gnufied, @jsafrane 

```release-note
NONE
```
2018-02-08 17:02:18 -08:00
Kubernetes Submit Queue 24f387127a
Merge pull request #58854 from liggitt/prefer-v1-storage
Automatic merge from submit-queue (batch tested with PRs 59580, 58854). 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>.

Prefer apps/v1 storage for daemonsets, deployments, replicasets, statefulsets

The workload API objects went GA in 1.9. This means we can safely begin persisting them in etcd in apps/v1 format in 1.10.

xref #43214

```release-note
DaemonSet, Deployment, ReplicaSet, and StatefulSet objects are now persisted in etcd in apps/v1 format
```
2018-02-08 16:58:32 -08:00
Lantao Liu 91cbf93b90 Remove unnecessary summary api call.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-02-08 22:57:30 +00:00
Michael Taufen 5ab9ccd4fb remove CAdvisorPort from KubeletConfiguration
See: #56523, cAdvisor is becoming an implementation detail of
Kubernetes, and we should not canonize its knobs on the
KubeletConfiguration.
2018-02-08 13:51:41 -08:00
Kubernetes Submit Queue 6cc3641730
Merge pull request #59515 from mtaufen/kc-enforcenodeallocatable-none-option
Automatic merge from submit-queue (batch tested with PRs 59054, 59515, 59577). 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 'none' option to EnforceNodeAllocatable

This lets us use omitempty on `EnforceNodeAllocatable`. We shouldn't treat
`nil` as different from `[]T{}`, because this can play havoc with
serializers (a-la #43203).

See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166672137

```release-note
'none' can now be specified in KubeletConfiguration.EnforceNodeAllocatable (--enforce-node-allocatable) to explicitly disable enforcement.
```
2018-02-08 12:22:32 -08:00
Ashley Gau 5e38d785a2 make context the first arg in AddInstanceHook/RemoveInstanceHook 2018-02-08 11:04:39 -08:00
Ashley Gau 4b398a6d8d generate mocked methods with context as the first arg, because golint 2018-02-08 11:02:48 -08:00
Fan Zhang bfa3029c8e Cleanup and add category doc
- Clean up some useless or vague comments. Fixed typos
- Add illustration for CategoryExpender and implements structs
2018-02-08 10:47:05 -08:00
Cheng Xing 02352460f6 Fixes the regression of GCEPD not provisioning correctly on alpha clusters. 2018-02-08 10:46:06 -08:00
Kubernetes Submit Queue c3a92d0b9b
Merge pull request #59497 from dougm/vclib-tests
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>.

vclib: enable VM disk attach test

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

Follow up to PR #58534 , where this test was disabled due to a limitation in
govmomi/simulator.  The test passes as expected with godeps update of govmomi.

**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 is 1-line update to the vSphere Cloud Provider tests and godep update of the vendor'd vmware/govmomi repo.

**Release note**:

```release-note
NONE
```
2018-02-08 10:40:27 -08:00
Michael Taufen 3553390c97 Add 'none' option to EnforceNodeAllocatable
This lets us use omitempty on EnforceNodeAllocatable. We shouldn't treat
`nil` as different from `[]T{}`, because this can play havoc with
serializers (a-la #43203).

See: https://github.com/kubernetes/kubernetes/pull/53833#discussion_r166672137
2018-02-08 10:24:39 -08:00
Kubernetes Submit Queue c0a337d4cc
Merge pull request #59519 from vmware/vm_uuid_provider_id
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>.

Report InstanceID for vSphere Cloud Provider as UUID obtained from product_serial file 

**What this PR does / why we need it**:
vSphere Cloud Provider is not able to find the nodes for VMs created on vSphere v1.6.5. Kubelet fetches SystemUUID from file ```/sys/class/dmi/id/product_uuid```. vSphere Cloud Provider uses this uuid as VM identifier to get node information from vCenter. vCenter v1.6.5 doesn't recognize this uuids, as a result, nodes are not found. 

UUID present in file ```/sys/class/dmi/id/product_serial``` is recognized by vCenter. Yet,  Kubelet doesn't report this. Therefore, in this PR InstanceID is reported as UUID which is fetched from file 
```/sys/class/dmi/id/product_serial```.

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

**Special notes for your reviewer**:
Internally review here: https://github.com/vmware/kubernetes/pull/452

Tested:
Launched K8s cluster using kubeadm (Used Ubuntu VM compatible with vSphere version 6.5.)
_**Note: Installed Ubuntu from ISO**_
Observed following:
```
Master
> cat /sys/class/dmi/id/product_uuid
743F0E42-84EA-A2F9-7736-6106BB5DBF6B

> cat /sys/class/dmi/id/product_serial
VMware-42 0e 3f 74 ea 84 f9 a2-77 36 61 06 bb 5d bf 6b

Node
> cat /sys/class/dmi/id/product_uuid
956E0E42-CC9D-3D89-9757-F27CEB539B76

> cat /sys/class/dmi/id/product_serial
VMware-42 0e 6e 95 9d cc 89 3d-97 57 f2 7c eb 53 9b 76
```
With this fix controller manager was able to find the nodes.
**controller manager logs**
```
{"log":"I0205 22:43:00.106416       1 nodemanager.go:183] Found node ubuntu-node as vm=VirtualMachine:vm-95 in vc=10.161.120.115 and datacenter=vcqaDC\n","stream":"stderr","time":"2018-02-05T22:43:00.421010375Z"}
```


**Release note**:

```release-note
vSphere Cloud Provider supports VMs provisioned on vSphere v1.6.5
```
2018-02-08 09:43:08 -08:00
Lee Verberne 8835f54480 kubelet: add support for pod PID namespace sharing
This adds the logic for sending a NamespaceMode_POD to the runtime, but
leaves it disconnected pending https://issues.k8s.io/58716.
2018-02-08 16:58:07 +01:00
Slava Semushin 21abc9e105 validation_test.go: move test cases for AllowPrivilegeEscalation option from TestValidatePodSpec to TestValidateSecurityContext. 2018-02-08 16:42:35 +01:00
Davanum Srinivas 18f1486e97 Skip TestRoutes when there are no vm(s)
TestRoutes assumes that there is at least one vm in the OpenStack it
is connecting to. So let's limit this test to run properly only when
we are running in a VM or one was created already outside of the
test harness
2018-02-08 08:54:04 -05:00
Tomas Smetana c879e531f9 AWS: Do not ignore errors from EC2::DescribeVolumee in DetachDisk
The DetachDisk method of AWS cloudprovider indirectly calls
EC2::DescribeVolume AWS API function to check if the volume
being detached is really attached to the specified node.

The AWS API call may fail and return error which is logged however
the DetachDisk then finishes successfully. This may cause the AWS
volumes to remain attached to the instances forever because the
attach/detach controller will mark the volume as attached. The PV
controller will never be able to delete those disks and they need
to be detached manually.

This patch ensures on error from DescribeVolume is propagated to
attach/detach controller and the detach operation is re-tried.
2018-02-08 13:51:53 +01:00
Kubernetes Submit Queue b922ffc491
Merge pull request #54685 from zjj2wry/node_detail_unschedule
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 unchedule information to kubectl describe node

**What this PR does / why we need it**:
Fixes #53721

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

**Special notes for your reviewer**:
cc @smarterclayton
now output: 
```
		Name:               bar
		Roles:              <none>
		Labels:             <none>
		Annotations:        <none>
		Taints:             <none>
		Unschedulable:      true
		CreationTimestamp:  Mon, 01 Jan 0001 00:00:00 +0000
```

**Release note**:

```release-note
NONE
```
2018-02-08 04:13:21 -08:00
mlmhl 2f46df3540 return a more human readable error message if mount an unformatted volume as readonly 2018-02-08 20:01:41 +08:00
zhengjiajin 6dfe3cb04f add more error logs in kubectl run 2018-02-08 19:37:47 +08:00
Kubernetes Submit Queue fb340a4695
Merge pull request #57824 from thockin/gcr-vanity
Automatic merge from submit-queue (batch tested with PRs 57824, 58806, 59410, 59280). 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>.

2nd try at using a vanity GCR name

The 2nd commit here is the changes relative to the reverted PR.  Please focus review attention on that.

This is the 2nd attempt.  The previous try (#57573) was reverted while we
figured out the regional mirrors (oops).
    
New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).
    
When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.
    
We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.

xref https://github.com/kubernetes/release/issues/281

TL;DR:
  *  The new `staging-k8s.gcr.io` is where we push images.  It is literally an alias to `gcr.io/google_containers` (the existing repo) and is hosted in the US.
  * The contents of `staging-k8s.gcr.io` are automatically synced to `{asia,eu,us)-k8s.gcr.io`.
  * The new `k8s.gcr.io` will be a read-only alias to whichever regional repo is closest to you.
  * In the future, images will be promoted from `staging` to regional "prod" more explicitly and auditably.

 ```release-note
Use "k8s.gcr.io" for pulling container images rather than "gcr.io/google_containers".  Images are already synced, so this should not impact anyone materially.
    
Documentation and tools should all convert to the new name. Users should take note of this in case they see this new name in the system.
```
2018-02-08 03:29:32 -08:00
Jesse Haka 3cf5b172fa add node shutdown taint
shutdowned -> stopped

use shutdown everywhere

use patch in taints api call

use notimplemented in clouds use AddOrUpdateTaintOnNode

correct log text

add fake cloud

try to fix bazel

add shutdown tests

add context
2018-02-08 12:56:06 +02:00
Kubernetes Submit Queue 6827c3cf47
Merge pull request #59309 from zhangxiaoyu-zidif/fix-node-describe
Automatic merge from submit-queue (batch tested with PRs 59539, 59309). 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 describe when allocatable CPU/Memory is 0

**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-02-08 02:18:37 -08:00
zhangxiaoyu-zidif ba2404fde0 fix describe when allocatable CPU/Memory is 0 2018-02-08 16:33:09 +08:00
tossmilestone 3fdacfead5 Fix golint errors in `pkg/scheduler` based on golint check 2018-02-08 15:22:47 +08:00
Pengfei Ni 20de29ae6f Set instanceID to azure resource ID format while useInstanceMetadata is enabled 2018-02-08 15:12:36 +08:00
andyzhangx 0a63d7cc9a return error if New-SmbGlobalMapping failed in azure file mount 2018-02-08 05:56:16 +00:00
Tim Hockin 3586986416 Switch to k8s.gcr.io vanity domain
This is the 2nd attempt.  The previous was reverted while we figured out
the regional mirrors (oops).

New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).

When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.

We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.
2018-02-07 21:14:19 -08:00
Pengfei Ni 4e4fde93a7 Add useInstanceMetadata param back in Azure cloud provider
This reverts commit bb1e797b28.
2018-02-08 12:40:35 +08:00
Kubernetes Submit Queue 84bfc7ada5
Merge pull request #59249 from hanxiaoshuai/fixtodo0202
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix todo: Move isDecremented to pkg/apis/core/validation

**What this PR does / why we need it**:
fix todo: Move isDecremented in "k8s.io/kubernetes/pkg/apis/core/validation"
**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**:

2. If no release note is required, just write "NONE".
-->
```release-note
NONE
```
2018-02-07 19:35:15 -08:00
Hemant Kumar f94a81ef19
Revert "add number measurement for bound/unbound pv/pvc" 2018-02-07 21:31:01 -05:00
Kubernetes Submit Queue 07e849c986
Merge pull request #59429 from rramkumar1/ipvs-cleanup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Cleanup of ipvs utils

**What this PR does / why we need it**:
This PR is a small cleanup of pkg/util/ipvs.

The changes are as follows:

1. Rename toBackendService -> toIPVSService and toBackendDestination -> toIPVSDestination. The use of the term 'backend' makes things really confusing and this renamig makes it more explicit about what we are doing.

2. Give the libnetwork/ipvs package the name libipvs. This makes it less confusing since the package these files are in is also ipvs.

3. Some variable naming cleanup to make things easier to read.

/assign @m1093782566 

**Release note**:

```release-note
None
```
2018-02-07 18:07:35 -08:00
Bobby (Babak) Salamat 6bad08ab0c Moved validation to the API side 2018-02-07 17:46:57 -08:00
Abrar Shivani 918e47c438 Change provider ID to uuid 2018-02-07 17:08:47 -08:00
Davanum Srinivas 18590378c4 Remove experimental keystone authenticator
experimental-keystone-url and experimental-keystone-ca-file were always
experimental. So we don't need a deprecation period.
KeystoneAuthenticator was on the server side and needed userid/password
to be passed in and used that to authenticate with Keystone. We now
have authentication and authorization web hooks that can be used. There
is a external repo with a webook for keystone which works fine along
with the kubectl auth provider that was added in:
a0cebcb559

So we don't need this older style / hard coded / experimental code
anymore.
2018-02-07 19:28:55 -05:00
Kubernetes Submit Queue eff9f75f70
Merge pull request #59297 from joelsmith/master
Automatic merge from submit-queue (batch tested with PRs 59010, 59212, 59281, 59014, 59297). 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>.

Improve error returned when fetching container logs during pod termination

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

This change better handles fetching of logs when a container is in a crash loop backoff state. In cases where it is unable to fetch the logs, it gives a helpful error message back to a user who has requested logs of a container from a terminated pod. Rather than attempting to get logs for a container using an empty container ID, it returns a useful error message.

In cases where the container runtime gets an error, log the error but don't leak it back through the API to the user.


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

**Release note**:

```release-note
NONE

```
2018-02-07 15:27:49 -08:00
Kubernetes Submit Queue 5a4b160cf0
Merge pull request #59281 from bsalamat/nominated_node
Automatic merge from submit-queue (batch tested with PRs 59010, 59212, 59281, 59014, 59297). 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 nominateNodeName annotation with PodStatus.NominatedNodeName

**What this PR does / why we need it**:
Replaces nominateNodeName annotation with PodStatus.NominatedNodeName in scheudler's logic. We don't expect any logic/behavior changes.

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

ref #57471

/sig scheduling
cc: @k82cn @aveshagarwal @resouer
2018-02-07 15:27:43 -08:00
Kubernetes Submit Queue 40d7080555
Merge pull request #59212 from crimsonfaith91/fix-ca
Automatic merge from submit-queue (batch tested with PRs 59010, 59212, 59281, 59014, 59297). 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 deployment's collision avoidance mechanism

**What this PR does / why we need it**:
This PR modifies deployment's collision avoidance mechanism to take into account a replicaset's `.Labels` field change. This ensures that the mechanism can be triggered when the user updates only the `.Labels` field of the replicaset without modifying the replicaset's PodTemplateSpec.

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

**Release note**:
```release-note
NONE
```
2018-02-07 15:27:40 -08:00
Ashley Gau b7fe9fe02f run update-bazel.sh, lint on mock.go 2018-02-07 15:27:35 -08:00
Lantao Liu a77450ec2d Add mountpoint as CRI image filesystem storage identifier. 2018-02-07 23:01:06 +00:00
Ashley Gau 5c8e7e3707 remove newline before err checks. address pr comments 2018-02-07 14:38:31 -08:00
Ashley Gau 41070a2f58 use getInstanceByName to check for node presence, instead of DeleteInstance) 2018-02-07 14:36:08 -08:00
Rohit Ramkumar daae0e6cec Cleanup of ipvs utils 2018-02-07 14:15:31 -08:00
Kubernetes Submit Queue c37b5d757d
Merge pull request #59303 from dhirajh/localblock
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>.

Block Volume Support: Local Volume Plugin update

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

Introduce block volume support to local volumes 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 #59500

**Special notes for your reviewer**:
@msau42 @mtanino @ianchakeres 

Adding support for block volumes as per https://github.com/kubernetes/features/issues/121

Other related PRs:
(#50457) API Change
(#53385) VolumeMode PV-PVC Binding change
(#51494) Container runtime interface change, volumemanager changes, operationexecutor changes

**Release note**:
```
Added support for Block Volume type to local-volume plugin.
```
2018-02-07 13:27:50 -08:00
Kubernetes Submit Queue 37d7c68bcd
Merge pull request #59017 from drinktee/fixcomments
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix portallocator comments

**What this PR does / why we need it**:
fix portallocator comments

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


**Release note**:
NONE
2018-02-07 12:47:32 -08:00
Kubernetes Submit Queue 93cd559048
Merge pull request #58832 from liggitt/move-workload-internal-types
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>.

Move workload registries to apps package

xref #43214
Starts the process of moving internal types to the apps packages for apps types

```release-note
NONE
```
2018-02-07 12:47:17 -08:00
Ashley Gau 378b177f02 test updateExternalLoadBalancer removes nodes 2018-02-07 12:42:57 -08:00
Kubernetes Submit Queue b40f865ae5
Merge pull request #59472 from hanxiaoshuai/fixtodo02072
Automatic merge from submit-queue (batch tested with PRs 59276, 51042, 58973, 59377, 59472). 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 up unused function GetKubeletDockerContainers

**What this PR does / why we need it**:
fix todo: function GetKubeletDockerContainers is not unused,it has been migrated off in test/e2e_node/garbage_collector_test.go  in [#57976](https://github.com/kubernetes/kubernetes/pull/57976/files)
**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-02-07 12:00:53 -08:00
Kubernetes Submit Queue cf7073a831
Merge pull request #58973 from verb/cri-enum
Automatic merge from submit-queue (batch tested with PRs 59276, 51042, 58973, 59377, 59472). 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 Container Runtime Interface to use enumerated namespace modes

**What this PR does / why we need it**: This updates the CRI as described in the [Shared PID Namespace](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node/pod-pid-namespace.md#container-runtime-interface-changes) proposal. This change to the alpha API is not backwards compatible: implementations of the CRI will need to update to the new API version.

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

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

**Release note**:

```release-note
[action-required] The Container Runtime Interface (CRI) version has increased from v1alpha1 to v1alpha2. Runtimes implementing the CRI will need to update to the new version, which configures container namespaces using an enumeration rather than booleans.
```
2018-02-07 12:00:47 -08:00
Kubernetes Submit Queue 1f6251444b
Merge pull request #51042 from soltysh/request_timeout
Automatic merge from submit-queue (batch tested with PRs 59276, 51042, 58973, 59377, 59472). 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 request-timeout from NewRequest all the way down

**What this PR does / why we need it**:
Currently if you pass `--request-timeout` it's not passed all the way down to the actual request object. There's a separate field on the `Request` object that allows setting that timeout, but it's not taken from that flag. 

@smarterclayton @deads2k ptal, this is coming from https://github.com/openshift/origin/pull/13701
2018-02-07 12:00:44 -08:00
Kubernetes Submit Queue 475457537b
Merge pull request #59276 from roboll/roboll/kubelet-fix
Automatic merge from submit-queue (batch tested with PRs 59276, 51042, 58973, 59377, 59472). 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: only register api source when connecting

**What this PR does / why we need it**:
before this change, an api source was always registered, even when there
was no kubeclient. this lead to some operations blocking waiting for
podConfig.SeenAllSources to pass, which it never would.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-02-07 12:00:40 -08:00
Ashley Gau 60ed92b16d check firewall creation + deletion for healthcheck firewall 2018-02-07 11:38:24 -08:00
Jun Xiang Tee 18289cc0df fix deployment's collision avoidance mechanism 2018-02-07 11:28:43 -08:00
Joel Smith 749980b726 Handle fetch of container logs of error containers during pod termination
* improve error returned when failing to fetch container logs
* handle cases where logs are requested for containers without the container ID
2018-02-07 12:23:56 -07:00
Maciej Szulik ca29a37f22 Create short name for cronjob 2018-02-07 20:23:25 +01:00
Ashley Gau 58f96f76e3 isolate node creation into separate function, address PR comments 2018-02-07 11:22:33 -08:00
Doug MacEachern 3aabd7a9ae vclib: enable VM disk attach test
Follow up to PR #58534 , where this test was disabled due to a limitation in
govmomi/simulator.  The test passes as expected with godeps update of govmomi.
2018-02-07 10:55:49 -08:00
Jordan Liggitt ae41593f85
Move workload registries to apps package 2018-02-07 13:29:06 -05:00
Kubernetes Submit Queue 5cecc6ec68
Merge pull request #59350 from jsafrane/recycler-wait
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Do not recycle volumes that are used by pods

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

Consider this scenario:

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

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

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

**Release note**:

```release-note
NONE
```

/sig storage
2018-02-07 10:01:32 -08:00
Ashley Gau 23a6c5b3b7 cleanup 2018-02-07 09:43:46 -08:00
Kubernetes Submit Queue 15dbd4e2ae
Merge pull request #59227 from juanvallejo/jvallejo/remove-mapper-dep-printer
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 mapper dependency for cmdutil.Factory#PrintSuccess

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

Part of a series of patches removing printing stack dependency on mappings the rest mapper

**Before**
```
$ kubectl label pod/my-pod label=label
pod "my-pod" labeled
```

**After**
```
$ kubectl label pod/my-pod label=label
pods "my-pod" labeled
```

cc @deads2k
2018-02-07 08:39:15 -08:00
Kubernetes Submit Queue 117780b908
Merge pull request #58287 from dg-i/ceph-provisioner-userid
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 keyring parameter in Ceph RBD provisioner

**What this PR does / why we need it**:
userSecretName is a mandatory parameter for the kubernetes.io/rbd storage provisioner. Ceph RBD persistent volumes however don't need the secretRef. If no secret is given, a local keyring file (/etc/ceph/keyring) on the node will be used. This behaviour should also work with the storage provisioner. If no userSecretName parameter is given, no secretRef should be created in the resulting persistent volume.

**Special notes for your reviewer**:

**Release note**:
```release-note
Add "keyring" parameter for Ceph RBD provisioner
```
2018-02-07 08:00:28 -08:00
Dan Winship 780d5954e0 Split out a KUBE-EXTERNAL-SERVICES chain so we don't have to run KUBE-SERVICES from INPUT 2018-02-07 10:20:52 -05:00
Kubernetes Submit Queue 3c6392985f
Merge pull request #59470 from liubin/fix6
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 comment
2018-02-07 07:20:30 -08:00
juanvallejo beb5ea641a
remove mapper dependency - PrintSuccess 2018-02-07 10:10:45 -05:00
Maciej Szulik 7da1002091 Allow passing request-timeout from NewRequest all the way down to actual request 2018-02-07 16:02:26 +01:00
hangaoshuai e416f3746e clean up unused function GetKubeletDockerContainers 2018-02-07 19:21:05 +08:00
Kubernetes Submit Queue a1437feb18
Merge pull request #59400 from jianglingxia/jlx-2018020614
Automatic merge from submit-queue (batch tested with PRs 57230, 59400). 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 sure mounter not nil and fix some typo

**What this PR does / why we need it**:
make sure mounter not nil  then and fix some typo
**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-02-07 02:58:31 -08:00
Mathias Merscher dbf5f58022
add keyring parameter in Ceph RBD provisioner 2018-02-07 11:50:49 +01:00
Dmitry Rozhkov 3175a687a0 devicemanager: increase code coverege of endpoint's unit test
Particularly cover the code path when an unhealthy device
becomes healthy.
2018-02-07 12:29:48 +02:00
bin liu f679fc1827 Remove duplicated comment 2018-02-07 16:48:22 +08:00
Lee Verberne e10042d22f Increment CRI version from v1alpha1 to v1alpha2
This also incorporates the version string into the package name so
that incompatibile versions will fail to connect.

Arbitrary choices:
- The proto3 package name is runtime.v1alpha2. The proto compiler
  normally translates this to a go package of "runtime_v1alpha2", but
  I renamed it to "v1alpha2" for consistency with existing packages.
- kubelet/apis/cri is used as "internalapi". I left it alone and put the
  public "runtimeapi" in kubelet/apis/cri/runtime.
2018-02-07 09:06:26 +01:00
Lee Verberne 0f1de41790 Update kubelet for enumerated CRI namespaces
This adds support to both the Generic Runtime Manager and the
dockershim for the CRI's enumerated namespaces.
2018-02-07 09:06:26 +01:00
Lee Verberne f4ab2b6331 Switch CRI NamespaceOption from bools to enums 2018-02-07 09:06:25 +01:00
Humble Chirammal 922766a7cf Remove provisioner configuration from info message.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-02-07 13:30:42 +05:30
Kubernetes Submit Queue 11104d75f1
Merge pull request #57194 from linyouchong/linyouchong-20171214
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix TODO:change to a api-server watch

What this PR does / why we need it:
fix TODO (vladimirvivien) instead of polling api-server, change to a api-server watch

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

Special notes for your reviewer:

Release note:
NONE

@vladimirvivien,@jsafrane,@saad-ali
I saw some TODO there and I am very interested in fixing it.
Please let me know if it is not inappropriate to do this.
2018-02-06 23:35:13 -08:00
Kubernetes Submit Queue f72f90f624
Merge pull request #59449 from aveshagarwal/master-rhbz-1540822
Automatic merge from submit-queue (batch tested with PRs 58444, 59283, 59437, 59325, 59449). 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 to register priority function ResourceLimitsPriority correctly.

**What this PR does / why we need it**:
This PR fixes registration of priority function ResourceLimitsPriority.  Previously this function was being registered inside `init()`. Since this priority function ResourceLimitsPriority is behind feature gate `ResourceLimitsPriorityFunction` and if the feature is enabled, it was not visible in `init()` function. So now the registration of this priority function is moved inside `ApplyFeatureGates()` in scheduler where it can be correctly registered after the feature has been enabled.


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

**Special notes for your reviewer**:

**Release note**:

```release-note

None
```

@kubernetes/sig-scheduling-pr-reviews @bsalamat @ravisantoshgudimetla
2018-02-06 22:42:45 -08:00
Kubernetes Submit Queue 1f3c66fba7
Merge pull request #59437 from mikedanese/id-api
Automatic merge from submit-queue (batch tested with PRs 58444, 59283, 59437, 59325, 59449). 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>.

authentication: remove TokenRequest from authentication.k8s.io/v1beta1

We don't actually need v1beta1 TokenRequest so should we leave the API group sparse?

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

```release-note
NONE
```
2018-02-06 22:42:38 -08:00
Kubernetes Submit Queue f99ed35b28
Merge pull request #58444 from bsalamat/update_prio
Automatic merge from submit-queue (batch tested with PRs 58444, 59283, 59437, 59325, 59449). 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 PriorityClassName API doc

**What this PR does / why we need it**: It updates the comment (and hence API doc) for PriorityClassName of PodSpec.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/sig scheduling
2018-02-06 22:42:33 -08:00
Kubernetes Submit Queue 7223729d51
Merge pull request #59245 from resouer/equiv-node
Automatic merge from submit-queue (batch tested with PRs 59394, 58769, 59423, 59363, 59245). 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>.

Ensure euqiv hash calculation is per schedule

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

Currently, equiv hash is calculated per schedule, but also, per node. This is a potential cause of dragging integration test, see #58881

We should ensure this only happens once during scheduling of specific pod no matter how many nodes we have.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Ensure euqiv hash calculation is per schedule
```
2018-02-06 21:34:48 -08:00
Kubernetes Submit Queue 4b01601a07
Merge pull request #59363 from yguo0905/sched-config
Automatic merge from submit-queue (batch tested with PRs 59394, 58769, 59423, 59363, 59245). 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-scheduler: Use default predicates/prioritizers if they are unspecified in the policy config

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

The scheduler has built-in default sets of predicate/prioritizer that are applied on pod scheduling. It can also take a policy config file where predicate/prioritizer and extender settings can be specified. The current behavior is that if we want to configure an extender using the policy config, we have to also provide the default predicate/prioritizer settings. Otherwise, the empty predicate/prioritizer sets will be used.

This is inconvenient, and it's hard to keep the policy config up to date with the scheduler's defaults. This PR changes the scheduler to use the default predicate/prioritizer sets if they are unspecified in the policy config. But an empty list would bypass non-mandatory predicates/prioritizers.

This will change the behavior of a policy config that does not specify (but not empty list) predicate/prioritizer, but it's unlike someone is using such config in practice.

**Special notes for your reviewer**:

I think it makes sense to have this in 1.9 as well because
- It's safe, given the scope of this change and the fact that it's very unlikely that someone is using a policy config with empty predicates/prioritizers.
- Compared with the risk, asking users to provide the default predicate/prioritizer sets for is error-prone and may cause other issues.

**Release note**:

```release-note
kube-scheduler: Use default predicates/prioritizers if they are unspecified in the policy config
```

/sig scheduling
/assign @bsalamat
/cc @vishh
2018-02-06 21:34:46 -08:00
Kubernetes Submit Queue 891b3d10c4
Merge pull request #59423 from jingax10/upgrade_aliases_branch
Automatic merge from submit-queue (batch tested with PRs 59394, 58769, 59423, 59363, 59245). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Only populate alias range for nic0 when invoking instance.UpdateNetworkInterface.

**What this PR does / why we need it**:
Without the fix, GCP will emit errors, e.g., googleapi: Error 400: Invalid value for field 'resource.accessConfigs': ''. Updating this field is not supported., invalid

**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 #
N/A

**Special notes for your reviewer**:

**Release note**:

```release-note
"NONE"
```
2018-02-06 21:34:43 -08:00
Kubernetes Submit Queue d7dba9b070
Merge pull request #59394 from mikedanese/svcacct1
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>.

svcacct: move claim generation out of TokenGenerator

More no-op refactoring.

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

```release-note
NONE
```
2018-02-06 21:27:57 -08:00
Kubernetes Submit Queue e5b6026db6
Merge pull request #59287 from cheftako/cloud-context-level
Automatic merge from submit-queue (batch tested with PRs 59441, 58264, 59287, 59396, 59439). 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 context to all relevant cloud APIs

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

This adds context to all the relevant cloud provider interface signatures.
Callers of those APIs are currently satisfied using context.TODO().
There will be follow on PRs to push the context through the stack.

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

**Special notes for your reviewer**:
For an idea of the full scope of this change please look at PR #58532.

**Release note**:
```release-note
Implementers of the cloud provider interface will note the addition of a context to this interface. Trivial code modification will be necessary for a cloud provider to continue to compile.
```
2018-02-06 20:27:39 -08:00