Commit Graph

20189 Commits (f7c06ad23cff8145ad81848542ddab4966b45725)

Author SHA1 Message Date
David Ashpole 2cd65ea863 only create event for multiple imagegc failures 2017-03-30 16:19:18 -07:00
Kubernetes Submit Queue 449a13c44c Merge pull request #40338 from gnufied/cloudprovider-gce-metrics
Automatic merge from submit-queue

Implement API usage metrics for gce storage

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

This PR implements support for emitting metrics from GCE about storage operations.

**Which issue this PR fixes** 

Fixes https://github.com/kubernetes/features/issues/182

**Release note**:
```
Add support for emitting metrics from GCE cloudprovider about storage operations.
```
2017-03-30 12:42:02 -07:00
Kubernetes Submit Queue 61f5f842e2 Merge pull request #42662 from wongma7/status
Automatic merge from submit-queue

Print dereferenced pod status fields when logging status update

Before: "Terminated:0xc421932af0"
After:"Terminated:&ContainerStateTerminated{ExitCode:0,Signal:0,Reason:Completed,Message:,StartedAt:0001-01-01 00:00:00 +0000 UTC,FinishedAt:2017-03-07 14:50:48 -0500 EST,ContainerID:docker://bd453bb969264b3ace2b3934a568af7679a0d51fee543a5f8a82429ff654970e,}"

"Ignoring same status for pod" messages already print status fully, these "Status for pod updated" messages should too IMO

```release-note
NONE
```
2017-03-30 10:33:41 -07:00
Kubernetes Submit Queue 9ba2a401bb Merge pull request #43207 from xilabao/add-can-i-example
Automatic merge from submit-queue

add can-i example

use * can check if the admin user or not.
2017-03-30 08:42:17 -07:00
rootfs cb6a7c946d relocate FC multipath readme to examples from pkg/volume
Signed-off-by: rootfs <hchen@redhat.com>
2017-03-30 11:15:25 -04:00
Kubernetes Submit Queue a644c8f968 Merge pull request #43775 from wongma7/subpath
Automatic merge from submit-queue

Create subPaths and set their permissions like we do mountPaths

fixes https://github.com/kubernetes/kubernetes/issues/41638

If a subPath does not exist at the time MountVolume.Setup happens, SetVolumeOwnership will not have walked to the subPath and set appropriate permissions on it, leading to the above issue

So later, at makeMounts when we are parsing subPaths, let's create all subPaths and set their permissions according to how the parent mountPath looks.

```release-note
NONE
```
2017-03-30 01:15:50 -07:00
Matthew Wong 25bdad762b Create subPaths and set their permissions like we do mountPaths 2017-03-30 01:52:08 -04:00
Kubernetes Submit Queue 05cd33b29e Merge pull request #43508 from shiywang/first-deploy
Automatic merge from submit-queue

Fix scaled down deployments cannot identify old replica sets

Fixes https://github.com/kubernetes/kubernetes/issues/42570
2017-03-29 20:42:31 -07:00
xilabao 1833602bf8 add can-i example 2017-03-30 09:39:03 +08:00
Kubernetes Submit Queue 289ef62442 Merge pull request #43644 from nicksardo/gce-healthchecks
Automatic merge from submit-queue (batch tested with PRs 42617, 43247, 43509, 43644, 43820)

[GCE] Support legacy-https and generic health checks

**What this PR does / why we need it**:
- Adds CRUD functions to manage `compute.HttpsHealthChecks` 
The legacy HTTPS healthchecks will be used by the GLBC (GCE Load balancer Controller)

- Adds CRUD functions to manage `compute.HealthChecks`
These are required for the internal load balancer

