Commit Graph

36509 Commits (f9dd76564c0fa2c340cb1a2d58c1dcdb724dd93c)

Author SHA1 Message Date
Kubernetes Submit Queue 5d218f938a Merge pull request #33242 from dims/fix-cors-hander-issue-33231
Automatic merge from submit-queue

Support Access-Control-Expose-Headers in CORS Handler

Our typical HTTP Response has a "Date" Header, if we don't add an
additional http header "Access-Control-Expose-Headers: Date" then
the browser based clients cannot use the Date HTTP Header.

Fixes #33231

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
When CORS Handler is enabled, we now add a new HTTP header named "Access-Control-Expose-Headers" with a value of "Date". This allows the "Date" HTTP header to be accessed from XHR/JavaScript.
```
2016-09-29 00:49:04 -07:00
Kubernetes Submit Queue b840605197 Merge pull request #33677 from juanvallejo/jvallejo/add-linebreak-between-resource-groups
Automatic merge from submit-queue

add linebreak between resource groups

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

Printing multiple groups via `kubectl get all` can produce output that is
hard to read in cases where there are a lot of resource types to display
/ some resource types contain varying column amounts.

This patch adds a linebreak above each group of resources only when
there is more than one group to display, and always omitting the
linebreak above the first group. This makes for slightly improved
output.

Linebreaks are printed to stderr, and honor the `--no-headers` option.

**Before**

```
$ kubectl get all
NAME                     READY     STATUS    RESTARTS   AGE
po/database-1-u9m9l      1/1       Running   3          5d
po/idling-echo-1-9fmz6   2/2       Running   8          5d
po/idling-echo-1-gzb0v   2/2       Running   4          5d
NAME               DESIRED   CURRENT   READY     AGE
rc/database-1      1         1         1         6d
rc/idling-echo-1   2         2         2         6d
NAME              CLUSTER-IP       EXTERNAL-IP   PORT(S)
AGE
svc/database      172.30.11.104    <none>        5434/TCP
6d
svc/frontend      172.30.196.217   <none>        5432/TCP
6d
svc/idling-echo   172.30.115.67    <none>        8675/TCP,3090/UDP
6d
svc/kubernetes    172.30.0.1       <none>        443/TCP,53/UDP,53/TCP
6d
svc/mynodeport    172.30.81.254    <nodes>       8080/TCP
5d
svc/mynodeport1   172.30.198.193   <nodes>       8080/TCP
5d
svc/mynodeport2   172.30.149.48    <nodes>       8080/TCP
5d
svc/mynodeport3   172.30.195.235   <nodes>       8080/TCP
5d
```

**After**

```
$ kubectl get all
NAME                     READY     STATUS    RESTARTS   AGE
po/database-1-u9m9l      1/1       Running   3          5d
po/idling-echo-1-9fmz6   2/2       Running   8          5d
po/idling-echo-1-gzb0v   2/2       Running   4          5d

NAME               DESIRED   CURRENT   READY     AGE
rc/database-1      1         1         1         6d
rc/idling-echo-1   2         2         2         6d

