Commit Graph

43266 Commits (9adf9225c42c944e022970388252e595e65cc4dc)

Author SHA1 Message Date
Jordan Liggitt 9adf9225c4
Copy authentication.k8s.io/v1beta1 types to v1 2017-02-07 00:57:14 -05:00
Kubernetes Submit Queue 9dec47dc28 Merge pull request #39369 from CallMeFoxie/validation-hostip
Automatic merge from submit-queue (batch tested with PRs 40971, 41027, 40709, 40903, 39369)

Validate unique  against HostPort/Protocol/HostIP

**What this PR does / why we need it**:
We can bind to specific IPs however validation will fail for different HostIP:HostPort combination. This is a small fix to check combination of HostPort/Protocol/HostIP rather than just HostPort/Protocol.

Sample configuration
...
"ports": [
              {
                "protocol": "TCP",
                "containerPort": 53,
                "hostPort": 55,
                "hostIP": "127.0.0.1",
                "name": "dns-local-tcp"
              },
              {
                "protocol": "TCP",
                "containerPort": 53,
                "hostPort": 55,
                "hostIP": "127.0.0.2",
                "name": "dns-local-tcp2"
              }
]

Before:
* spec.template.spec.containers[1].ports[2].hostPort: Duplicate value: "55/TCP"
* spec.template.spec.containers[1].ports[3].hostPort: Duplicate value: "55/TCP"

After applying the patch:
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:55            0.0.0.0:*               LISTEN      3644/docker-proxy
tcp        0      0 127.0.0.2:55            0.0.0.0:*               LISTEN      3629/docker-proxy

Thanks
Ashley

**Release note**:

```release-note
```
2017-02-06 20:57:18 -08:00
Kubernetes Submit Queue 98f97496ef Merge pull request #40903 from yujuhong/security_opts
Automatic merge from submit-queue (batch tested with PRs 40971, 41027, 40709, 40903, 39369)

Set docker opt separator correctly for SELinux options

This is based on @pmorie's commit from #40179
2017-02-06 20:57:17 -08:00
Kubernetes Submit Queue 460f44347c Merge pull request #40709 from liggitt/v1-sar
Automatic merge from submit-queue (batch tested with PRs 40971, 41027, 40709, 40903, 39369)

Promote SubjectAccessReview to v1

We have multiple features that depend on this API:

