Commit Graph

20067 Commits (46d4c621a84f8dfb566b2f864f4b5bd10b09e602)

Author SHA1 Message Date
Kubernetes Submit Queue 46d4c621a8 Merge pull request #42992 from NickrenREN/syncUnboundClaim
Automatic merge from submit-queue (batch tested with PRs 43453, 42992)

make sure that the volume satisfies the requirements of the claim before binding

check if the volume requested by the claim satisfies the requirements of the claim before binding when
syncUnboundClaim and claim.Spec.VolumeName is not set, although the volume is asked by user


**Release note**:
```release-note
NONE
```
2017-04-04 04:27:19 -07:00
Kubernetes Submit Queue e9a91b8cca Merge pull request #44020 from tpot/kubectl-cmdline-spelling-fix
Automatic merge from submit-queue (batch tested with PRs 42674, 43937, 44020)

Fix spelling of 'arguments' for kubectl create authinfo

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

Fixes a silly spelling mistake in help output.

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

I've signed the CLA but don't fully understand the PR process yet.  I guess the "cla:yes" label gets added by someone else or automatically by a bot?

**Release note**:

```release-note
NONE
```
2017-04-04 00:53:16 -07:00
Kubernetes Submit Queue 7a4611f73e Merge pull request #43937 from thockin/proxy-defer-on-update-events
Automatic merge from submit-queue (batch tested with PRs 42674, 43937)

kube-proxy: OnServiceUpdate []*api.Service

This signature is more consistent with OnEndpointsUpdate and removes a
copy loop.  This is part on ongoing cleanup to rate-limit iptables
calls.
2017-04-04 00:29:17 -07:00
Tim Potter 1e4c93a0f8 Fix spelling of 'arguments' for kubectl create authinfo 2017-04-04 15:17:55 +10:00
Kubernetes Submit Queue 39713aca4e Merge pull request #42152 from CaoShuFeng/author_example
Automatic merge from submit-queue

Fix abac oplicy example file

"system:unauthenticated" is a group name rather than user name.
Fix it in the example file.



**Release note**:

```NONE
```
2017-04-03 21:09:41 -07:00
Kubernetes Submit Queue 2e6616dbb6 Merge pull request #42575 from MaciekPytel/show_configmap_events
Automatic merge from submit-queue

Include events when describing configmap

**What this PR does / why we need it**:
Currently `kubectl describe configmap/xxx` does not list events, even if there are events related to this congfigmap (and --show-events=true is explicitly passed). This PR makes it include events, same as for other resource types.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-04-03 17:27:04 -07:00
Tim Hockin adf30aa2e1 kube-proxy: OnServiceUpdate takes pointers
This signature is more consistent with OnEndpointsUpdate and removes a
copy loop.  This is part on ongoing cleanup to rate-limit iptables
calls.
2017-04-03 17:19:39 -07:00
Kubernetes Submit Queue e28cb42706 Merge pull request #42717 from andrewsykim/support-host-ip-downward-api
Automatic merge from submit-queue

Support status.hostIP in downward API

**What this PR does / why we need it**:
Exposes pod's hostIP (node IP) via downward API. 

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

**Special notes for your reviewer**:
Not sure if there's more documentation that's needed, please point me in the right direction and I will add some :)
2017-04-03 15:48:12 -07:00
Kubernetes Submit Queue 953d8838ea Merge pull request #40117 from mtaufen/flags-struct
Automatic merge from submit-queue

Add separate KubeletFlags struct and remove HostnameOverride and NodeIP from config type

Add a separate flags struct for Kubelet flags