NAME              CLUSTER-IP       EXTERNAL-IP   PORT(S)
AGE
svc/database      172.30.11.104    <none>        5434/TCP
6d
svc/frontend      172.30.196.217   <none>        5432/TCP
6d
svc/idling-echo   172.30.115.67    <none>        8675/TCP,3090/UDP
6d
svc/kubernetes    172.30.0.1       <none>        443/TCP,53/UDP,53/TCP
6d
svc/mynodeport    172.30.81.254    <nodes>       8080/TCP
5d
svc/mynodeport1   172.30.198.193   <nodes>       8080/TCP
5d
svc/mynodeport2   172.30.149.48    <nodes>       8080/TCP
5d
svc/mynodeport3   172.30.195.235   <nodes>       8080/TCP
5d
```

cc @fabianofranz @liggitt
2016-09-28 23:13:07 -07:00
Dr. Stefan Schimanski 6f781625db Make genericapiserver Config.Complete type safe 2016-09-29 08:09:39 +02:00
Dr. Stefan Schimanski 61409c821b Turn embedding into composition: master.Config.{Config -> GenericConfig} 2016-09-29 08:09:39 +02:00
Kubernetes Submit Queue dd99d8206a Merge pull request #33678 from saad-ali/increaseDownwardAPIVolumeTestTimeout
Automatic merge from submit-queue

Increase timeout for downwardapi volume tests

PR https://github.com/kubernetes/kubernetes/pull/33165 increased the timeout to 65 seconds and that made the `Downward API Volume should update...` tests [stable on `google-gce`](https://k8s-testgrid.appspot.com/google-gce#gce&width=5&include-filter-by-regex=Downward API volume should update) but [still flaky on `google-gci`](https://k8s-testgrid.appspot.com/google-gci#gci&width=5&include-filter-by-regex=Downward API volume should update). Bumping the timeout to see if it helps with the GCI tests.

Fixes https://github.com/kubernetes/kubernetes/issues/33627, https://github.com/kubernetes/kubernetes/issues/33434, https://github.com/kubernetes/kubernetes/issues/33423, https://github.com/kubernetes/kubernetes/issues/28462

CC @zefciu
2016-09-28 22:36:19 -07:00
Kubernetes Submit Queue faac71c0dc Merge pull request #31818 from juanvallejo/jvallejo_suggest-explain-cmd-in-kube-get
Automatic merge from submit-queue

suggest use of `kube explain <resource>` in kube get output

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

This patch improves usability flow, making it easier for a user to
discover the command `kube explain <resource>` through `kube get` output.

##### After
```
$ kube get
You must specify the type of resource to get. Valid resource types include:
   * componentstatuses (aka 'cs')
   * configmaps (aka 'cm')
   * daemonsets (aka 'ds')
   * deployments (aka 'deploy')
   * events (aka 'ev')
   * endpoints (aka 'ep')
   * horizontalpodautoscalers (aka 'hpa')
   * ingress (aka 'ing')
   * jobs
   * limitranges (aka 'limits')
   * nodes (aka 'no')
   * namespaces (aka 'ns')
   * petsets (alpha feature, may be unstable)
   * pods (aka 'po')
   * persistentvolumes (aka 'pv')
   * persistentvolumeclaims (aka 'pvc')
   * quota
   * resourcequotas (aka 'quota')
   * replicasets (aka 'rs')
   * replicationcontrollers (aka 'rc')
   * secrets
   * serviceaccounts (aka 'sa')
   * services (aka 'svc')