SubjectAccessReview
- [webhook authorization](https://kubernetes.io/docs/admin/authorization/#webhook-mode)
- [kubelet delegated authorization](https://kubernetes.io/docs/admin/kubelet-authentication-authorization/#kubelet-authorization)
- add-on API server delegated authorization

The API has been in use since 1.3 in beta status (v1beta1) with negligible changes:
- Added a status field for reporting errors evaluating access
- A typo was discovered in the SubjectAccessReviewSpec Groups field name

This PR promotes the existing v1beta1 API to v1, with the only change being the typo fix to the groups field. (fixes https://github.com/kubernetes/kubernetes/issues/32709)

Because the API does not persist data (it is a query/response-style API), there are no data migration concerns.

This positions us to promote the features that depend on this API to stable in 1.7

cc @kubernetes/sig-auth-api-reviews @kubernetes/sig-auth-misc

```release-note
The authorization.k8s.io API group was promoted to v1
```
2017-02-06 20:57:15 -08:00
Kubernetes Submit Queue 5d0377d2e2 Merge pull request #41027 from dchen1107/master
Automatic merge from submit-queue (batch tested with PRs 40971, 41027, 40709, 40903, 39369)

Bump GCI to gci-beta-56-9000-80-0

cc/ @Random-Liu @adityakali 

Changelogs since gci-dev-56-8977-0-0 (currently used in Kubernetes):
 - "net.ipv4.conf.eth0.forwarding" and "net.ipv4.ip_forward" may get reset to 0
 - Track CVE-2016-9962 in Docker in GCI
 - Linux kernel CVE-2016-7097
 - Linux kernel CVE-2015-8964
 - Linux kernel CVE-2016-6828
 - Linux kernel CVE-2016-7917
 - Linux kernel CVE-2016-7042
 - Linux kernel CVE-2016-9793
 - Linux kernel CVE-2016-7039 and CVE-2016-8666
 - Linux kernel CVE-2016-8655
 - Toolbox: allow docker image to be loaded from local tarball
 - Update compute-image-package in GCI 
 - Change the product name on /etc/os-release (to COS)
 - Remove 'dogfood' from HWID_OVERRIDE in /etc/lsb-release
 - Include Google NVME extensions to optimize LocalSSD performance.
 - /proc/<pid>/io missing on GCI (enables process stats accounting)
 - Enable BLK_DEV_THROTTLING

cc/ @roberthbailey @fabioy for GKE cluster update
2017-02-06 20:57:14 -08:00
Kubernetes Submit Queue 4db40cbd94 Merge pull request #40971 from kargakis/lack-of-progress-fix
Automatic merge from submit-queue (batch tested with PRs 40971, 41027, 40709, 40903, 39369)

test: bump deployment condition timeout

@fejta @spxtr ptal

Fixes https://github.com/kubernetes/kubernetes/issues/39785
2017-02-06 20:57:12 -08:00
Kubernetes Submit Queue 821e171247 Merge pull request #35950 from nikhiljindal/nsdelreuse
Automatic merge from submit-queue

federation: Refactoring namespaced resources deletion code from kube ns controller and sharing it with fed ns controller

Ref https://github.com/kubernetes/kubernetes/issues/33612

Refactoring code in kube namespace controller to delete all resources in a namespace when the namespace is deleted. Refactored this code into a separate NamespacedResourcesDeleter class and calling it from federation namespace controller.
This is required for enabling cascading deletion of namespaced resources in federation apiserver.
Before this PR, we were directly deleting the namespaced resources and assuming that they go away immediately. With cascading deletion, we will have to wait for the corresponding controllers to first delete the resources from underlying clusters and then delete the resource from federation control plane. NamespacedResourcesDeleter has this waiting logic.

cc @kubernetes/sig-federation-misc @caesarxuchao @derekwaynecarr @mwielgus
2017-02-06 18:10:58 -08:00
Kubernetes Submit Queue 2eebe956cc Merge pull request #40996 from NickrenREN/openstack-servername
Automatic merge from submit-queue (batch tested with PRs 40385, 40786, 40999, 41026, 40996)

optimize duplicate openstack serverList judgement

if len(serverList) > 1, we will return err in pager.EachPage() function,so here we do not need to judge again
2017-02-06 16:51:11 -08:00
Kubernetes Submit Queue 751cbc9b0c Merge pull request #41026 from apprenda/kubeadm_fix_os_remove
Automatic merge from submit-queue (batch tested with PRs 40385, 40786, 40999, 41026, 40996)

kubeadm: change os.Remove to os.RemoveAll

**What this PR does / why we need it**: This would not correctly clean out the tmp dir, since os.Remove doesn't recursively remove dirs, which could exist in the tmp dir.

Unit tests are a WIP from #34136

**Special notes for your reviewer**: /cc @luxas @pires 

**Release note**:
```release-note
NONE
```
2017-02-06 16:51:10 -08:00
Kubernetes Submit Queue e0db0932a7 Merge pull request #40999 from xingzhou/tiny-bug
Automatic merge from submit-queue (batch tested with PRs 40385, 40786, 40999, 41026, 40996)

Fixed a tiny bug on using RoleBindingGenerator

Fixed a typo bug while using RoleBindingGenerator, this
bug causes error when binding role to service accounts
through "kubectl create rolebinding" command.
2017-02-06 16:51:08 -08:00
Kubernetes Submit Queue a09c079654 Merge pull request #40786 from madhusudancs/fed-e2e-svc-nocluster-refactor
Automatic merge from submit-queue (batch tested with PRs 40385, 40786, 40999, 41026, 40996)

Refactor federated services tests a bit to move a test that requires no cluster creation to a separate block.

Follow up to PR #40769.

cc @kubernetes/sig-federation-pr-reviews
2017-02-06 16:51:07 -08:00
Kubernetes Submit Queue 9abfa6b446 Merge pull request #40385 from ncdc/shared-informers-02-swap-existing
Automatic merge from submit-queue

Replace hand-written informers with generated ones

Replace existing uses of hand-written informers with generated ones.
Follow-up commits will switch the use of one-off informers to shared
informers.

This is a precursor to #40097. That PR will switch one-off informers to shared informers for the majority of the code base (but not quite all of it...).

NOTE: this does create a second set of shared informers in the kube-controller-manager. This will be resolved back down to a single factory once #40097 is reviewed and merged.

There are a couple of places where I expanded the # of caches we wait for in the calls to `WaitForCacheSync` - please pay attention to those. I also added in a commented-out wait in the attach/detach controller. If @kubernetes/sig-storage-pr-reviews is ok with enabling the waiting, I'll do it (I'll just need to tweak an integration test slightly).

@deads2k @sttts @smarterclayton @liggitt @soltysh @timothysc @lavalamp @wojtek-t @gmarek @sjenning @derekwaynecarr @kubernetes/sig-scalability-pr-reviews
2017-02-06 16:25:42 -08:00
Kubernetes Submit Queue 4f1489edf0 Merge pull request #41045 from sttts/sttts-client-admin-key-readable
Automatic merge from submit-queue

Make client-admin.key of local-up-cluster.sh readable by kubectl

Follow-up of https://github.com/kubernetes/kubernetes/pull/40922
2017-02-06 15:35:28 -08:00
Kubernetes Submit Queue 1250278bf6 Merge pull request #40922 from berrange/hack-client-cert
Automatic merge from submit-queue

local-up-cluster: fix instructions for set-credentials

After launching the services, local-up-cluster.sh tells the
user how to configure kubectl to access it. The instructions
for 'set-credentials' enable plain password auth, but the
services are configured to mandate client certificate auth.
As a result it is not possible to access the cluster with
the instructions printed.

The use of client certs by default was added in

  commit a1b17db458
  Author: Dr. Stefan Schimanski <sttts@redhat.com>
  Date:   Sat Nov 12 23:09:04 2016 +0100

    Configure client certs in local-cluster-up.sh

and the instructions were correctly updated to refer to
client certificates.

The changed instructions were (mistakenly) reverted though
when the following commit was merged:

  commit 72e0e91b5e
  Author: xilabao <chenr.fnst@cn.fujitsu.com>
  Date:   Fri Dec 2 11:04:25 2016 +0800

    change prompt for enabling RBAC on local-up-cluster

Fixes: #40192

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-02-06 15:35:17 -08:00
Kubernetes Submit Queue 88673271d2 Merge pull request #41009 from deads2k/owners-06-registry
Automatic merge from submit-queue

add deads2k to registry package owners

I established the package layout and wrote a lot of the non-boilerplate code in this package.
2017-02-06 15:35:06 -08:00
Jordan Liggitt 8706bc9617
install authorization.k8s.io/v1, add tests
Use specific v1beta1 Authorization client

Add client expansions
2017-02-06 18:16:51 -05:00
Jordan Liggitt 31d45fe78f
Generated files 2017-02-06 18:16:51 -05:00
Yu-Ju Hong 05c3b8c1cf Set docker opt separator correctly for SELinux options 2017-02-06 14:47:30 -08:00
Jordan Liggitt ae73f2498f
Fix typo in v1beta1 field name 2017-02-06 17:43:55 -05:00
Jordan Liggitt e4d6c48900
Copy v1beta1 authorization types to v1 2017-02-06 17:43:55 -05:00
Kubernetes Submit Queue d4bcf3ede5 Merge pull request #40951 from yujuhong/fix_cri_portforward
Automatic merge from submit-queue (batch tested with PRs 40930, 40951)

Fix CRI port forwarding

Websocket support was introduced #33684, which broke the CRI
implementation. This change fixes it.
2017-02-06 14:27:05 -08:00
Kubernetes Submit Queue 44a3cd123f Merge pull request #40930 from deads2k/kubectl-01-negotiation
Automatic merge from submit-queue (batch tested with PRs 40930, 40951)

update negotiation to reflect current kubectl state

Very few things actually require negotiation, but the client-cache attempts it all the time.  If you've explicitly requested one, you still fail.  If you haven't requested one and the server doesn't have one, you still get the client behavior.  After this, if you haven't requested one and the client and server don't have one, you simply get an empty you can interpret how you choose.

@lavalamp without this, you're unable to use `kubectl` against arbitrary servers.
2017-02-06 14:27:04 -08:00
Dr. Stefan Schimanski 15cec37e7b Make client-admin.key of local-up-cluster.sh readable by kubectl 2017-02-06 23:07:06 +01:00
Kubernetes Submit Queue 095f4ef624 Merge pull request #40967 from pwittrock/discovery-client
Automatic merge from submit-queue (batch tested with PRs 40943, 40967)

Switch kubectl version and api-versions to create a discovery client …

…directly.

The clientset will throw an error for aggregated apiservers because the
clientset looks for specific versions of apis that are compiled into
the client.  These will be missing from aggregated apiservers.
The discoveryclient is fully dynamic and does not rely on compiled
in apiversions.

```release-note
NONE
```
2017-02-06 12:22:56 -08:00
Kubernetes Submit Queue b87adb21b1 Merge pull request #40943 from deads2k/apiserver-01-admission-types
Automatic merge from submit-queue (batch tested with PRs 40943, 40967)

switch admission serialized config to an apiserver type

Switches the kube admission config from componentconfig to the new `apiserver.k8s.io` group so that all API servers can use the shared configuration.  This switch external serialization, but it does not move the code that reads the config.  I'd like to do that as a follow-on.

@kubernetes/sig-api-machinery-misc @kubernetes/api-reviewers @smarterclayton 
@derekwaynecarr ptal
@sttts
2017-02-06 12:22:54 -08:00
nikhiljindal ca6f821738 Autogenerated bazel changes 2017-02-06 10:50:40 -08:00
nikhiljindal 74676f6995 Updating federation namespace controller to share namespaced resources deletion code with kube namespace controller 2017-02-06 10:50:40 -08:00
nikhiljindal c1c2a12134 Refactorying namespace deletion code to enable reuse with federation namespace controller 2017-02-06 10:50:40 -08:00
Andy Goldstein 70c6087600 Replace hand-written informers with generated ones
Replace existing uses of hand-written informers with generated ones.
 Follow-up commits will switch the use of one-off informers to shared
 informers.
2017-02-06 13:49:27 -05:00
Kubernetes Submit Queue a461eab321 Merge pull request #40883 from apprenda/kubeadm_util_template_has_unit_tests
Automatic merge from submit-queue (batch tested with PRs 39681, 39321, 41018, 40883)

kubeadm: app/util/template.go has unit tests

**What this PR does / why we need it**: There was a TODO tag about adding unit tests, but unit tests have been added and the coverage for that file is ~90%.  Tag should be removed. 

Adding unit tests is a WIP from #34136

**Special notes for your reviewer**: /cc @luxas @pires 

**Release note**:
```release-note
NONE
```
2017-02-06 10:47:00 -08:00
Kubernetes Submit Queue 816f90d88c Merge pull request #41018 from kubernetes/revert-40735-avoid_copy_in_cacher
Automatic merge from submit-queue (batch tested with PRs 39681, 39321, 41018, 40883)

Revert "Avoid unnecessary copies in cacher"

Reverts kubernetes/kubernetes#40735

Ref #41013

[I don't think it's related, but just in case it is...]
2017-02-06 10:46:58 -08:00
Kubernetes Submit Queue 010559ece6 Merge pull request #39321 from NickrenREN/controller-utils
Automatic merge from submit-queue (batch tested with PRs 39681, 39321, 41018, 40883)

remove never used var
2017-02-06 10:46:56 -08:00
Kubernetes Submit Queue d54ff64b3f Merge pull request #39681 from soltysh/batch_conversion
Automatic merge from submit-queue (batch tested with PRs 39681, 39321, 41018, 40883)

Avoid closing over range variables

Similar to #31053.

@justinsb since you authored the original one, ptal
2017-02-06 10:46:55 -08:00
Derek McQuay 011629fb5a
kubeadm: change os.Remove to os.RemoveAll
This would not correctly clean out the tmp dir, since os.Remove doesn't
recursively remove dirs, which could exist in the tmp dir.
2017-02-06 10:28:44 -08:00
Dawn Chen 687aa5768b Update node-e2e tests to gci-beta-56-9000-80-0 2017-02-06 09:25:48 -08:00
Kubernetes Submit Queue 8805a068b8 Merge pull request #40937 from pipejakob/discovery
Automatic merge from submit-queue

Discovery typo fix.

Simple typo fix.

**Release note**:

```release-note
NONE
```
2017-02-06 09:05:20 -08:00
deads2k 75841dc4f1 switch admission serialized config to an apiserver type 2017-02-06 11:38:08 -05:00
deads2k ce86ef5518 add apiserver API group for structured configuration 2017-02-06 11:22:45 -05:00
Wojciech Tyczynski f616f06764 Revert "Avoid unnecessary copies in cacher" 2017-02-06 16:50:44 +01:00
Maciej Szulik 19a25e480f Avoid closing over range variables 2017-02-06 16:02:21 +01:00
Kubernetes Submit Queue 6f37347fce Merge pull request #40931 from deads2k/owners-05-liggitt
Automatic merge from submit-queue

add liggitt to apimachinery/apiserver packages

Add @liggitt to apimachinery and apiserver packages.
2017-02-06 06:45:26 -08:00
Kubernetes Submit Queue 702ac1c504 Merge pull request #40622 from shyamjvs/refactor-returns-again
Automatic merge from submit-queue (batch tested with PRs 40978, 40994, 41008, 40622)

Refactored kubemark code into provider-specific and provider-independent parts [Part-2]

Applying part of the changes of PR https://github.com/kubernetes/kubernetes/pull/39033 (which refactored kubemark code completely). The changes included in this PR are:

- Added test/kubemark/skeleton/util.sh which defines a well-commented interface that any cloud-provider should implement to run kubemark.
  This includes functions like creating the master machine instance along with its resources, remotely executing a given command on the master (like ssh), scp, deleting the master instance and its resources.
  All these functions have to be over-ridden by each cloud provider inside the file /test/kubemark/$CLOUD_PROVIDER/util.sh
- Implemented the above mentioned interface for gce in /test/kubemark/$CLOUD_PROVIDER/util.sh
- Made start- and stop- kubemark scripts (almost) provider independent by making them source the interface based on cloud provider.

@kubernetes/sig-scalability-misc @wojtek-t @gmarek
2017-02-06 06:45:10 -08:00
Kubernetes Submit Queue 7c8091fa0c Merge pull request #41008 from wojtek-t/fix_scalability_test
Automatic merge from submit-queue (batch tested with PRs 40978, 40994, 41008, 40622)

Fix failing density test in 100-node clusters
2017-02-06 06:45:08 -08:00
Kubernetes Submit Queue 53f48f129c Merge pull request #40994 from xilabao/update-kubeadm-usage-message
Automatic merge from submit-queue (batch tested with PRs 40978, 40994, 41008, 40622)

update kubeadm usage message
2017-02-06 06:45:06 -08:00
Kubernetes Submit Queue 92d5506d39 Merge pull request #40978 from sttts/sttts-scheme-fixes
Automatic merge from submit-queue (batch tested with PRs 40978, 40994, 41008, 40622)

Add custom conversion funcs not directly into pkg/api.Scheme
2017-02-06 06:45:04 -08:00
Kubernetes Submit Queue 09cb6ee193 Merge pull request #40832 from apprenda/kubeadm_discovery_remove_error_passing
Automatic merge from submit-queue

Kubeadm discovery remove error passing

**What this PR does / why we need it**: In the app/discovery there is some confusion about the passing of error values created in the discovery/token, discovery/https/ and discovery/file pkgs.  Since they always return `nil` , it was very confusing in discovery/flags.go why to propagate them up as if there was a chance for them to return a value other than `nil`.  This change makes it much more clear what is being passed.  

I noticed this as I was making a sweep through trying to add more unit tests and it was very confusing to read the code. 

**Which issue this PR fixes** : fixes #https://github.com/kubernetes/kubeadm/issues/141

**Special notes for your reviewer**: /cc @luxas @pires 

**Release note**:
```release-note
NONE
```
2017-02-06 05:24:47 -08:00
deads2k 00bcf81943 add deads2k to registry package owners 2017-02-06 07:41:18 -05:00
Kubernetes Submit Queue d504b2665e Merge pull request #40886 from luxas/kubeadm_remove_clusterservice
Automatic merge from submit-queue

kubeadm: Remove the kubernetes.io/cluster-service label from the Deployment templates

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

As discussed on Slack, these labels have no function when not using the addon-manager, so it's best to remove them to avoid confusion.

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@thockin @mikedanese @pires @MrHohn @bowei @dmmcquay @deads2k @philips
2017-02-06 04:06:05 -08:00
Wojciech Tyczynski e3c098442d Fix failing density test in 100-node clusters 2017-02-06 12:18:10 +01:00
Daniel P. Berrange 4ed13ec484 local-up-cluster: fix instructions for set-credentials
After launching the services, local-up-cluster.sh tells the
user how to configure kubectl to access it. The instructions
for 'set-credentials' enable plain password auth, but the
services are configured to mandate client certificate auth.
As a result it is not possible to access the cluster with
the instructions printed.

The use of client certs by default was added in

  commit a1b17db458
  Author: Dr. Stefan Schimanski <sttts@redhat.com>
  Date:   Sat Nov 12 23:09:04 2016 +0100

    Configure client certs in local-cluster-up.sh

and the instructions were correctly updated to refer to
client certificates.

The changed instructions were (mistakenly) reverted though
when the following commit was merged:

  commit 72e0e91b5e
  Author: xilabao <chenr.fnst@cn.fujitsu.com>
  Date:   Fri Dec 2 11:04:25 2016 +0800

    change prompt for enabling RBAC on local-up-cluster

Fixes: #40192

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-02-06 09:55:41 +00:00