Commit Graph

43234 Commits (31d45fe78f2d6d3091c40f6d822139f6617fc183)

Author SHA1 Message Date
Jordan Liggitt 31d45fe78f
Generated files 2017-02-06 18:16:51 -05: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
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
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
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
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
xilabao f16ed82f2f update kubeadm usage message 2017-02-06 14:25:40 +08:00
Kubernetes Submit Queue 1df1ad9d34 Merge pull request #40981 from k82cn/local_cluster_check
Automatic merge from submit-queue

Using API_HOST_IP to do apiserver health check.

In `hack/local-up-cluster.sh`, it's better to use `API_HOST_IP` to do apiserver health check.
2017-02-05 17:30:13 -08:00
Kubernetes Submit Queue 419d38a965 Merge pull request #40516 from shashidharatd/kubefed-1
Automatic merge from submit-queue

[Federation][kubefed] Add option to expose federation apiserver on nodeport service

**What this PR does / why we need it**:
This PR adds an option to kubefed to expose federation api server over nodeport. This can be useful to deploy federation in non-cloud environments. This PR is target to address #39271

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

```
[Federation] kubefed init learned a new flag, `--api-server-service-type`, that allows service type to be specified for the federation API server.
[Federation] kubefed init also learned a new flag, `--api-server-advertise-address`, that allows specifying advertise address for federation API server in case the service type is NodePort.
```

@kubernetes/sig-federation-misc @madhusudancs
2017-02-05 12:48:33 -08:00
Klaus Ma 00960b4d71 Using API_HOST_IP to do apiserver health check. 2017-02-06 04:22:20 +08:00
Dr. Stefan Schimanski 1c53f46233 Add custom conversion funcs not directly into pkg/api.Scheme 2017-02-05 15:01:47 +01:00
Kubernetes Submit Queue b9bb440bd6 Merge pull request #40031 from ethernetdan/test_owner_sig
Automatic merge from submit-queue

Add SIG to test owners

**What this PR does / why we need it**:
This PR adds a `sig` column to the test owners file generation script.

A problem experienced with the current owners file is that since members are auto-assigned there are times where tests are assigned to non-active users who don't follow up to notifications to fix flakes. By assigning a SIG to each test we can hold a group we know is active responsible for taking care of flakes it's less likely that flakes will fall through the cracks.

**Special notes for your reviewer**:
* A companion PR will go into *kubernetes/contrib* adding support for mungers parsing this new column.
   * Another PR in contrib will add labeling GitHub flake issues with the appropriate SIG
* Currently SIGs are not labeled, this will be added in another PR where SIG determinations can be discussed

@saad-ali @pwittrock
2017-02-04 18:43:05 -08:00
Phillip Wittrock 9abd275607 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.
2017-02-04 08:38:19 -08:00
Kubernetes Submit Queue 2541c16692 Merge pull request #40942 from ymqytw/extract_util_from_SMPatch
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942)

Extract util used by jsonmergepatch and SMPatch

followup  https://github.com/kubernetes/kubernetes/pull/40666#discussion_r99198931

Extract some util out of the `strategicMergePatch` to make `jsonMergePatch` doesn't depend on `strategicMergePatch`.

```release-note
None
```

cc: @liggitt
2017-02-04 04:43:10 -08:00
Kubernetes Submit Queue a777a8e3ba Merge pull request #39972 from derekwaynecarr/pod-cgroups-default
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942)

Rename experimental-cgroups-per-pod flag

**What this PR does / why we need it**:
1. Rename `experimental-cgroups-per-qos` to `cgroups-per-qos`
1. Update hack/local-up-cluster to match `CGROUP_DRIVER` with docker runtime if used.

**Special notes for your reviewer**:
We plan to roll this feature out in the upcoming release.  Previous node e2e runs were running with this feature on by default.  We will default this feature on for all e2es next week.

**Release note**:
```release-note
Rename --experiemental-cgroups-per-qos to --cgroups-per-qos
```
2017-02-04 04:43:08 -08:00
Kubernetes Submit Queue b1e669cae7 Merge pull request #40879 from copejon/pv-e2e-unique-nfs-vol
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942)

PV E2E: provide each spec with a fresh nfs host

**What this PR does / why we need it**:
PersistentVolume e2e currently reuses an NFS host pod created at the start of the suite and accessed by each test.  This is far less favorable than using a fresh volume per test.  Additionally, this guards against the volume host pod or it's kubelet being disrupted, which has led to flakes.

```release-note-none
```
2017-02-04 04:43:07 -08:00
Kubernetes Submit Queue 6adf3e5268 Merge pull request #40877 from yujuhong/rm_mirror_annotation
Automatic merge from submit-queue (batch tested with PRs 40289, 40877, 40879, 39972, 40942)