Kubelet flags are not necessarily appropriate for the KubeletConfiguration
object. For example, this PR also removes HostnameOverride and NodeIP
from KubeletConfiguration.This is a preleminary step to enabling Nodes
to share configurations, as part of the dynamic Kubelet configuration
feature (#29459). Fields that must be unique for each node inhibit
sharing, because their values, by definition, cannot be shared.

/cc @ncdc @kubernetes/sig-node-misc @kubernetes/sig-cluster-lifecycle-misc
2017-04-03 15:02:51 -07:00
Kubernetes Submit Queue e2d011e455 Merge pull request #41582 from dashpole/unit_test_status
Automatic merge from submit-queue (batch tested with PRs 42973, 41582)

Improve status manager unit testing

This is designed to simplify testing logic in the status manager, and decrease reliance on syncBatch.  This is a smaller portion of #37119, and should be easier to review than that change.

It makes the following changes:
- creates convenience functions for get, update, and delete core.Action
- prefers using syncPod on elements in the podStatusChannel to using syncBatch to reduce unintended reliance on syncBatch
- combines consuming, validating, and clearing actions into single verifyActions function.  This replaces calls to testSyncBatch(), verifyActions(), and ClearActions
- changes comments in testing functions into log statements for easier debugging

@Random-Liu
2017-04-03 14:05:17 -07:00
Kubernetes Submit Queue 538c5c74b1 Merge pull request #42973 from gnufied/fix-vsphere-selinux
Automatic merge from submit-queue

Fix vsphere selinux support

Managed flag must be true for SELinux relabelling to work
for vsphere.

Fixes #42972
2017-04-03 13:59:56 -07:00
Michael Taufen f5eed7e91d Add a separate flags struct for Kubelet flags
Kubelet flags are not necessarily appropriate for the KubeletConfiguration
object. For example, this PR also removes HostnameOverride and NodeIP
from KubeletConfiguration. This is a preleminary step to enabling Nodes
to share configurations, as part of the dynamic Kubelet configuration
feature (#29459). Fields that must be unique for each node inhibit
sharing, because their values, by definition, cannot be shared.
2017-04-03 13:28:29 -07:00
Kubernetes Submit Queue 05c046f6d3 Merge pull request #43810 from gnufied/add-gnufied-vol-controller
Automatic merge from submit-queue

Adding gnufied as reviewer for volume controller

I have helped review several PRs and made new
PRs to this area.

cc @childsb @saad-ali
2017-04-03 12:46:25 -07:00
Kubernetes Submit Queue 4ee6782db5 Merge pull request #42512 from kubermatic/scheeles-aws
Automatic merge from submit-queue (batch tested with PRs 43925, 42512)

AWS: add KubernetesClusterID as additional option when VPC is set

This is a small enhancement after the PRs https://github.com/kubernetes/kubernetes/pull/41695 and  https://github.com/kubernetes/kubernetes/pull/39996
## Release Notes
```release-note
AWS cloud provider: allow to set KubernetesClusterID or KubernetesClusterTag in combination with VPC.
```
2017-04-03 12:46:17 -07:00
Kubernetes Submit Queue 6c6f4f0185 Merge pull request #43925 from Random-Liu/fix-dockershim-dns-options
Automatic merge from submit-queue

[CRI] Use DNSOptions passed by CRI in dockershim.

When @xlgao-zju is working on the CRI validation test, he found that dockershim is not using the DNSOptions passed in CRI. https://github.com/kubernetes-incubator/cri-tools/pull/30#issuecomment-290644357

This PR fixed the issue. I've manually tried, for `ClusterFirst` DNSPolicy, the resolv.conf will be:
```
nameserver 8.8.8.8
search corp.google.com prod.google.com prodz.google.com google.com
options ndots:5
```

For `Default` DNSPolicy, the resolv.conf will be:
```
nameserver 127.0.1.1
search corp.google.com prod.google.com prodz.google.com google.com
```

@xlgao-zju You should be able to test after this PR is merged.

/cc @yujuhong @feiskyer
2017-04-03 11:58:23 -07:00
David Ashpole 58c32c5228 improve testing 2017-04-03 11:32:53 -07:00
Kubernetes Submit Queue 6f3e5bade6 Merge pull request #40432 from sjenning/imagegc-default
Automatic merge from submit-queue

kubelet: change image-gc-high-threshold below docker dm.min_free_space

docker dm.min_free_space defaults to 10%, which "specifies the min free space percent in a thin pool require for new device creation to succeed....Whenever a new a thin pool device is created (during docker pull or during container creation), the Engine checks if the minimum free space is available. If sufficient space is unavailable, then device creation fails and any relevant docker operation fails." [1]

This setting is preventing the storage usage to cross the 90% limit. However, image GC is expected to kick in only beyond image-gc-high-threshold. The image-gc-high-threshold has a default value of 90%, and hence GC never triggers. If image-gc-high-threshold is set to a value lower than (100 - dm.min_free_space)%, GC triggers.

xref https://bugzilla.redhat.com/show_bug.cgi?id=1408309

```release-note
changed kubelet default image-gc-high-threshold to 85% to resolve a conflict with default settings in docker that prevented image garbage collection from resolving low disk space situations when using devicemapper storage.
```

@derekwaynecarr @sdodson @rhvgoyal
2017-04-03 10:51:32 -07:00
Random-Liu b1ce4b7a1d Use DNSOptions passed by CRI in dockershim. 2017-04-03 10:24:42 -07:00
NickrenREN f922af5138 make sure that the volume satisfies the requirements of the claim before binding
check if the volume requested by the claim satisfies the requirements of the claim before binding when
syncUnboundClaim and claim.Spec.VolumeName is not set
2017-04-04 01:03:37 +08:00
Kubernetes Submit Queue 1df2363093 Merge pull request #42999 from shiywang/fix-return0
Automatic merge from submit-queue (batch tested with PRs 43450, 42999, 43968)

fix kubectl config return 0 on error

Fixes https://github.com/kubernetes/kubernetes/issues/42852
cc @kubernetes/sig-cli-bugs
@ymqytw ptal
2017-04-03 09:48:23 -07:00
Kubernetes Submit Queue 2d646e0c29 Merge pull request #43450 from zjj2wry/003
Automatic merge from submit-queue (batch tested with PRs 43450, 42999, 43968)

unit test for kubectl config set-context

**What this PR does / why we need it**:
unit test for create context

**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
NONE
```
2017-04-03 09:48:21 -07:00
Kubernetes Submit Queue a2b4fb9b33 Merge pull request #43982 from jsafrane/fix-gluster-storage-class
Automatic merge from submit-queue

Fix deletion of Gluster, Ceph and Quobyte volumes

GetClassForVolume should check pv.spec.storageClassName together with beta annotation.

Fixes #43929

@kubernetes/sig-storage-pr-reviews 

```release-note
Fix bug with error "Volume has no class annotation" when deleting a PersistentVolume.
```
2017-04-03 08:35:31 -07:00
Kubernetes Submit Queue 50763cb6be Merge pull request #43627 from pospispa/make-constants-public-so-that-they-can-be-used-in-an-external-provisioner
Automatic merge from submit-queue

Make Constants Public so that They Can Be Used in an Ext. 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.

@jsafrane  @kubernetes/sig-storage-pr-reviews 

```
NONE
```
2017-04-03 06:43:03 -07:00
Jan Safranek 3fbf9cb451 Fix deletion of Gluster volumes
GetClassForVolume should check pv.spec.storageClassName together
with beta annotation.
2017-04-03 15:33:56 +02:00
Maciej Pytel 8551049ba9 Include events when describing configmap 2017-04-03 15:03:12 +02:00
Kubernetes Submit Queue 70684584be Merge pull request #42083 from fraenkel/validate_name
Automatic merge from submit-queue (batch tested with PRs 42038, 42083)

Validate ConfigMapRef and SecretRef name

fixes #42037

**Release note**:
```release-note
When creating a container using envFrom,
1. validate the name of the ConfigMap in a ConfigMapRef
2. validate the name of the Secret in a SecretRef
```
2017-04-03 04:07:21 -07:00
Kubernetes Submit Queue 46343f37dd Merge pull request #42038 from humblec/glusterfs-backup-vol1
Automatic merge from submit-queue (batch tested with PRs 42038, 42083)

 Add backup-volfile-servers to mount option. 

This feature ensures the `backup servers` in the trusted pool is contacted if there is a failure in the connected server.
Mount option becomes:
mount -t glusterfs -o log-level=ERROR,log-file=/var/lib/kubelet/plugins/kubernetes.io/glusterfs/glustermount/glusterpod-glusterfs.log,backup-volfile-servers=192.168.100.0:192.168.200.0:192.168.43.149 ..

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-04-03 04:07:19 -07:00
Kubernetes Submit Queue 74c23bdf68 Merge pull request #41805 from aanm/adding-ipv6-brackets-in-kubectl-endpoint
Automatic merge from submit-queue

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>

**What this PR does / why we need it**: This adds IPv6 brackets on IPv6 endpoints when using `kubectl describe service`

**Special notes for your reviewer**: Since the IP is a string I think the fastest way to detect if it's an IPv6 was to check for the presence of : in it. Let me know what you think.
2017-04-02 07:57:08 -07:00
Kubernetes Submit Queue 4fa902a915 Merge pull request #43933 from childsb/add_approver
Automatic merge from submit-queue

update pkg/controller/volume/OWNER to add appropriate approvers for both volume controllers

Update pkg/controller/volume approvers so that the attach/detach and binding controllers have approvers.
2017-04-01 11:37:15 -07:00
Kubernetes Submit Queue 25a87fa19c Merge pull request #40804 from runcom/prepull-cri
Automatic merge from submit-queue

test/e2e_node: prepull images with CRI

Part of https://github.com/kubernetes/kubernetes/issues/40739

- This PR builds on top of #40525 (and contains one commit from #40525)
- The second commit contains a tiny change in the `Makefile`.
- Third commit is a patch to be able to prepull images using the CRI (as opposed to run `docker` to pull images which doesn't make sense if you're using CRI most of the times)

Marked WIP till #40525 makes its way into master

@Random-Liu @lucab @yujuhong @mrunalp @rhatdan
2017-04-01 03:08:35 -07:00
Kubernetes Submit Queue fff5fae0a0 Merge pull request #43289 from tsmetana/adc-race-fix
Automatic merge from submit-queue

Attach/detach controller: fix potential race in constructor

**What this PR does / why we need it**:
There is a potential race condition in the Attach/detach controller: The "constructor" first installs informer event handlers and then creates and initializes the other data structures. However there is no guarantee an event cannot arrive before the data structures required by the event handlers are ready. This may result in nil pointer derefernces and potential crashes (e.g. the nodeAdd method calls adc.actualStateOfWorld.SetNodeStatusUpdateNeeded even though the actualStateOfWorld might be still nil).

It should be enough just to move the event handlers installation at the end of the constructor function.

**Release note**:

```release-note
NONE
```
2017-03-31 17:30:36 -07:00
childsb 308a3a8c45 Update OWNERS with approvers to cover both volume controllers. 2017-03-31 18:26:42 -05:00
Kubernetes Submit Queue dc0b1f9ed6 Merge pull request #43906 from FengyunPan/fix-updateNetworkingCondition
Automatic merge from submit-queue

Fix Judgment code in cycle

The 'i' can not be equal to updateNodeStatusMaxRetries in
updateNetworkingCondition(), and can not get error.
Let's update it.
2017-03-31 13:34:42 -07:00
Kubernetes Submit Queue 8dde5f2cb0 Merge pull request #43890 from xlgao-zju/more-robust
Automatic merge from submit-queue

Make func modifySandboxNamespaceOptions() more robust

Make func `modifySandboxNamespaceOptions()` more robust, just like what we do in func [`modifyContainerNamespaceOptions`](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/dockershim/security_context.go#L117).

/cc @feiskyer 

Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2017-03-31 12:27:03 -07:00
Kubernetes Submit Queue 667f3ef42f Merge pull request #43882 from ymqytw/check_error
Automatic merge from submit-queue (batch tested with PRs 42325, 43882)

Fix bug of not checking error

Fix bug of not checking error

```release-note
None
```
cc: @shiywang
2017-03-31 11:29:17 -07:00
Kubernetes Submit Queue b625085230 Merge pull request #42325 from tsmetana/remove-unused-method-from-og
Automatic merge from submit-queue

Remove unused method from operation_generator

This is only a removal of the GerifyVolumeIsSafeToDetach [sic] method from operation_executor. The method is not called from anywhere, moreover there is a private method named verifyVolumeIsSafeToDetach (which is being used). This looks like a cut&paste mistake that deserves to be cleaned.
```release-note
NONE
```
2017-03-31 10:56:40 -07:00
Kubernetes Submit Queue d42d630d74 Merge pull request #43762 from sjenning/docker-pid-fail
Automatic merge from submit-queue

refactor getPidsForProcess and change error handling

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

Right now, failure to read the docker pid from the pid file results in some premature nasty logging.  There is still a chance we can get the docker pid from `procfs.PidOf()`.  If that fails we should just log at `V(4)` rather than `runtime.HanldeError()`.

This PR refactors `getPidsForProcess()` to wait until both methods for determining the pid fail before logging anything.

@smarterclayton @ncdc @derekwaynecarr
2017-03-31 10:02:03 -07:00
Kubernetes Submit Queue 91c03b0e8f Merge pull request #43813 from liggitt/conditional-post-start-hook
Automatic merge from submit-queue

Make RBAC post-start hook conditional on RBAC authorizer being used

Makes the RBAC post-start hook (and reconciliation) conditional on the RBAC authorizer being used

Ensures we don't set up unnecessary objects.

```release-note
RBAC role and rolebinding auto-reconciliation is now performed only when the RBAC authorization mode is enabled.
```
2017-03-31 05:51:49 -07:00
FengyunPan c0f5b38647 Fix Judgment statement
The 'i' can not be equal to updateNodeStatusMaxRetries in
updateNetworkingCondition(), and can not get error.
Let's update it.
2017-03-31 18:56:38 +08:00
Kubernetes Submit Queue 223ac9f8b0 Merge pull request #43260 from thockin/nodeport-allocation-rand-seed
Automatic merge from submit-queue (batch tested with PRs 42379, 42668, 42876, 41473, 43260)

Don't use global rand for nodeport and IP allocs

Seed it at construction.
2017-03-30 23:36:30 -07:00
Kubernetes Submit Queue 7629bffba2 Merge pull request #42876 from timchenxiaoyu/accuratehint
Automatic merge from submit-queue (batch tested with PRs 42379, 42668, 42876, 41473, 43260)

accurate hint

accurate hint

same err hint (Error adding network) in one method,cann't position problem
2017-03-30 23:36:26 -07:00
Xianglin Gao e5b3e0879d make func modifySandboxNamespaceOptions() more robust
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2017-03-31 14:14:10 +08:00
Jordan Liggitt 890894ac4f
Disable RBAC post-start hook if not using the RBAC authorizer 2017-03-30 23:30:04 -04:00
andrewsykim a62653456b use kl.getHostIPAnyWay() to get host ip even if node is not registered 2017-03-30 21:57:08 -04:00
ymqytw 8d14b19cd7 check error 2017-03-30 17:47:18 -07:00
Kubernetes Submit Queue 7543bac563 Merge pull request #41952 from justinsb/curate_volumes_aws_ebs
Automatic merge from submit-queue

Curate owners for pkg/volume/aws_ebs

The previous list was algorithmically generated; applying some curation.

```release-note
NONE
```
2017-03-30 16:57:30 -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
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