error: Required resource not specified.
Use "kubectl explain <resource>" for a detailed description of that resource (e.g. kubectl explain pods).
See 'kubectl get -h' for help and examples.
```
2016-09-28 21:59:29 -07:00
Kubernetes Submit Queue a771063928 Merge pull request #33695 from Random-Liu/add-flaky-node-e2e-suite
Automatic merge from submit-queue

Node E2E: Add node e2e flaky suite.

Addresses #33692.

I've tested locally, this should work.
2016-09-28 21:22:40 -07:00
Kubernetes Submit Queue baa4bf763c Merge pull request #27832 from wu8685/k8s-inotify
Automatic merge from submit-queue

kubelet detects pod manifest files in the directory using inotify #27137
2016-09-28 20:45:50 -07:00
Kubernetes Submit Queue 7dcae5edd8 Merge pull request #25260 from duglin/minion
Automatic merge from submit-queue

Change minion to node

Continuation of #1111

I tried to keep this PR down to just a simple search-n-replace to keep
things simple.  I may have gone too far in some spots but its easy to
roll those back if needed - just let me know.

I avoided renaming `contrib/mesos/pkg/minion` because there's already
a `contrib/mesos/pkg/node` dir and fixing that will require a bit of work
due to a circular import chain that pops up. So I'm saving that for a
follow-on PR.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-09-28 20:08:59 -07:00
Kubernetes Submit Queue d5002d7e1e Merge pull request #29479 from timstclair/summary-test-matchers
Automatic merge from submit-queue

Rewrite summary e2e test to check metric sanity

Take two, forked from https://github.com/kubernetes/kubernetes/pull/28195

Adds a test library that extends the ginkgo matchers to check nested data structures. Then uses the new matcher library to thoroughly check the validity of every field in the summary metrics API. This approach is more flexible than the previous approach since it allows for different tests per-field, and is easier to add case-by-case exceptions. It also places the lower & upper bounds side-by-side, making the test much easier to read & reason about.

Most fields are expected to be within some bounds. This is not intended to be a performance test, so metric bounds are very loose. Rather, I'm looking to check that the values are sane to catch bugs like #27194

Fixes #23411, https://github.com/kubernetes/kubernetes/issues/31989

/cc @kubernetes/sig-node
2016-09-28 19:30:12 -07:00
Kubernetes Submit Queue 50e438a3c1 Merge pull request #33705 from yujuhong/add_owners
Automatic merge from submit-queue

Add fewer more owners for packages in kubelet
2016-09-28 18:49:52 -07:00
Kubernetes Submit Queue df0ae9f67d Merge pull request #33668 from mikedanese/private-ip
Automatic merge from submit-queue

kubeadm: default to using a private range for service subnet

We are currently using a subnet that is reserved for ISPs. Private network administrators don't control this space. Default to a subnet that private network administrators do control.

@errordeveloper @kubernetes/sig-cluster-lifecycle
2016-09-28 18:49:46 -07:00
Kubernetes Submit Queue 80123cb680 Merge pull request #31684 from nebril/refactor-docker-manager-test
Automatic merge from submit-queue

Pod creation moved outside of docker manager tests

**What this PR does / why we need it**:
It cleans up docker manager tests a little.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: related to #31550

**Special notes for your reviewer**:
I don't claim that working on this issue is finished, I cleaned up the tests just a bit
**Release note**:
```release-note
NONE
```
2016-09-28 18:10:26 -07:00
Yu-Ju Hong 2c64a29de1 Add fewer more owners for packages in kubelet 2016-09-28 17:57:24 -07:00
Kubernetes Submit Queue 1e5e4fdb9d Merge pull request #33632 from caesarxuchao/fix-package-name-bug
Automatic merge from submit-queue

Fix package name bug

Fix https://github.com/kubernetes/client-go/issues/4#issuecomment-250061886

The copy.sh used to accidentally rewrite package name. This PR fixes that. It also picked up other changes in the code base to the staging area.

@mqliang
2016-09-28 17:28:04 -07:00
Kubernetes Submit Queue b2527640e7 Merge pull request #33696 from dcbw/docs-update-ipv6-section
Automatic merge from submit-queue

docs/networking: update IPv6 support section

Update the state of IPv6 support.  Docker now supports IPv6, but network plugins and internal data structures are the main pain points now.
2016-09-28 16:47:14 -07:00
Kubernetes Submit Queue f70ac7da2d Merge pull request #33516 from yifan-gu/immutable_sandbox_config
Automatic merge from submit-queue

CRI: Add more docs abount pod sandbox config in CreateContainerRequest.

Makes it clear that the config will not change during the pod lifecycle.
The field is only for convenience.
2016-09-28 16:47:08 -07:00
Kubernetes Submit Queue 05f86233a5 Merge pull request #33144 from spxtr/restart
Automatic merge from submit-queue

Make the restart test restart the nodes without a mig rolling update.

This is one approach to fix #33113. I switched from using a mig rolling-update to just pushing the reset button on the nodes and then waiting for their boot IDs to change.
2016-09-28 16:47:02 -07:00
Davanum Srinivas 1b67df90fa Support Access-Control-Expose-Headers in CORS Handler
Our typical HTTP Response has a "Date" Header, if we don't add an
additional http header "Access-Control-Expose-Headers: Date" then
the browser based clients cannot use the Date HTTP Header.

Fixes #33231
2016-09-28 19:32:25 -04:00
Kubernetes Submit Queue 9b1e2069a6 Merge pull request #33490 from sttts/sttts-requestinfo-via-context
Automatic merge from submit-queue

Store RequestInfo in Context instead of RequestInfoResolver dependency injection

**Depends on https://github.com/kubernetes/kubernetes/pull/33478**

The `RequestInfoResolver` is used in the proxy handler and in the authorization code. It is passed through half of the apiserver code base to be available at those locations. This PR uses the context instead, which is our natural dependency injection mechanism in the handlers.

`RequestInfo` and all tooling around is moved to `pkg/apiserver/request` temporarily to avoid dependency cycles. This is necessary as long as `pkg/apiserver` implements the proxy and other handlers. Those might move to `pkg/apiserver/handlers` probably later.
2016-09-28 16:09:42 -07:00
Kubernetes Submit Queue 839f15a8b5 Merge pull request #33690 from caesarxuchao/update-changelog
Automatic merge from submit-queue

Annouce beta garbage collectionin CHANGELOG

announce beta garbage collection in 1.4.0 CHANGELOG;
copy behavior change of DELETE operation to 1.4.0 CHANGELOG.
2016-09-28 15:31:23 -07:00
Random-Liu 55dc9311ed Add node e2e flaky suite. 2016-09-28 15:23:43 -07:00
juanvallejo 0988f967f0 add check to NewCmdExec before printing suggestion
checks that the "describe" command and a parent command path exist
before printing suggestion to use the describe command to list
containers in a pod.
2016-09-28 18:02:33 -04:00
Dan Williams f1aaf79fb4 docs/networking: update IPv6 support section 2016-09-28 16:58:55 -05:00
Kubernetes Submit Queue 2cca8e5c34 Merge pull request #33687 from mikedanese/kubeadm-owners
Automatic merge from submit-queue

kubeadm: add OWNERS file

I'm picking @luxas @errordeveloper and me as the initial code reviewers. Happy to add others
2016-09-28 14:54:33 -07:00
Kubernetes Submit Queue a6f9e7eadd Merge pull request #33425 from ZTE-PaaS/zhangke-patch-051
Automatic merge from submit-queue

Use abstract cache.NewListWatchFromClient to make the code clean
2016-09-28 14:54:27 -07:00
Kubernetes Submit Queue 5780022b0d Merge pull request #33673 from mikedanese/proposal-dramatically-simplify-cluster-creation
Automatic merge from submit-queue

Proposal: Dramatically Simplify Kubernetes Cluster Creation

repost of #30360
closes #30360
2016-09-28 14:17:36 -07:00
Dr. Stefan Schimanski 8391a19b57 Decouple defaulting from genericapiserver and master 2016-09-28 23:16:09 +02:00
Chao Xu e585ee0912 include beta GC in changelog
copy behavior change of DELETE to 1.4.0 changelog
2016-09-28 14:03:34 -07:00
Mike Danese df2fcbda05 kubeadm: add OWNERS file 2016-09-28 13:52:27 -07:00
Tim St. Clair d4aeaedba0
Rewrite summary stats test to validate metrics 2016-09-28 13:44:37 -07:00
Tim St. Clair b19d71792f
Update gomega godeps to include gstruct 2016-09-28 13:44:36 -07:00
Eric Paris 3c159b4827 Merge pull request #33683 from deads2k/godep
fixup godep
2016-09-28 16:15:01 -04:00
deads2k b4a6047bb6 automated license update 2016-09-28 15:32:02 -04:00
deads2k 8b56981e0e fixup godep 2016-09-28 15:29:31 -04:00
juanvallejo 48370b2802 suggest use of `kube explain <resource>` in kube get output
This patch improves usability flow, making it easier for a user to
discover the command `kube explain <resource>` through `kube get`
output.
2016-09-28 14:54:15 -04:00
Dawn Chen 11c5320750 Merge pull request #33675 from mikedanese/fix-godeps
fix godeps
2016-09-28 11:33:09 -07:00
saadali d2bd26118a Increase timeout for downwardapi volume tests 2016-09-28 11:25:06 -07:00
Mike Danese 589d70f495 fix godeps 2016-09-28 11:22:52 -07:00
juanvallejo 735fbf9c09
add linebreak between resource groups
Printing multiple groups via `kubectl get all` can produce output that is
hard to read in cases where there are a lot of resource types to display
/ some resource types contain varying column amounts.

This patch adds a linebreak above each group of resources only when
there is more than one group to display, and always omitting the
linebreak above the first group. This makes for slightly improved
output.

Linebreaks are printed to stderr, and honor the `--no-headers` option.

**Before**

```
$ kubectl get all
NAME                     READY     STATUS    RESTARTS   AGE
po/database-1-u9m9l      1/1       Running   3          5d
po/idling-echo-1-9fmz6   2/2       Running   8          5d
po/idling-echo-1-gzb0v   2/2       Running   4          5d
NAME               DESIRED   CURRENT   READY     AGE
rc/database-1      1         1         1         6d
rc/idling-echo-1   2         2         2         6d
NAME              CLUSTER-IP       EXTERNAL-IP   PORT(S)
AGE
svc/database      172.30.11.104    <none>        5434/TCP
6d
svc/frontend      172.30.196.217   <none>        5432/TCP
6d
svc/idling-echo   172.30.115.67    <none>        8675/TCP,3090/UDP
6d
svc/kubernetes    172.30.0.1       <none>        443/TCP,53/UDP,53/TCP
6d
svc/mynodeport    172.30.81.254    <nodes>       8080/TCP
5d
svc/mynodeport1   172.30.198.193   <nodes>       8080/TCP
5d
svc/mynodeport2   172.30.149.48    <nodes>       8080/TCP
5d
svc/mynodeport3   172.30.195.235   <nodes>       8080/TCP
5d
```

**After**

```
$ kubectl get all
NAME                     READY     STATUS    RESTARTS   AGE
po/database-1-u9m9l      1/1       Running   3          5d
po/idling-echo-1-9fmz6   2/2       Running   8          5d
po/idling-echo-1-gzb0v   2/2       Running   4          5d

