Commit Graph

19936 Commits (8d7ba2bea2ffab83115a56dc9cc67dc8ab067a2c)

Author SHA1 Message Date
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
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 1dc323a8f9 remove NewCloudNodeController() second return value
NewCloudNodeController() will never return err,remove it
2017-03-25 10:54:01 +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
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
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