Remove the temporary fix for pre-1.0 mirror pods

The fix was introduced to fix #15960 for pre-1.0 pods. It should be safe to remove
this fix now.
2017-02-04 04:43:06 -08:00
Kubernetes Submit Queue a2931c6218 Merge pull request #40289 from xilabao/fix-save-config-in-create-subcommand
Automatic merge from submit-queue

fix --save-config in create subcommand

--save-config option doesn't work.
```
#kubectl create rolebinding a --role=b --user=c --save-config  
rolebinding "a" created
```
old output:
```
#kubectl get rolebinding a -o yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  creationTimestamp: 2017-01-23T10:09:48Z
  name: a
  namespace: default
  resourceVersion: "281"
  selfLink: /apis/rbac.authorization.k8s.io/v1beta1/namespaces/default/rolebindings/a
  uid: 12abccd6-e154-11e6-819c-525400f84377
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: b
subjects:
- apiVersion: rbac/v1alpha1
  kind: User
  name: c
```

expected output:
```
#kubectl get rolebinding a -o yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"kind":"RoleBinding","apiVersion":"rbac.authorization.k8s.io/v1beta1","metadata":{"name":"c","creationTimestamp":null},"subjects":[{"kind":"User","apiVersion":"rbac/v1alpha1","name":"c"}],"roleRef":{"apiGroup":"rbac.authorization.k8s.io","kind":"Role","name":"b"}}
  creationTimestamp: 2017-01-23T10:09:48Z
  name: a
  namespace: default
  resourceVersion: "281"
  selfLink: /apis/rbac.authorization.k8s.io/v1beta1/namespaces/default/rolebindings/a
  uid: 12abccd6-e154-11e6-819c-525400f84377
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: b
subjects:
- apiVersion: rbac/v1alpha1
  kind: User
  name: c
```
2017-02-04 04:40:29 -08:00
Kubernetes Submit Queue 320f7ce6f3 Merge pull request #40911 from nikhiljindal/finalizer1
Automatic merge from submit-queue (batch tested with PRs 40906, 40924, 40938, 40902, 40911)

federation: Updating deletion helper to add both finalizers in a single update

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

cc @mwielgus @csbell
2017-02-04 03:49:55 -08:00
Kubernetes Submit Queue a6e64246f6 Merge pull request #40902 from MHBauer/print-apiserver-log-location
Automatic merge from submit-queue (batch tested with PRs 40906, 40924, 40938, 40902, 40911)

print apiserver log location on apiserver error

**What this PR does / why we need it**:
Improve user experience. Attempt to direct user to logs of failing component.

**Special notes for your reviewer**:
In addition to failure, point to logs so that a user can attempt to self remedy and have more information available to debug immediately. A user may not know that the failing component has logs.

**Release note**:

```release-note
NONE
```
2017-02-04 03:49:54 -08:00
Kubernetes Submit Queue 839014ac04 Merge pull request #40938 from mikedanese/rotation-permission
Automatic merge from submit-queue (batch tested with PRs 40906, 40924, 40938, 40902, 40911)

allow the kubelet to request certificates
2017-02-04 03:49:52 -08:00
Kubernetes Submit Queue 4810dded39 Merge pull request #40924 from copejon/pv-e2e-add-flaky-tag
Automatic merge from submit-queue (batch tested with PRs 40906, 40924, 40938, 40902, 40911)

Add [Flaky] tag to persistent volumes tests

**What this PR does / why we need it**:
Persistent Volume tests continue to flake in CI.

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

```release-note
NONE
```
2017-02-04 03:49:51 -08:00
Kubernetes Submit Queue b40fed9eef Merge pull request #40906 from du2016/checkAPIVersions
Automatic merge from submit-queue (batch tested with PRs 40906, 40924, 40938, 40902, 40911)

Check whether apiversions is empty

What this PR does / why we need it:
#39719 check whether apisversions get from /api is empty
Special notes for your reviewer:
@caesarxuchao
2017-02-04 03:49:50 -08:00
Kubernetes Submit Queue d6a4394b53 Merge pull request #40747 from krousey/upgrades
Automatic merge from submit-queue

Add an upgrade test for secrets.

**What this PR does / why we need it**: This PR adds an upgrade test for secrets. It creates a secret and makes sure that pods can consume it before an after an upgrade.
2017-02-03 23:10:21 -08:00
Kubernetes Submit Queue 807ed7bbcd Merge pull request #40957 from janetkuo/test-e2e-owners
Automatic merge from submit-queue

Add Janet and Michail to test approver list

@kargakis @fejta
2017-02-03 22:18:06 -08:00
Kubernetes Submit Queue 4796c7b409 Merge pull request #40727 from Random-Liu/handle-cri-in-place-upgrade
Automatic merge from submit-queue