NAME               DESIRED   CURRENT   READY     AGE
rc/database-1      1         1         1         6d
rc/idling-echo-1   2         2         2         6d

NAME              CLUSTER-IP       EXTERNAL-IP   PORT(S)
AGE
svc/database      172.30.11.104    <none>        5434/TCP
6d
svc/frontend      172.30.196.217   <none>        5432/TCP
6d
svc/idling-echo   172.30.115.67    <none>        8675/TCP,3090/UDP
6d
svc/kubernetes    172.30.0.1       <none>        443/TCP,53/UDP,53/TCP
6d
svc/mynodeport    172.30.81.254    <nodes>       8080/TCP
5d
svc/mynodeport1   172.30.198.193   <nodes>       8080/TCP
5d
svc/mynodeport2   172.30.149.48    <nodes>       8080/TCP
5d
svc/mynodeport3   172.30.195.235   <nodes>       8080/TCP
5d
```
2016-09-28 14:21:46 -04:00
Luke Marsden 8f0047ab69 Initial commit for proposal from https://docs.google.com/document/d/1BO6JB16L27XFN-pmnFP_otvKW2cFxE-ysehI4ZJnYBo/edit 2016-09-28 11:02:50 -07:00
Doug Davis 9d5bac6330 Change minion to node
Contination of #1111

I tried to keep this PR down to just a simple search-n-replace to keep
things simple.  I may have gone too far in some spots but its easy to
roll those back if needed.

I avoided renaming `contrib/mesos/pkg/minion` because there's already
a `contrib/mesos/pkg/node` dir and fixing that will require a bit of work
due to a circular import chain that pops up. So I'm saving that for a
follow-on PR.

I rolled back some of this from a previous commit because it just got
to big/messy. Will follow up with additional PRs

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-09-28 10:53:30 -07:00
Dr. Stefan Schimanski b4c6a68036 Unify genericapiserver Config.New() and master Config.New() 2016-09-28 19:19:54 +02:00
Mike Danese 3c8c71e80e default to using a private range for service subnet 2016-09-28 10:01:55 -07:00
Kubernetes Submit Queue c0826a2e7e Merge pull request #33640 from sttts/sttts-simplify-genericapiserver-tests
Automatic merge from submit-queue

Simplify genericapiserver tests

- create empty GenericApiServier object outside helper
- set default Config values everywhere because they are set anyway
2016-09-28 09:55:55 -07:00
Dr. Stefan Schimanski 6c75e922f3 Decouple NewRequestInfoResolver from GenericApiServer instance 2016-09-28 18:51:34 +02:00
Dr. Stefan Schimanski 10cbaf7ce0 Store RequestInfo in Context
... in order to replace the manual RequestInfoResolver dependency injection
through out the code.
2016-09-28 18:51:34 +02:00
Joe Finney dc79cc82ce Make the restart test restart the nodes without a mig rolling update. 2016-09-28 09:36:24 -07:00
Kubernetes Submit Queue 53631cf4f8 Merge pull request #33658 from deads2k/remove-mesos
Automatic merge from submit-queue

promote contrib/mesos to incubator

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

`contrib/mesos` has moved to https://github.com/kubernetes-incubator/kube-mesos-framework.  Docs are updated here https://github.com/kubernetes/kubernetes.github.io/pull/1339
2016-09-28 09:19:33 -07:00
André Martins 3dfd324987 hack: fix local-cluster-up advertise_address default value
Fixes: 9fc1d61ab7

Signed-off-by: André Martins <aanm90@gmail.com>
2016-09-28 16:40:50 +01:00