- Removes the logic that disregards NotFound errors on DeleteHttpHealthChecks as this is useful information for callers. Here are the three known invocations within kubernetes: 
[gce/gce_loadbalancer.go#L457](bc6e77d42f/pkg/cloudprovider/providers/gce/gce_loadbalancer.go (L457)): Only prints warning that HC wasn't deleted  -> acceptable
[gce/gce_loadbalancer.go#L465](bc6e77d42f/pkg/cloudprovider/providers/gce/gce_loadbalancer.go (L465)): Err is ignored if not nil  -> acceptable
[e2e/framework/ingress_utils.go#L530](bc6e77d42f/test/e2e/framework/ingress_utils.go (L530)): Already checks if is NotFound error -> acceptable

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:
Step one of https://github.com/kubernetes/ingress/issues/494
Step one of #33483 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-03-29 16:05:25 -07:00
Kubernetes Submit Queue 8fc0c708d1 Merge pull request #43509 from xilabao/remove-duplicate-in-create-rolebinding
Automatic merge from submit-queue (batch tested with PRs 42617, 43247, 43509, 43644, 43820)

ignore duplicate resource in create rolebinding
2017-03-29 16:05:23 -07:00
Kubernetes Submit Queue a4f6cae9c9 Merge pull request #38741 from sandflee/validate-activeDeadline
Automatic merge from submit-queue

validate activeDeadlineSeconds in rs/rc

**What this PR does / why we need it**:
if setting activeDeadlineSeconds, deployment will continuously created new pods after old pod dies.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #38684

**Special notes for your reviewer**:

**Release note**:

```release-note
ActiveDeadlineSeconds is validated in workload controllers now, make sure it's not set anywhere (it shouldn't be set by default and having it set means your controller will restart the Pods at some point)
```
2017-03-29 14:53:13 -07:00
Kubernetes Submit Queue 433a0438df Merge pull request #43792 from NickrenREN/asw-log-err
Automatic merge from submit-queue

Modify fatal messages

**Release note**:

```release-note
NONE
```
2017-03-29 11:50:30 -07:00
Kubernetes Submit Queue f00d371d1b Merge pull request #43699 from colemickens/faster
Automatic merge from submit-queue (batch tested with PRs 41135, 43699)

azure: reduce polling delay for all Azure clients

**What this PR does / why we need it**: Reduces the polling delay for all azure clients to 5 seconds. This should speed up some additional operations at the cost of some quota.

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

**Special notes for your reviewer**: This stacks on top of #43697, please only look at latest commit. Alternatively I can rebase this on top of master.

**Release note**:

```release-note
azure: all clients poll duration is now 5 seconds
```

I don't think the StorageClient polls anywhere, and it's a different type of client, so I didn't touch it.
2017-03-29 10:50:24 -07:00
Kubernetes Submit Queue d2d84da071 Merge pull request #43787 from supereagle/fix-deleted-typos
Automatic merge from submit-queue

fix deleted typos

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

**Which issue this PR fixes** : 

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-03-29 09:45:46 -07:00
shiywang 49161d1b18 fix Scaled down deployments cannot identify old replica sets 2017-03-30 00:13:28 +08:00
Hemant Kumar 39ec7c7400 Adding myself as reviewer for volume controller
I have helped review several PRs and made new
PRs to this area.
2017-03-29 10:42:44 -04:00
knightXun 3206f96d70 Update stateful_set_utils.go
find a syntax error,please check it.
2017-03-29 20:21:13 +08:00
Kubernetes Submit Queue 964e1553ab Merge pull request #43604 from k82cn/rkt_typo
Automatic merge from submit-queue

Fix comments typo in rkt.

fixes comments typo of rkt runtime.

```release-note
None
```
2017-03-29 00:15:14 -07:00
NickrenREN 75053b2d9e Modify fatal messages 2017-03-29 14:17:11 +08:00
supereagle 20bf575e74 fix deleted typos 2017-03-29 10:14:46 +08:00
Cole Mickens 21250f1748 azure: reduce poll delay for all clients to 5 sec 2017-03-28 18:18:36 -07:00
Cole Mickens 5c21498dbf run update-bazel.sh 2017-03-28 18:08:22 -07:00
andrewsykim 4f6c1b5ad5 call GetHostIP from makeEnvironment 2017-03-28 20:20:21 -04:00
andrewsykim f05d584a4a Regenerate code for api change 2017-03-28 20:20:20 -04:00
andrewsykim c001deed43 fetch hostIP at runtime since status manager didn't update it yet 2017-03-28 20:20:20 -04:00
andrewsykim 824d0b11cb e2e tests for status.hostIP in downward api 2017-03-28 20:20:20 -04:00
andrewsykim 91c027d6cc support hostIP in downward API 2017-03-28 20:20:19 -04:00
Cole Mickens 6eb7a1a366 azure: add k8s info to user-agent string 2017-03-28 15:17:03 -07:00
wlan0 655dfd1196 move ProvideID indexed methods to right location 2017-03-28 15:08:03 -07:00
Kubernetes Submit Queue c0497fc278 Merge pull request #43518 from zjj2wry/008
Automatic merge from submit-queue

unit test for kubectl config unset

**What this PR does / why we need it**:
unit test for kubectl config unset

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

**Release note**:

```release-note
```
2017-03-28 13:51:54 -07:00
Hemant Kumar c4aaf47282 Implement API usage metrics for gce
This PR implements tracking of GCE API usage via prometheus metrics.
2017-03-28 16:33:21 -04:00
Alejandro Escobar a5e6dcb434 addressing issue #39427 adding a flag --output to allow for either json or yaml.
updating with PR changes requested.

latest changes to having short for human readable only, and error cases moved a bit to the end.

rebase fixes

latest pr. changes.

small change moving return nil out of switch.

updated the nil check for the error in the humanreadable case.

more optimization in humanreadable code.

pushed up current test changes, this is purely temporary

finished writing tests

updated test and function names.

changed output extensions from .sh to output.

updated version, version struct now just called Version and not VersionObj.

made a few changes to testing.

fixed testing issues, created better test and cleanup

go format change.
2017-03-28 10:07:53 -07:00
Seth Jennings ebb1243aba refactor getPidsForProcess and change error handling 2017-03-28 11:34:49 -05:00
wlan0 a68c783dc8 Use ProviderID to address nodes in the cloudprovider
The cloudprovider is being refactored out of kubernetes core. This is being
done by moving all the cloud-specific calls from kube-apiserver, kubelet and
kube-controller-manager into a separately maintained binary(by vendors) called
cloud-controller-manager. The Kubelet relies on the cloudprovider to detect information
about the node that it is running on. Some of the cloudproviders worked by
querying local information to obtain this information. In the new world of things,
local information cannot be relied on, since cloud-controller-manager will not
run on every node. Only one active instance of it will be run in the cluster.

Today, all calls to the cloudprovider are based on the nodename. Nodenames are
unqiue within the kubernetes cluster, but generally not unique within the cloud.
This model of addressing nodes by nodename will not work in the future because
local services cannot be queried to uniquely identify a node in the cloud. Therefore,
I propose that we perform all cloudprovider calls based on ProviderID. This ID is
a unique identifier for identifying a node on an external database (such as
the instanceID in aws cloud).
2017-03-27 23:13:13 -07:00
Kubernetes Submit Queue 3843108081 Merge pull request #42974 from vmware/VSANPolicyProvisioningForKubernetesOnKubernetesRepo
Automatic merge from submit-queue (batch tested with PRs 42835, 42974)

VSAN policy support for storage volume provisioning inside kubernetes

The vsphere users will have the ability to specify custom Virtual SAN Storage Capabilities during dynamic volume provisioning. You can now define storage requirements, such as performance and availability, in the form of storage capabilities during dynamic volume provisioning. The storage capability requirements are converted into a Virtual SAN policy which are then pushed down to the Virtual SAN layer when a storage volume (virtual disk) is being created. The virtual disk is distributed across the Virtual SAN datastore to meet the requirements.

For example, User creates a storage class with VSAN storage capabilities:

> kind: StorageClass
> apiVersion: storage.k8s.io/v1beta1
> metadata:
>   name: slow
> provisioner: kubernetes.io/vsphere-volume
> parameters:
>   hostFailuresToTolerate: "2"
>   diskStripes: "1"
>   cacheReservation: "20"
>   datastore: VSANDatastore

The vSphere Cloud provider provisions a virtual disk (VMDK) on VSAN with the policy configured to the disk.

When you know storage requirements of your application that is being deployed on a container, you can specify these storage capabilities when you create a storage class inside Kubernetes.

@pdhamdhere @tthole @abrarshivani @divyenpatel 

**Release note**:

```release-note
None
```
2017-03-27 17:00:23 -07:00
Kubernetes Submit Queue 4159cb57b6 Merge pull request #42835 from deads2k/server-01-remove-insecure
Automatic merge from submit-queue (batch tested with PRs 42835, 42974)

remove legacy insecure port options from genericapiserver

The insecure port has been a source of problems and it will prevent proper aggregation into a cluster, so the genericapiserver has no need for it.  In addition, there's no reason for it to be in the main kube-apiserver flow either.  This pull removes it from genericapiserver and removes it from the shared kube-apiserver code.  It's still wired up in the command, but its no longer possible for someone to mess up and start using in mainline code.

@kubernetes/sig-api-machinery-misc @ncdc
2017-03-27 17:00:21 -07:00
wlan0 3d58d79669 add vendor dirs for rancher credential provider 2017-03-27 16:44:15 -07:00
wlan0 38988fec78 add rancher credential provider 2017-03-27 16:22:53 -07:00
Kubernetes Submit Queue f14618a56b Merge pull request #43622 from deads2k/cli-10-category
Automatic merge from submit-queue (batch tested with PRs 42087, 43383, 43622)

move category expansion out of restmapper

RESTMapping isn't related to CategoryExpansion (the bit that expands "all" into items to be RESTMapped).  This provides that separation and simplifies the RESTMapper interface.

@kubernetes/sig-cli-pr-reviews
2017-03-27 16:08:20 -07:00
Kubernetes Submit Queue 31e596e5ba Merge pull request #40423 from mkutsevol/feature/openstack_cinder_v1_2_auto
Automatic merge from submit-queue (batch tested with PRs 43681, 40423, 43562, 43008, 43381)

Openstack cinder v1/v2/auto API support

**What this PR does / why we need it**:
It adds support for v2 cinder API + autodetection of available cinder API level (as in LBs).
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #39572

**Special notes for your reviewer**:
Based on work by @anguslees. The first two commits are just rebased from https://github.com/kubernetes/kubernetes/pull/36344 which already had a lgtm by @jbeda 

**Release note**:

```
Add support for v2 cinder API for openstack cloud provider. By default it autodetects the available version.
```
2017-03-27 12:49:22 -07:00
Balu Dontu dbe94833eb VSAN policy support for storage volume provisioning inside kubernetes 2017-03-27 12:43:01 -07:00
deads2k cd29754680 move legacy insecure options out of the main flow 2017-03-27 14:07:54 -04:00
deads2k c2f8ef1b1a move insecure options to kubeapiserver 2017-03-27 13:55:45 -04:00
deads2k 8895f314b4 move category expansion out of restmapper 2017-03-27 13:54:05 -04:00
Kubernetes Submit Queue b705835bae Merge pull request #42911 from deads2k/server-04-combined
Automatic merge from submit-queue (batch tested with PRs 43694, 41262, 42911)

combine kube-apiserver and kube-aggregator

This combines several pulls currently in progress and wires them together.  The aggregator sits in front of the normal kube-apiserver and allows local fallthrough instead of proxying.

@kubernetes/sig-api-machinery-misc 
@DirectXMan12 since you seem invested, your life will get easier
@luxas FYI since you've started trying to wire something together.  



Dependent Pulls LGTM:
- [x] https://github.com/kubernetes/kubernetes/pull/42801
- [x] https://github.com/kubernetes/kubernetes/pull/42886
- [x] https://github.com/kubernetes/kubernetes/pull/42900
- [x] https://github.com/kubernetes/kubernetes/pull/42732
- [x] https://github.com/kubernetes/kubernetes/pull/42672
- [x] https://github.com/kubernetes/kubernetes/pull/43141
- [x] https://github.com/kubernetes/kubernetes/pull/43076
- [x] https://github.com/kubernetes/kubernetes/pull/43149
- [x] https://github.com/kubernetes/kubernetes/pull/43226
- [x] https://github.com/kubernetes/kubernetes/pull/43144
2017-03-27 09:30:24 -07:00
Kubernetes Submit Queue efa5322766 Merge pull request #42896 from deads2k/server-03-codec
Automatic merge from submit-queue (batch tested with PRs 42900, 43044, 42896, 43308, 43621)

require codecfactory

The genericapiserver requires a codec to start.  Help new comers to the API by forcing them to set it when they create a new config.
2017-03-27 08:32:27 -07:00
Kubernetes Submit Queue 9c62733b1f Merge pull request #43044 from ncdc/NewPrefixWriter
Automatic merge from submit-queue (batch tested with PRs 42900, 43044, 42896, 43308, 43621)

Convert PrefixWriter to an interface

Convert PrefixWriter to an interface to allow other packages to create instances. This is needed for downstream projects such as OpenShift.

cc @sttts @smarterclayton @oulinbao @deads2k @liggitt @kargakis @soltysh @kubernetes/sig-cli-pr-reviews
2017-03-27 08:32:25 -07:00
Kubernetes Submit Queue 599929657f Merge pull request #42482 from CaoShuFeng/trvial_fix
Automatic merge from submit-queue

remove extra function call

We have read user info from context in previous line. No need to call
this function again.

**Special notes for your reviewer**:

**Release note**:

```NONE
```
2017-03-27 07:06:23 -07:00
deads2k 8e26fa25da wire in aggregation 2017-03-27 09:44:10 -04:00
Alistair Scott fc62687b2c Fix original error being overwritten before returned 2017-03-27 13:29:59 +01:00
deads2k 087a030221 require codecfactory 2017-03-27 08:19:08 -04:00
Kubernetes Submit Queue e38c575ae6 Merge pull request #39231 from NickrenREN/getPullSecretsForPod
Automatic merge from submit-queue (batch tested with PRs 42721, 39231)

optimize getPullSecretsForPod() and syncPod()
2017-03-26 23:59:21 -07:00
Kubernetes Submit Queue 81d9e7f68a Merge pull request #42721 from NickrenREN/pv-provisionClaimOperation
Automatic merge from submit-queue

fix createProvisionedPV result err judgenment bug

When ctrl.kubeClient.Core().PersistentVolumes().Create(volume) returns no err, and storeVolumeUpdate() fails, we save PV sucessfully ,but here err is not nil,we should not run the codes next in block if err != nil {} to delete the storage asset.
same in the deletion retries below
change the err names to make it clear
**Release note**:
```release-note
NONE
```
@jsafrane @saad-ali  PTAL. Thanks
2017-03-26 23:30:34 -07:00
Kubernetes Submit Queue 2169beed23 Merge pull request #43555 from NickrenREN/pv-setClaimProvisioner
Automatic merge from submit-queue

Fix PVC Annotations

annDynamicallyProvisioned is added to PV, while PVC has annStorageProvisioner.


**Release note**:

```release-note
NONE
```
2017-03-26 22:36:45 -07:00
Kubernetes Submit Queue a7788aff24 Merge pull request #43057 from feiskyer/docker-version
Automatic merge from submit-queue

kubelet: check and enforce minimum docker api version

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

This PR adds enforcing a minimum docker api version (same with what we have do for dockertools).

**Which issue this PR fixes** 

Fixes #42696.

**Release note**:

```release-note
NONE
```
2017-03-26 21:34:04 -07:00
Kubernetes Submit Queue b9e3742779 Merge pull request #43303 from shiywang/fix1
Automatic merge from submit-queue

add cronjob resource name for get -h

Fixes https://github.com/kubernetes/kubernetes/issues/43293
@gyliu513 @ymqytw ptal
2017-03-26 14:20:48 -07:00
Wojciech Tyczynski 142c5a963d Cleanup proxy/config 2017-03-26 11:07:36 +02:00
Wojciech Tyczynski 7ce368ccd2 Simplify proxy config for Services by removing Mux. 2017-03-26 11:07:36 +02:00
Wojciech Tyczynski 596527dafa Simplify proxy config for Endpoints by removing Mux. 2017-03-26 11:07:36 +02:00
Kubernetes Submit Queue 484ac692f8 Merge pull request #43141 from deads2k/tpr-04-register
Automatic merge from submit-queue (batch tested with PRs 43429, 43416, 43312, 43141, 43421)

Create controller to auto register TPRs with the aggregator

Builds on https://github.com/kubernetes/kubernetes/pull/42732 (already lgtmed)

Creates a simple controller to wire TPRs with the API Service autoregistration controller.

@kubernetes/sig-api-machinery-misc @ncdc
2017-03-25 22:24:27 -07:00
Kubernetes Submit Queue bc0171c6ec Merge pull request #43312 from deads2k/cli-08-discovery
Automatic merge from submit-queue (batch tested with PRs 43429, 43416, 43312, 43141, 43421)

add singular resource names to discovery

Adds the singular resource name to our resource for discovery.  This is something we've discussed to remove our pseudo-pluralization library which is unreliable even for english and really has no hope of properly handling other languages or variations we can expect from TPRs and aggregated API servers.

This pull simply adds the information to discovery, it doesn't not re-wire any RESTMappers.

@kubernetes/sig-cli-misc  @kubernetes/sig-apimachinery-misc @kubernetes/api-review


```release-note
API resource discovery now includes the `singularName` used to refer to the resource.
```
2017-03-25 22:24:25 -07:00
Kubernetes Submit Queue b6312d9dd5 Merge pull request #43429 from supereagle/remove-duplicated-import
Automatic merge from submit-queue (batch tested with PRs 43429, 43416, 43312, 43141, 43421)

remove duplicated import

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

**Which issue this PR fixes**:

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2017-03-25 22:24:21 -07:00
Kubernetes Submit Queue 73a3c05f06 Merge pull request #43428 from feiskyer/typo
Automatic merge from submit-queue (batch tested with PRs 43378, 43216, 43384, 43083, 43428)

Fix tiny typo

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

**Which issue this PR fixes**

Fix type typo introduced by PR #43368.


**Release note**:

```release-note
NONE
```
2017-03-25 21:22:28 -07:00
Kubernetes Submit Queue 2209503a0f Merge pull request #43384 from junxu/remove-unused-argument-in-cronjobcontoller
Automatic merge from submit-queue (batch tested with PRs 43378, 43216, 43384, 43083, 43428)

Remove unused argument of 'groupJobsByParent' in cronjob controller

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-03-25 21:22:25 -07:00
Kubernetes Submit Queue e281128c51 Merge pull request #43216 from JulienBalestra/rkt-host-path-volume
Automatic merge from submit-queue (batch tested with PRs 43378, 43216, 43384, 43083, 43428)

Kubelet:rkt Create any missing hostPath Volumes

When using a `hostPath` inside the `Pod.spec.volumes`, this PR allows to creates any missing directory on the node.


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

With rkt as the container runtime we cannot use `hostPath` volumes if the directory is missing.

**Special notes for your reviewer**:

This PR follows [#39965](https://github.com/kubernetes/kubernetes/pull/39965)

The labels should be

> area/rkt
> area/kubelet
2017-03-25 21:22:23 -07:00
Kubernetes Submit Queue 1ed77078da Merge pull request #43378 from jsafrane/fix-partition-mount
Automatic merge from submit-queue (batch tested with PRs 43378, 43216, 43384, 43083, 43428)

Do not reformat devices with partitions

`lsblk` reports FSTYPE of devices with partition tables as empty string `""`,
which is indistinguishable from empty devices. We must look for dependent
devices (i.e. partitions) to see that the device is really empty and report
error otherwise.

The main point of this patch is to run `lsblk` without `"-n"`, i.e. print all
dependent devices and check it output.

Sample output:
```
  FirstSeen     LastSeen        Count   From                                    SubObjectPath   Type            Reason          Message
  ---------     --------        -----   ----                                    -------------   --------        ------          -------
  10s           10s             1       default-scheduler                                       Normal          Scheduled       Successfully assigned testpod to ip-172-18-11-149.ec2.internal
  2s            2s              1       kubelet, ip-172-18-11-149.ec2.internal                  Warning         FailedMount     MountVolume.MountDevice failed for volume "kubernetes.io/aws-ebs/vol-0fa9da8b91913b187" (spec.Name: "vol") pod "b74f68c5-0d6a-11e7-9233-0e11251010c0" (UID: "b74f68c5-0d6a-11e7-9233-0e11251010c0") with: failed to mount the volume as "ext4", it already contains unknown data, probably partitions. Mount error: mount failed: exit status 32
Mounting command: mount
Mounting arguments: /dev/xvdbb /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/vol-0fa9da8b91913b187 ext4 [defaults]
Output: mount: wrong fs type, bad option, bad superblock on /dev/xvdbb,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

```

Without this patch, the device would be reformatted and all data in the device partitions would be lost.

Fixes #13212

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

@kubernetes/sig-storage-pr-reviews
2017-03-25 21:22:22 -07:00
Kubernetes Submit Queue ead437f165 Merge pull request #42671 from yujuhong/do_asserts
Automatic merge from submit-queue (batch tested with PRs 43144, 42671, 43226, 43314, 43361)

Use the assert/require package in kubelet unit tests
2017-03-25 19:10:23 -07:00
Kubernetes Submit Queue ce55522e41 Merge pull request #43039 from caesarxuchao/fix-fake-event-search
Automatic merge from submit-queue (batch tested with PRs 41297, 42638, 42666, 43039, 42567)

use metav1.ListOptions in fake_event_expansion.go

Fix https://github.com/kubernetes/client-go/issues/145.
2017-03-25 18:15:25 -07:00
Kubernetes Submit Queue cba96a86c5 Merge pull request #42666 from timothysc/configmap_lock
Automatic merge from submit-queue (batch tested with PRs 41297, 42638, 42666, 43039, 42567)

Add the ability to lock on ConfigMaps to support HA for self hosted components

**What this PR does / why we need it**:
This PR add the ability to lock on ConfigMap objects.  As we self-host more and more components, ConfigMaps provides a useful resource to lock on that applies to just the component that is being added.  

This allows components such as scheduler+controller manager, etc. to have a simple mechanism to allow to active-passive HA without the cost of endpoint updates.  

**Related Issues** 
xref: https://github.com/kubernetes/client-go/issues/28 

**Special notes for your reviewer**:
We may want to deprecate endpoints locking at some point. 

**Release note**:
```
Add the ability to lock on ConfigMaps to support HA for self hosted components
```

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews @mikedanese
2017-03-25 18:15:23 -07:00
Kubernetes Submit Queue 6a529f700a Merge pull request #42948 from CaoShuFeng/fromLiteralStrings
Automatic merge from submit-queue (batch tested with PRs 42998, 42902, 42959, 43020, 42948)

[cli] fix Generator's error messages

Invalid variables are used when format error messages. This change
fixes them.

**Release note**:

```NONE
```
2017-03-25 17:17:28 -07:00
Kubernetes Submit Queue f9e87e1dc2 Merge pull request #42902 from louyihua/allow-tcp-probe-host
Automatic merge from submit-queue (batch tested with PRs 42998, 42902, 42959, 43020, 42948)

Add Host field to TCPSocketAction

Currently, TCPSocketAction always uses Pod's IP in connection. But when a pod uses the host network, sometimes firewall rules may prevent kubelet from connecting through the Pod's IP.

This PR introduces the 'Host' field for TCPSocketAction, and if it is set to non-empty string, the probe will be performed on the configured host rather than the Pod's IP. This gives users an opportunity to explicitly specify 'localhost' as the target for the above situations.

```release-note
Add Host field to TCPSocketAction
```
2017-03-25 17:17:23 -07:00
Kubernetes Submit Queue 1db60e5d55 Merge pull request #42998 from derekwaynecarr/quota-test
Automatic merge from submit-queue

Unit test quota for nodeport associated with loadbalancer

**What this PR does / why we need it**:
This PR adds unit tests to ensure node ports associated with loadbalancers are charged to quota appropriately.  The original PR that added that feature to quota lacked a unit test (https://github.com/kubernetes/kubernetes/pull/39364)
2017-03-25 16:41:50 -07:00
Kubernetes Submit Queue 8aeb601266 Merge pull request #42886 from deads2k/server-02-fallthrough
Automatic merge from submit-queue

allow fallthrough handling from go-restful routes

This sets up the gorestful routes to fall through to a default handler and reorders the API to be ahead of the other endpoints.  This makes it possible to cleanly support cases of "match, fail, try this other handler" which we'll need for API server composition.

@kubernetes/sig-api-machinery-pr-reviews @ncdc
2017-03-25 15:56:05 -07:00
Kubernetes Submit Queue 31b6a18264 Merge pull request #42818 from liggitt/proxy-msg
Automatic merge from submit-queue (batch tested with PRs 42672, 42770, 42818, 42820, 40849)

Switch clusterinfo to print recommended proxy endpoints
2017-03-25 14:27:25 -07:00
Kubernetes Submit Queue 8f40622d36 Merge pull request #42770 from eparis/efficient-debug
Automatic merge from submit-queue (batch tested with PRs 42672, 42770, 42818, 42820, 40849)

Return early from eviction debug helpers if !glog.V(3)

Should keep us from running a bunch of loops needlessly.

```release-note
NONE
```
2017-03-25 14:27:24 -07:00
Kubernetes Submit Queue 71d1e89996 Merge pull request #42989 from wojtek-t/avoid_copies_in_kube_proxy
Automatic merge from submit-queue (batch tested with PRs 41000, 42989)

Avoid unnecessary copies of  endpoints object in kube-proxy
2017-03-25 12:10:21 -07:00
Kubernetes Submit Queue a5ddb8284e Merge pull request #41000 from NickrenREN/cloud-controller-manager
Automatic merge from submit-queue

remove NewCloudNodeController() second return value
2017-03-25 11:55:21 -07:00
Wojciech Tyczynski 2a6083c3e7 Avoid copying endpoints object in kube-proxy 2017-03-25 17:41:42 +01:00
zhengjiajin ee23bb1b3c unit test for kubectl config set-context 2017-03-25 17:46:22 +08:00
zhengjiajin 611c90c65d unit test for kubectl config unset 2017-03-25 17:44:57 +08:00
shiywang 4a3dad1da6 add cronjob resource name for get -h 2017-03-25 17:42:02 +08:00
Kubernetes Submit Queue 5fd0566ce7 Merge pull request #43652 from Random-Liu/avoid-kubelet-panic
Automatic merge from submit-queue (batch tested with PRs 43653, 43654, 43652)

CRI: Check nil pointer to avoid kubelet panic.

When working on the containerd kubernetes integration, I casually returns an empty `sandboxStatus.Linux{}`, but it cause kubelet to panic.

This won't happen when runtime returns valid data, but we should not make the assumption here.

/cc @yujuhong @feiskyer
2017-03-24 22:16:21 -07:00
NickrenREN 2f89a6bda6 optimize getPullSecretsForPod() and syncPod()
Since getPullSecretsForPod() will never return err,we do not need the second return value,and modify syncPod() function.
2017-03-25 11:05:13 +08:00
NickrenREN 1dc323a8f9 remove NewCloudNodeController() second return value
NewCloudNodeController() will never return err,remove it
2017-03-25 10:54:01 +08:00
NickrenREN 0ab9f6fe55 fix createProvisionedPV result err judgenment bug
When ctrl.kubeClient.Core().PersistentVolumes().Create(volume) returns no err, but storeVolumeUpdate() failed, we save PV sucessfully ,but here err is not nil,
we should not run the codes next in block if err != nil {}
same in the deletion retries below
2017-03-25 10:48:16 +08:00
NickrenREN 5d1c7c77b4 Fix PVC Annotations
annDynamicallyProvisioned is added to PV, PVC has annStorageProvisioner
2017-03-25 10:42:04 +08:00
Kubernetes Submit Queue 3fcb7cb377 Merge pull request #42170 from rootfs/azure-file-prv
Automatic merge from submit-queue (batch tested with PRs 43642, 43170, 41813, 42170, 41581)

Enable storage class support in Azure File volume

**What this PR does / why we need it**:
Support StorageClass in Azure file volume

**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
Support StorageClass in Azure file volume

```
2017-03-24 19:04:28 -07:00
Kubernetes Submit Queue 20b01be016 Merge pull request #41813 from shiywang/timeout_options
Automatic merge from submit-queue (batch tested with PRs 43642, 43170, 41813, 42170, 41581)

Be able to specify the timeout to wait for pod for kubectl logs/attach

Fixes https://github.com/kubernetes/kubernetes/issues/41786
current flag is `get-pod-timeout`, we can have a discussion if you have better one, default unit is seconds, above 0

@soltysh @kargakis ptal, thanks
@kubernetes/sig-cli-feature-requests
2017-03-24 19:04:26 -07:00
Random-Liu 9186d1568e Check nil pointer to avoid kubelet panic. 2017-03-24 17:27:15 -07:00
Kubernetes Submit Queue d585eb3035 Merge pull request #42631 from NickrenREN/pv-isVolumeBoundToClaim-1
Automatic merge from submit-queue (batch tested with PRs 42522, 42545, 42556, 42006, 42631)

optimize the binding logic of bindClaimToVolume

extract var shouldSetBoundByController and do not need to judge volumename twice
**Release note**:
```release-note
NONE
```
2017-03-24 15:10:35 -07:00
Kubernetes Submit Queue 803369b9cc Merge pull request #42006 from screeley44/error-events3
Automatic merge from submit-queue (batch tested with PRs 42522, 42545, 42556, 42006, 42631)

Fixes MountVolume.NewMounter errors not displayed to users via describe events

Fixes #42004 

This fixes the problem of mount errors being eaten and not displayed to users again.  Specifically erros caught in MountVolume.NewMounter (like missing endpoints, etc...)

Current behavior for any mount failure:

```
Events:
  FirstSeen    LastSeen    Count    From            SubObjectPath    Type        Reason        Message
  ---------    --------    -----    ----            -------------    --------    ------        -------
  12m        12m        1    default-scheduler            Normal        Scheduled    Successfully assigned glusterfs-bb-pod1 to 127.0.0.1
  10m        1m        5    kubelet, 127.0.0.1            Warning        FailedMount    Unable to mount volumes for pod "glusterfs-bb-pod1_default(67c9dfa7-f9f5-11e6-aee2-5254003a59cf)": timeout expired waiting for volumes to attach/mount for pod "default"/"glusterfs-bb-pod1". list of unattached/unmounted volumes=[glusterfsvol]
  10m        1m        5    kubelet, 127.0.0.1            Warning        FailedSync    Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "default"/"glusterfs-bb-pod1". list of unattached/unmounted volumes=[glusterfsvol]
```

New Behavior:

For example on glusterfs - deliberately didn't create endpoints, now correct message is displayed:
```
Events:
  FirstSeen	LastSeen	Count	From			SubObjectPath	Type		Reason		Message
  ---------	--------	-----	----			-------------	--------	------		-------
  2m		2m		1	default-scheduler			Normal		Scheduled	Successfully assigned glusterfs-bb-pod1 to 127.0.0.1
  54s		54s		1	kubelet, 127.0.0.1			Warning		FailedMount	Unable to mount volumes for pod "glusterfs-bb-pod1_default(8edd2c25-fa09-11e6-92ae-5254003a59cf)": timeout expired waiting for volumes to attach/mount for pod "default"/"glusterfs-bb-pod1". With error timed out waiting for the condition. list of unattached/unmounted volumes=[glusterfsvol]
  54s		54s		1	kubelet, 127.0.0.1			Warning		FailedSync	Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "default"/"glusterfs-bb-pod1". With error timed out waiting for the condition. list of unattached/unmounted volumes=[glusterfsvol]
  2m		6s		814	kubelet, 127.0.0.1			Warning		FailedMount	MountVolume.NewMounter failed for volume "kubernetes.io/glusterfs/8edd2c25-fa09-11e6-92ae-5254003a59cf-glusterfsvol" (spec.Name: "glusterfsvol") pod "8edd2c25-fa09-11e6-92ae-5254003a59cf" (UID: "8edd2c25-fa09-11e6-92ae-5254003a59cf") with: endpoints "glusterfs-cluster" not found
```
2017-03-24 15:10:33 -07:00
Kubernetes Submit Queue a4986e38e6 Merge pull request #42556 from resouer/fix-id
Automatic merge from submit-queue (batch tested with PRs 42522, 42545, 42556, 42006, 42631)

Use pod sandbox id in checkpoint

**What this PR does / why we need it**: we should log out sandbox id when checkpoint error

**Release note**:

```NONE
```
2017-03-24 15:10:32 -07:00
Kubernetes Submit Queue d2175bab9a Merge pull request #42522 from NickrenREN/pv-err-print
Automatic merge from submit-queue

print err message when update store failed

```release-note
NONE
```
2017-03-24 15:06:49 -07:00
Nick Sardo 93cb2b41de Adding HTTPS and generic health checks to GCE 2017-03-24 14:24:42 -07:00
Kubernetes Submit Queue bc6e77d42f Merge pull request #43635 from bowei/gce-owner
Automatic merge from submit-queue

Add bowei to OWNERS of cloudproviders/gce

```release-note
none
```
2017-03-24 14:16:48 -07:00
Kubernetes Submit Queue fb537762fc Merge pull request #42297 from YuPengZTE/devErrorf
Automatic merge from submit-queue (batch tested with PRs 42237, 42297, 42279, 42436, 42551)

should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>



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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-03-24 14:16:23 -07:00
Kubernetes Submit Queue f22e621f7b Merge pull request #42237 from kargakis/remove-extra-deep-copy
Automatic merge from submit-queue

controller: drop extra rs deep-copy

@janetkuo @mwielgus
2017-03-24 14:04:22 -07:00
Bowei Du 0ab072dde8 Add bowei to OWNERS of cloudproviders/gce 2017-03-24 13:18:13 -07:00
Kubernetes Submit Queue 264c8b4340 Merge pull request #42034 from brendandburns/azure
Automatic merge from submit-queue (batch tested with PRs 41139, 41186, 38882, 37698, 42034)

Add support for bring-your-own ip address for Services on Azure

@colemickens @codablock
2017-03-24 12:33:29 -07:00
Kubernetes Submit Queue d14854fd5c Merge pull request #37698 from jsafrane/remove-all-filesystems
Automatic merge from submit-queue (batch tested with PRs 41139, 41186, 38882, 37698, 42034)

Make kubelet never delete files on mounted filesystems

With bug #27653, kubelet could remove mounted volumes and delete user data.
The bug itself is fixed, however our trust in kubelet is significantly lower.
Let's add an extra version of RemoveAll that does not cross mount boundary
(rm -rf --one-file-system).

It calls lstat(path) three times for each removed directory - once in
RemoveAllOneFilesystem and twice in IsLikelyNotMountPoint, however this way
it's platform independent and the directory that is being removed by kubelet
should be almost empty.
2017-03-24 12:33:27 -07:00
Kubernetes Submit Queue 0e17e5bd9c Merge pull request #38882 from fraenkel/configmap_env_file
Automatic merge from submit-queue (batch tested with PRs 41139, 41186, 38882, 37698, 42034)

create configmap from-env-file

Allow ConfigMaps to be created from Docker based env files.

See proposal https://github.com/kubernetes/community/issues/165

**Release-note:**
```release-note
1. create configmap has a new option --from-env-file that populates a configmap from file which follows a key=val format for each line.
2. create secret has a new option --from-env-file that populates a configmap from file which follows a key=val format for each line.
```
2017-03-24 12:33:25 -07:00
Kubernetes Submit Queue 0d53679efc Merge pull request #41139 from juanvallejo/jvallejo/set-cluster-api-value
Automatic merge from submit-queue

config set cluster api value

Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1420280

**Release note**:
```release-note
release-note-none
```

This patch sets a specified api version if one is given while setting cluster values in kubeconfig

cc @AdoHe  @pweil-
2017-03-24 12:10:55 -07:00
Kubernetes Submit Queue 92f8d9be38 Merge pull request #41696 from justinsb/rationalize_aws_owners
Automatic merge from submit-queue

Add approvers to the aws OWNERS file

Without this it was picking up reviewers from a much higher directory.

```release-note
NONE
```
2017-03-24 10:27:26 -07:00
Kubernetes Submit Queue 7e6b8c19b9 Merge pull request #43302 from harryge00/fix-typo
Automatic merge from submit-queue

fix typos

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-03-24 10:27:18 -07:00
Kubernetes Submit Queue 596fc98c60 Merge pull request #43071 from zjj2wry/master
Automatic merge from submit-queue

add comment end
2017-03-24 10:27:10 -07:00
Kubernetes Submit Queue 3b1d2343a8 Merge pull request #43208 from NickrenREN/rc-expectation
Automatic merge from submit-queue

small change to ControlleeExpectations result judgement

GetByKey() will never return err, so err != nil {} is redundant,remove it and remove the err return too


**Release note**:
```release-note
NONE
```
2017-03-24 10:27:01 -07:00
Kubernetes Submit Queue 1aff24cb53 Merge pull request #43217 from SEJeff/fix-spelling-tyop
Automatic merge from submit-queue

Fix spelling of the word successfully

A serious business project like kubernetes necessitates serious business logs.
2017-03-24 10:26:54 -07:00
Kubernetes Submit Queue ba63cb4538 Merge pull request #42903 from krousey/owners
Automatic merge from submit-queue

Remove krousey from some OWNERS files
2017-03-24 10:26:40 -07:00
Kubernetes Submit Queue 7eb02f54cd Merge pull request #42610 from timchenxiaoyu/wheretypo
Automatic merge from submit-queue

fix where typo
2017-03-24 10:26:10 -07:00
Kubernetes Submit Queue 6ae0199eb0 Merge pull request #42402 from jorenhehe/pv-typo
Automatic merge from submit-queue

fix pv_controller typos

```release-note
NONE
```
2017-03-24 10:25:55 -07:00
Kubernetes Submit Queue d3ebfb2ffb Merge pull request #42311 from timchenxiaoyu/amounttypo
Automatic merge from submit-queue

fix amount typo
2017-03-24 10:25:34 -07:00
Kubernetes Submit Queue 6eaa8610a1 Merge pull request #42226 from timchenxiaoyu/reconciletypo
Automatic merge from submit-queue

fix reconcile typo
2017-03-24 10:25:27 -07:00
Kubernetes Submit Queue 11610d0ed6 Merge pull request #42160 from gnufied/gnufied-pkg-volume-reviewer
Automatic merge from submit-queue

Add gnufied as reviewer for pkg/volume

I have helped review and contributed code to this
area already.

cc @saad-ali @jsafrane @childsb
2017-03-24 10:25:20 -07:00
Kubernetes Submit Queue 2df943ce50 Merge pull request #36698 from fabiand/no-mpathconf
Automatic merge from submit-queue

fc: Drop multipath.conf snippet

**What this PR does / why we need it**:
Removes multipath.conf - The code does not make use of it - or ensure s that it's getting used - and it should in addition be handled elsewehre.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```

A minimalistic multipath.conf got written, but it was useless, as
it is unclear if multipathd is running and there was also no
config reload triggered.

This patch drops this snippet. In general it's probably a better idea
to leave the multipath.conf to the component managing the host.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2017-03-24 10:24:49 -07:00
pospispa 1fdd163dd1 Make Some Constants Public so that They Can Be Used in an External Provisioner
Out-of-tree external provisioners have the same purpose as in-tree provisioners. As external provisioners work with PV and PVC datastructures it's an advantage to import certain Kubernetes packages instead of copy-pasting the Kubernetes code.

That's why the constants are made public so that they can be used in an external provisioner.
2017-03-24 17:09:51 +01:00
Klaus Ma 7c91274df2 Fix comments typo in rkt. 2017-03-24 11:31:15 +08:00
Bowei Du dc1e614a72 Split the GCE cloud provider into more managable chunks
Each major interface is now in its own file. Any package private
functions that are only referenced by a particular module was also moved
to the corresponding file. All common helper functions were moved to
gce_util.go.

This change is a pure movement of code; no semantic changes were made.
2017-03-23 14:40:16 -07:00
Jordan Liggitt 707f0fb131
Preserve API group order in discovery, prefer extensions over apps 2017-03-23 11:10:53 -04:00
Kubernetes Submit Queue a84f100faa Merge pull request #42422 from vmware/fix-42399.kerneltime
Automatic merge from submit-queue

Fix adding disks to more than one scsi adapter. Fixes #42399

**What this PR does / why we need it**: Allows a single node to use more than 16 disks.

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

**Special notes for your reviewer**: 

**Release note**:

```release-note
Fix adding disks to more than one scsi adapter.
```
2017-03-22 19:23:19 -07:00
Jeff Schroeder a5afdfa17f
Fix spelling of the word successfully
Auto-generated via:
    git grep -l [Ss]uccesfully  | xargs sed -ri 's/([sS])uccesfully/\1uccessfully/g'

I noticed this when running kube-scheduler with --v4 and it is annoying.
Then manually reverted changed to the vendored bits.
2017-03-22 18:33:11 -05:00
Kubernetes Submit Queue 7c24d1a665 Merge pull request #43539 from yujuhong/hostnet_ip
Automatic merge from submit-queue (batch tested with PRs 43533, 43539)

kuberuntime: don't override the pod IP for pods using host network

This fixes the issue of not passing pod IP via downward API for host network pods.
2017-03-22 15:07:18 -07:00
Yu-Ju Hong ea868d6f7b kuberuntime: don't override the pod IP for pods using host network 2017-03-22 13:28:17 -07:00
Kubernetes Submit Queue fb890dee06 Merge pull request #43474 from dcbw/cni-network-status
Automatic merge from submit-queue (batch tested with PRs 43465, 43529, 43474, 43521)

kubelet/cni: hook network plugin Status() up to CNI network discovery

Ensure that the plugin returns NotReady status until there is a
CNI network available which can be used to set up pods.

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

I think the only reason it wasn't done like this in the first place was that the dynamic "reread /etc/cni/net.d every 10s forever" was added long after the Status() hook was.  What do you think?

@freehan @caseydavenport @luxas @jbeda
2017-03-22 12:35:11 -07:00
Kubernetes Submit Queue 0450c2925f Merge pull request #43465 from kargakis/update-validation
Automatic merge from submit-queue

Disable readyReplicas validation for Deployments

Because there is no field in 1.5, when we update to 1.6 and the
controller tries to update the Deployment, it will be denied by
validation because the pre-existing availableReplicas field is greater
than readyReplicas (normally readyReplicas should always be greater or
equal).

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

@kubernetes/sig-apps-bugs
2017-03-22 12:09:33 -07:00
Michail Kargakis 7f4670d622 Disable readyReplicas validation for Deployments
Because there is no field in 1.5, when we update to 1.6 and the
controller tries to update the Deployment, it will be denied by
validation because the pre-existing availableReplicas field is greater
than readyReplicas (normally readyReplicas should always be greater or
equal).
2017-03-22 08:42:34 -04:00
Kubernetes Submit Queue ee255d09fa Merge pull request #43498 from aveshagarwal/master-issue-43228
Automatic merge from submit-queue

Add validation for affinities and taints/tolerations annotations.

It fixes annotations validation issues for pod/node affinities and taints/tolerations annotations for 1.5 to 1.6 upgrade tests as discussed in the issue https://github.com/kubernetes/kubernetes/issues/43228 .

@davidopp @derekwaynecarr @kubernetes/sig-scheduling-pr-reviews
2017-03-22 03:24:29 -07:00
xilabao d2069ab46b ignore duplicate resource in create rolebinding 2017-03-22 17:35:04 +08:00
Avesh Agarwal eccbd992da Add validation for taints annotations. 2017-03-22 01:01:49 -04:00
Avesh Agarwal ff4c1d80d2 Add validation for toleration annotations. 2017-03-22 00:53:34 -04:00
Avesh Agarwal ab5b462d17 Add node affinity, pod affinity and pod antiaffinity validation for alpha annotations. 2017-03-22 00:28:00 -04:00
Kubernetes Submit Queue 00938eac64 Merge pull request #42741 from kargakis/avoid-ns-skew
Automatic merge from submit-queue (batch tested with PRs 43481, 43419, 42741, 43480)

controller: work around milliseconds skew in AddAfter

AddAfter is not requeueing precisely after the provided time and may
skew for some millieseconds. This is really important because controllers
don't relist often so a missed check because of ms difference is
essentially dropping the key. For example, in [1] the test requeues a
Deployment for a progress check after 10s[2] but the Deployment is synced
9ms earlier ending up in the controller not recognizing the Deployment as
failed thus dropping it from the queue w/o any error. The drop is fixed by
forcing the controller to resync the Deployment but we are going to resync
after the full duration.

@deads2k if you don't like this I am going to handle this on a case by case basis

[1] https://github.com/kubernetes/kubernetes/issues/39785#issuecomment-279959133
[2] c48b2cab0f/test/e2e/deployment.go (L1122)
2017-03-21 19:29:27 -07:00
Kubernetes Submit Queue eb77144474 Merge pull request #42715 from DirectXMan12/bug/infinite-hpa
Automatic merge from submit-queue

Rate limit HPA controller to sync period

Since the HPA controller pulls information from an external source that
makes no guarantees about consistency, it's possible for the HPA
to get into an infinite update loop -- if the metrics change with
every query, the HPA controller will run it's normal reconcilation,
post a status update, see that status update itself, fetch new metrics,
and if those metrics are different, post another status update, and
repeat.  This can lead to continuously updating a single HPA.
    
By rate-limiting each HPA to once per sync interval, we prevent this
from happening.

**Release note**:
```release-note
NONE
```
2017-03-21 14:26:16 -07:00
Dan Williams 193abffdbe kubelet/cni: hook network plugin Status() up to CNI network discovery
Ensure that the plugin returns NotReady status until there is a
CNI network available which can be used to set up pods.

Fixes: https://github.com/kubernetes/kubernetes/issues/43014
2017-03-21 15:50:39 -05:00
Michail Kargakis 68b78282d7 controller: work around milliseconds skew in AddAfter 2017-03-21 16:39:32 -04:00
deads2k 1ef204aa5b add controller to update apiservices based on tpr 2017-03-21 15:58:28 -04:00
Kubernetes Submit Queue 51beb16ede Merge pull request #43422 from liggitt/convert-null-list
Automatic merge from submit-queue

Ensure slices are serialized as zero-length, not null

Fixes https://github.com/kubernetes/kubernetes/issues/43203 null serialization of slices to prevent NPE errors in clients that store and expect to receive non-null JSON values in these fields.

Ensures when we are converting to an external slice field that will be serialized even if empty (has `json` tag that does not include `omitempty`), we populate it with `[]`, not `nil`

Other places I considered putting this logic instead:

* When unmarshaling
  * Would have to be done for both protobuf and ugorji
  * Would still have to be done here (or on marshal) to handle cases where we construct objects to return
* When marshaling
  * Would have to switch to use custom json marshaler (currently we use stdlib)
* When defaulting
  * Defaulting isn't run on some fields, notably, pod template in rc/deployment spec
  * Would still have to be done here (or on marshal) to handle cases where we construct objects to return

```release-note
API fields that previously serialized null arrays as `null` and empty arrays as `[]` no longer distinguish between those values and always output `[]` when serializing to JSON.
```
2017-03-21 11:46:19 -07:00
Maxym Kutsevol 89f596f408 Update deps 2017-03-21 20:46:06 +02:00
Maxym Kutsevol 2c05bb5336 Support for v1/v2/autoprobe openstack cinder blockstorage
Support for cinder v1/v2 api with the new gophercloud/gophercloud
library. API version is configurable and defaulting autodetection.
2017-03-21 20:46:03 +02:00
deads2k 02efeeaf40 allow fallthrough handling from go-restful routes 2017-03-21 13:19:28 -04:00
deads2k 36cb9ed640 add singular resource names to discovery 2017-03-21 11:04:08 -04:00
NickrenREN 14feb9aba8 Change AddPodToVolume() arg to volumeGidValue instead of devicePath 2017-03-21 19:07:15 +08:00
NickrenREN a451daca0d cleanup: remove TODO(resolved) and var(unused) 2017-03-21 15:40:32 +08:00
supereagle 29c831aabd remove duplicated import 2017-03-21 14:45:26 +08:00
Pengfei Ni a16758396c Fix tiny typo 2017-03-21 14:22:33 +08:00
Kubernetes Submit Queue 1e5fa8fed5 Merge pull request #43415 from thockin/fix-nodeport-close-wait
Automatic merge from submit-queue

Install a REJECT rule for nodeport with no backend

Rather than actually accepting the connection, REJECT.  This will avoid
CLOSE_WAIT.

Fixes #43212


@justinsb @felipejfc @spiddy
2017-03-20 23:22:21 -07:00
Tim Hockin 2ec87999a9 Install a REJECT rule for nodeport with no backend
Rather than actually accepting the connection, REJECT.  This will avoid
CLOSE_WAIT.
2017-03-20 21:37:00 -07:00
Jordan Liggitt 939ca532aa
generated files 2017-03-20 23:57:38 -04:00
Jordan Liggitt 0e2f1b535d
Ensure empty serialized slices are zero-length, not null 2017-03-20 23:56:39 -04:00
Kubernetes Submit Queue e09fda63be Merge pull request #43414 from Random-Liu/use-uid-in-config
Automatic merge from submit-queue

Use uid in config.go instead of pod full name.

For https://github.com/kubernetes/kubernetes/issues/43397.

In config.go, use pod uid in pod cache.

Previously, if we update the static pod, even though a new UID is generated in file.go, config.go will only reference the pod with pod full name, and never update the pod UID in the internal cache. This causes:
1) If we change container spec, kubelet will restart the corresponding container because the container hash is changed.
2) If we change pod spec, kubelet will do nothing.

With this fix, kubelet will always restart pod whenever pod spec (including container spec) is changed.

@yujuhong @bowei @dchen1107 
/cc @kubernetes/sig-node-bugs
2017-03-20 18:18:36 -07:00
Kubernetes Submit Queue 4974a0589b Merge pull request #43337 from janetkuo/ds-template-semantic-deepequal
Automatic merge from submit-queue

Use Semantic.DeepEqual to compare DaemonSet template on updates

Switch to `Semantic.DeepEqual` when comparing templates on DaemonSet updates, since we can't distinguish between `null` and `[]` in protobuf. This avoids unnecessary DaemonSet pods restarts. 

I didn't touch `reflect.DeepEqual` used in controller because it's close to release date, and the DeepEqual in the controller doesn't cause serious issues (except for maybe causing more enqueues than needed). 

Fixes #43218 

@liggitt @kargakis @lukaszo @kubernetes/sig-apps-pr-reviews
2017-03-20 17:24:18 -07:00
Random-Liu fbc320af28 Use uid in config.go instead of pod full name. 2017-03-20 15:52:29 -07:00
Kubernetes Submit Queue a2d74cda38 Merge pull request #42452 from jingxu97/Mar/nodeNamePrefix
Automatic merge from submit-queue (batch tested with PRs 42452, 43399)

Modify getInstanceByName to avoid calling getInstancesByNames

This PR modify getInstanceByname to loop through all management zones
directly instead of calling getInstancesByNames. Currently
getInstancesByNames use a node name prefix as a filter to list the
instances. If the prefix does not match, it will return all instances
which is very wasteful since getInstanceByName only query one instance
with a specific name.

Partially fix issue #42445
2017-03-20 15:23:33 -07:00
Janet Kuo f780f32c1e Use Semantic.DeepEqual to compare DaemonSet template on updates 2017-03-20 13:58:49 -07:00
Kubernetes Submit Queue 948e3754f8 Merge pull request #43368 from feiskyer/dns-policy
Automatic merge from submit-queue (batch tested with PRs 43398, 43368)

CRI: add support for dns cluster first policy

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

PR #29378 introduces ClusterFirstWithHostNet policy but only dockertools was updated to support the feature. 

This PR updates kuberuntime to support it for all runtimes.


**Which issue this PR fixes** 

fixes #43352

**Special notes for your reviewer**:

Candidate for v1.6.

**Release note**:

```release-note
NONE
```

cc @thockin @luxas @vefimova @Random-Liu
2017-03-20 13:54:33 -07:00
Kubernetes Submit Queue bc82d87f0a Merge pull request #43398 from enisoc/deletion-race-flake
Automatic merge from submit-queue

Deflake TestSyncDeploymentDeletionRace

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

The cache was sometimes catching up while we were testing the case
where the cache is not yet caught up.

Before this fix, I could reproduce the failure with the following
command. After the fix, it passes.

```
go test -count 100000 -run TestSyncDeploymentDeletionRace
```

I checked the other controllers, and they all were already not starting informers for the deletion race test. I also checked that the deletion race tests for other controllers all pass with `-count 100000`.

**Which issue this PR fixes**:

Fixes #43390

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-03-20 13:26:03 -07:00
Kubernetes Submit Queue e668ee1182 Merge pull request #43370 from feiskyer/port-mapping
Automatic merge from submit-queue (batch tested with PRs 42659, 43370)

dockershim: process protocol correctly for port mapping

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

dockershim: process protocol correctly for port mapping.

**Which issue this PR fixes** 

Fixes #43365.

**Special notes for your reviewer**:

Should be included in v1.6.

**Release note**:

```release-note
NONE
```

cc/ @Random-Liu @justinsb @kubernetes/sig-node-pr-reviews
2017-03-20 12:40:40 -07:00
Anthony Yeh 0b9233648e Deflake TestSyncDeploymentDeletionRace
The cache was sometimes catching up while we were testing the case
where the cache is not yet caught up.

Before this fix, I could reproduce the failure with the following
command. After the fix, it passes.

```
go test -count 100000 -run TestSyncDeploymentDeletionRace
```
2017-03-20 11:13:26 -07:00
xujun e626e45b4d Remove unused argument of 'groupJobsByParent' function in cronjob controller. 2017-03-20 12:43:10 -04:00
Anthony Yeh c74aab649f RC/RS: Mark lookup-cache-size flags as deprecated. 2017-03-20 09:10:12 -07:00
Anthony Yeh f4ee44eb39 RC/RS: Check that ControllerRef UID matches found controller.
Otherwise, we may confuse a former controller by that name with a new
one that has the same name.
2017-03-20 08:57:42 -07:00
Jan Safranek 4cf36b8b39 Do not reformat devices with partitions
lsblk reports FSTYPE of devices with partition tables as empty string "",
which is indistinguishable from empty devices. We must look for dependent
devices (i.e. partitions) to see that the device is really empty and report
error otherwise.

I checked that LVM, LUKS and MD RAID have their own FSTYPE in lsblk output,
so it should be only a partition table that has empty FSTYPE.

The main point of this patch is to run lsblk without "-n", i.e. print all
dependent devices and check if they're there.
2017-03-20 13:08:13 +01:00
Pengfei Ni 95c3782043 Rewrite resolv.conf for dockershim
PR #29378 introduces ClusterFirstWithHostNet, but docker doesn't support
setting dns options togather with hostnetwork. This commit rewrites
resolv.conf same as dockertools.
2017-03-20 18:45:39 +08:00
Pengfei Ni 079158fa08 CRI: add support for dns cluster first policy
PR #29378 introduces ClusterFirstWithHostNet policy but only dockertools
was updated to support the feature. This PR updates kuberuntime to
support it for all runtimes.

Also fixes #43352.
2017-03-20 17:50:38 +08:00
Pengfei Ni 99ed3202f3 Run hack/update-bazel.sh 2017-03-20 17:48:36 +08:00
Pengfei Ni 53b5f2df48 Add unit test for MakePortsAndBindings 2017-03-20 17:47:38 +08:00
Antonio Murdaca caa6dd2599
pkg/kubelet/remote: fix typo
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-03-20 10:12:03 +01:00
Pengfei Ni 2ddaaec199 dockershim: process protocol correctly for port mapping 2017-03-20 16:52:24 +08:00
Kubernetes Submit Queue 47320fd3f0 Merge pull request #42938 from enisoc/orphan-race
Automatic merge from submit-queue

GC: Fix re-adoption race when orphaning dependents.

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

The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).

**Which issue this PR fixes**:

Fixes #42639

**Special notes for your reviewer**:

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

cc @kubernetes/sig-apps-pr-reviews
2017-03-20 01:30:11 -07:00
haoyuan 2b85ca8e00 fix typos 2017-03-18 22:45:07 +08:00
Kubernetes Submit Queue 7bc86d84c1 Merge pull request #43116 from dchen1107/master
Automatic merge from submit-queue (batch tested with PRs 42828, 43116)

Apply taint tolerations for NoExecute for all static pods.

Fixed https://github.com/kubernetes/kubernetes/issues/42753


**Release note**:
```
Apply taint tolerations for NoExecute for all static pods.
```

cc/ @davidopp
2017-03-17 18:14:29 -07:00
Kubernetes Submit Queue 9497139cb6 Merge pull request #42828 from janetkuo/ds-types
Automatic merge from submit-queue

Update field descriptions of DaemonSet rolling udpate

@kargakis @lukaszo @kubernetes/sig-apps-bugs
2017-03-17 17:54:14 -07:00
Anthony Yeh b4b8fdbca3 GC: Fix re-adoption race when orphaning dependents.
The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).
2017-03-17 15:39:26 -07:00
Kubernetes Submit Queue 4b00d5e42a Merge pull request #43307 from gnufied/fix-aws-legacy-tagging
Automatic merge from submit-queue (batch tested with PRs 43313, 43257, 43271, 43307)

Fix AWS untagged instances

To revert to 1.5 behaviour we need to consider untagged
instances if no clusterID has been specified or found.

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

cc @justinsb
2017-03-17 15:12:35 -07:00
Kubernetes Submit Queue eb43cd5eb3 Merge pull request #43271 from liggitt/affinity-namespace
Automatic merge from submit-queue (batch tested with PRs 43313, 43257, 43271, 43307)

Remove 'all namespaces' meaning of empty list in PodAffinityTerm

Removes the distinction between `null` and `[]` for the PodAffinityTerm#namespaces field (option 4 discussed in https://github.com/kubernetes/kubernetes/issues/43203#issuecomment-287237992), since we can't distinguish between them in protobuf (and it's a less than ideal API)

Leaves the door open to reintroducing "all namespaces" function via a dedicated field or a dedicated token in the list of namespaces

Wanted to get a PR open and tests green in case we went with this option.

Not sure what doc/release-note is needed if the "all namespaces" function is not present in 1.6
2017-03-17 15:12:33 -07:00
Janet Kuo 263d605112 Auto-generate 2017-03-17 14:42:37 -07:00
Kubernetes Submit Queue f37cffcf4e Merge pull request #43239 from enisoc/kubectl-controller-ref
Automatic merge from submit-queue

kubectl: Use v1.5-compatible ownership logic when listing dependents.

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

This restores compatibility between kubectl 1.6 and clusters running Kubernetes 1.5.x. It introduces transitional ownership logic in which the client considers ControllerRef when it exists, but does not require it to exist.

If we were to ignore ControllerRef altogether (pre-1.6 client behavior), we would introduce a new failure mode in v1.6 because controllers that used to get stuck due to selector overlap will now make progress. For example, that means when reaping ReplicaSets of an overlapping Deployment, we would risk deleting ReplicaSets belonging to a different Deployment that we aren't about to delete.

This transitional logic avoids such surprises in 1.6 clusters, and does no worse than kubectl 1.5 did in 1.5 clusters. To prevent this when kubectl 1.5 is used against 1.6 clusters, we can cherrypick this change.

**Which issue this PR fixes**:

Fixes #43159

**Special notes for your reviewer**:

**Release note**:
```release-note
```
2017-03-17 14:25:38 -07:00
Janet Kuo bca3691029 Use json field names instead of go field names 2017-03-17 14:24:21 -07:00
Janet Kuo 4cebc865dc Update description of fields for DaemonSet rolling udpate 2017-03-17 14:12:00 -07:00
Dawn Chen d419efbe71 Fix unittest reflecting the default taint tolerations change for static
pods.
2017-03-17 14:06:34 -07:00
Hemant Kumar 1de4c5bbe0 Fix AWS untagged instances
To revert to 1.5 behaviour we need to consider untagged
instances if no clusterID has been specified or found.
2017-03-17 14:05:52 -04:00
Kubernetes Submit Queue fe08925805 Merge pull request #42869 from better88/patch-1
Automatic merge from submit-queue

Fix revision when SetDeploymentRevision

When some oldRSs be deleted or cleared(eg. revisionHistoryLimit set 0), the revision for  SetDeploymentRevision is incorrect
2017-03-17 10:55:29 -07:00
Dawn Chen d26e906191 Apply taint tolerations for NoExecute for all static pods. 2017-03-17 09:50:27 -07:00
better88 6c13a02026 Fix revision when SetDeploymentRevision 2017-03-17 23:23:41 +08:00
André Martins cecc03ca8f kubectl: Adding IPv6 brackets for IPv6 endpoints
This fixes the lack of IPv6 when printing the IP:Port tuple with kubectl
describe command.

Signed-off-by: André Martins <aanm90@gmail.com>
2017-03-17 15:14:51 +00:00
Tomas Smetana 6898bc60ce Attach/detach controller: fix potential race in constructor 2017-03-17 13:34:53 +01:00
Julien Balestra cd7c480f86 Kubelet:rkt Create any missing hostPath Volumes 2017-03-17 10:47:02 +01:00
Kubernetes Submit Queue 8abb3ae7b2 Merge pull request #43269 from smarterclayton/fix_staging
Automatic merge from submit-queue

protobuf generation modifies types.go, which needs to be copied out

This was broken when we moved to the build container, but no one
noticed. Made it so that we get a test error if a field in a registered type has a json tag with no protobuf tag.

Fixes #35486
2017-03-17 00:10:25 -07:00
Kubernetes Submit Queue cdcec3f32b Merge pull request #43235 from caesarxuchao/tolerator-tpr-monitor-failure
Automatic merge from submit-queue

construction of GC should not fail for restmapper error caused by tpr

Fix https://github.com/kubernetes/kubernetes/issues/43147.

The issue is that GC will fail its initialization due to an RESTMapper error cause by tpr. This PR lets GC log the error instead of failing.
2017-03-16 23:23:31 -07:00
Kubernetes Submit Queue c119c254d6 Merge pull request #43259 from thockin/nodeport-allocation-polarity
Automatic merge from submit-queue

Fix polarity of a test in NodePort allocation

The result of this was that an update to a Service would release the
NodePort temporarily (the repair loop would fix it in a minute).  During
that window, another Service could get allocated that Port.

Fixes #43233
2017-03-16 22:39:30 -07:00
Jordan Liggitt 46b0da4320
generated files 2017-03-17 00:32:38 -04:00
Jordan Liggitt 8fda1c716b
Remove 'all namespaces' meaning of empty list in PodAffinityTerm 2017-03-17 00:32:07 -04:00
Clayton Coleman 6d2a3bdd60
Add a test that verifies all structs have protobuf tags 2017-03-17 00:29:14 -04:00
Kubernetes Submit Queue 4dffb61772 Merge pull request #42509 from caesarxuchao/comment
Automatic merge from submit-queue (batch tested with PRs 43254, 43255, 43184, 42509)

Update comment on the default DeletionPropagationPolicy

This is fixing the API doc, so apply the 1.6 milestone.

I'll run update-all.sh before merge.
2017-03-16 19:02:28 -07:00
NickrenREN aeedcbfb5e small change to ControlleeExpectations 2017-03-17 09:48:32 +08:00
Tim Hockin 348f7a7036 Don't use global rand for nodeport and IP allocs
Seed it at contruction.
2017-03-16 17:25:07 -07:00
Tim Hockin cb95c479cb Fix polarity of a test in NodePort allocation
The result of this was that an update to a Service would release the
NodePort temporarily (the repair loop would fix it in a minute).  During
that window, another Service could get allocated that Port.
2017-03-16 17:19:26 -07:00
Kubernetes Submit Queue a10c8f49ff Merge pull request #42931 from piosz/annotation-fix
Automatic merge from submit-queue

Setup fluentd-ds-ready label in startup script not in kubelet

fix #42840

``` release-note
TBD
```
2017-03-16 16:10:12 -07:00
Chao Xu 2378d39771 update-all.sh 2017-03-16 15:58:30 -07:00
Chao Xu 80686e67aa update comment on the default DeletionPropagationPolicy 2017-03-16 15:43:05 -07:00