CRI: Handle cri in-place upgrade

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

## How does this PR restart/remove legacy containers/sandboxes?
With this PR, dockershim will convert and return legacy containers and infra containers as regular containers/sandboxes. Then we can rely on the SyncPod logic to stop the legacy containers/sandboxes, and the garbage collector to remove the legacy containers/sandboxes.

To forcibly trigger restart:
* For infra containers, we manually set `hostNetwork` to opposite value to trigger a restart (See [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/kuberuntime/kuberuntime_manager.go#L389))
* For application containers, they will be restarted with the infra container.
## How does this PR avoid extra overhead when there is no legacy container/sandbox?
For the lack of some labels, listing legacy containers needs extra `docker ps`. We should not introduce constant performance regression for legacy container cleanup. So we added the `legacyCleanupFlag`:
* In `ListContainers` and `ListPodSandbox`, only do extra `ListLegacyContainers` and `ListLegacyPodSandbox` when `legacyCleanupFlag` is `NotDone`.
* When dockershim starts, it will check whether there are legacy containers/sandboxes.
  * If there are none, it will mark `legacyCleanupFlag` as `Done`.
  * If there are any, it will leave `legacyCleanupFlag` as `NotDone`, and start a goroutine periodically check whether legacy cleanup is done.
This makes sure that there is overhead only when there are legacy containers/sandboxes not cleaned up yet.

## Caveats
* In-place upgrade will cause kubelet to restart all running containers.
* RestartNever container will not be restarted.
* Garbage collector sometimes keep the legacy containers for a long time if there aren't too many containers on the node. In that case, dockershim will keep performing extra `docker ps` which introduces overhead.
  * Manually remove all legacy containers will fix this.
  * Should we garbage collect legacy containers/sandboxes in dockershim by ourselves? /cc @yujuhong 
* Host port will not be reclaimed for the lack of checkpoint for legacy sandboxes. https://github.com/kubernetes/kubernetes/pull/39903 /cc @freehan 

/cc @yujuhong @feiskyer @dchen1107 @kubernetes/sig-node-api-reviews 
**Release note**:

```release-note
We should mention the caveats of in-place upgrade in release note.
```
2017-02-03 22:17:56 -08:00
Kubernetes Submit Queue 67859efaec Merge pull request #40935 from liggitt/sar-subresource
Automatic merge from submit-queue

Plumb subresource through subjectaccessreview

plumb all fields for subjectaccessreview into the resulting `authorizer.AttributesRecord`

```release-note
The SubjectAccessReview API passes subresource and resource name information to the authorizer to answer authorization queries.
```
2017-02-03 18:13:01 -08:00
Janet Kuo 86a6d1a7c6 Add Janet and Michail to test approver list 2017-02-03 16:24:13 -08:00
Kubernetes Submit Queue 7028abc5fc Merge pull request #40945 from colemickens/cmpr-azure-doc-storageclass
Automatic merge from submit-queue

examples: PV docs clarify Azure storage account restriction

**What this PR does / why we need it**: One line doc fix, clarifies a constraint for using `AzureDisk` volumes.

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

**Special notes for your reviewer**: None

**Release note**:

```release-note
NONE
```

cc: @rootfs @otaviosoares
2017-02-03 16:22:55 -08:00
Kubernetes Submit Queue 55480054f7 Merge pull request #40894 from MHBauer/groupmetafactoryargs-doc
Automatic merge from submit-queue

GroupMetaFactoryArgs documentation

**What this PR does / why we need it**:
Documentation for people writing new API-Groups.

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

**Special notes for your reviewer**:
@deads2k @pmorie my thoughts from writing the service-catalog apiserver.

**Release note**:

```release-note
NONE
```
2017-02-03 16:22:46 -08:00
Kubernetes Submit Queue ef54fbd029 Merge pull request #40842 from spxtr/tidy
Automatic merge from submit-queue

Tidy up the main README.

Removed the coveralls link since it hasn't been updated in a few years. Made some punctuation more consistent.
**Release note**:
```release-note
NONE
```
2017-02-03 16:22:36 -08:00
Kubernetes Submit Queue f20b4fc67f Merge pull request #40655 from vishh/flag-gate-critical-pod-annotation
Automatic merge from submit-queue

Optionally avoid evicting critical pods in kubelet

For #40573

```release-note
When feature gate "ExperimentalCriticalPodAnnotation" is set, Kubelet will avoid evicting pods in "kube-system" namespace that contains a special annotation - `scheduler.alpha.kubernetes.io/critical-pod`
This feature should be used in conjunction with the rescheduler to guarantee availability for critical system pods - https://kubernetes.io/docs/admin/rescheduler/
```
2017-02-03 16:22:26 -08:00