Commit Graph

41959 Commits

Author SHA1 Message Date
Kubernetes Submit Queue
52a6ad0acb Merge pull request #39890 from deads2k/generic-23-post-client-go-update
Automatic merge from submit-queue

move name generation to generic api server storage helpers

Move name generation to the genericapiserver since only the server needs to know about it.

@kubernetes/sig-api-machinery-misc @sttts
2017-01-16 14:54:14 -08:00
Kubernetes Submit Queue
451a24d6de Merge pull request #39677 from apprenda/kubeadm_104-lowercase_token
Automatic merge from submit-queue

kubeadm: must lower-case token portion used in DNS label.

**What this PR does / why we need it**: In Kubernetes, DNS labels must be lower-case. `kubeadm` doesn't care when creating certain objects through the API. This PR fixes that erroneous behavior.

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

**Special notes for your reviewer**: /cc @luxas @mikedanese @dgoodwin
2017-01-16 13:43:12 -08:00
Kubernetes Submit Queue
6fe8ed738d Merge pull request #39401 from AdoHe/delete_refactor
Automatic merge from submit-queue (batch tested with PRs 39806, 39887, 39401)

refactor delete to remove cobra dependency

FYI. As part of CLI Q1 roadmap, we would like to reduce the dependency of Cobra from actual commands implementations. In this PR, I tried to refactor delete command to achieve this. @kubernetes/sig-cli-misc a quick review is quite welcome, and I am just working on more PRs.
2017-01-16 13:41:36 -08:00
Kubernetes Submit Queue
adbf6c6eb6 Merge pull request #39887 from juanvallejo/jvallejo/export-list-of-user-resources
Automatic merge from submit-queue (batch tested with PRs 39806, 39887, 39401)

export list of user resources

This patch exports the list of "userResources" found in
`pkg/kubectl/cmd/util/shortcut_resmapper.go` to allow its use in
external packages and clients.

Related downstream PR: https://github.com/openshift/origin/pull/12147

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

cc @deads2k
2017-01-16 13:41:35 -08:00
deads2k
a3e71b2cef move name generation to generic api server storage helpers 2017-01-16 16:04:04 -05:00
deads2k
8686d67c80 move pkg/util/rand 2017-01-16 16:04:03 -05:00
Kubernetes Submit Queue
d2cbdbd7d4 Merge pull request #39806 from deads2k/generic-21-move-generic-validation
Automatic merge from submit-queue

fixup some apimachinery packages

Moves the meta/v1/validation to apimachinery (since its logically shared) and moves the funny `apimachinery/pkg/genericapiserver/openapi/common` to `apimachinery/pkg/openapi`.

@kubernetes/sig-api-machinery-misc
2017-01-16 13:00:09 -08:00
Kubernetes Submit Queue
6cd0592a46 Merge pull request #39963 from deads2k/rbac-39-permissions
Automatic merge from submit-queue

add patch RS to deployment controller

Found in http://gcsweb.k8s.io/gcs/kubernetes-jenkins/logs/ci-kubernetes-e2e-gci-gce/2841/artifacts/bootstrap-e2e-master/, `RBAC DENY: user "system:serviceaccount:kube-system:deployment-controller" groups [system:serviceaccounts system:serviceaccounts:kube-system system:authenticated] cannot "patch" on "replicasets.extensions/" in namespace "e2e-tests-deployment-3rj5g"
`

@kubernetes/sig-auth-misc
2017-01-16 12:15:16 -08:00
Paulo Pires
a34eacc2af
kubeadm: token must be validated before creation, deletion or usage.
Refs kubernetes/kubeadm#104
2017-01-16 19:25:07 +00:00
Kubernetes Submit Queue
8ab0519160 Merge pull request #39961 from liggitt/patch-permissions
Automatic merge from submit-queue

Give replicaset controller patch permission on pods

Needed for AdoptPod/ReleasePod

Fixes denials seen in autoscaling test log:
`RBAC DENY: user "system:serviceaccount:kube-system:replicaset-controller" groups [system:serviceaccounts system:serviceaccounts:kube-system system:authenticated] cannot "patch" on "pods./"`
2017-01-16 11:23:40 -08:00
Paulo Pires
44b044ab0a
kubeadm: token generation must respect Kubernetes DNS labeling rules.
Refs kubernetes/kubeadm#104
2017-01-16 19:14:20 +00:00
Paulo Pires
394f93b921
kubeadm: replaced period as token separator in favor of colon. 2017-01-16 18:57:23 +00:00
deads2k
7993e7c8aa move openapi types to pkg/openapi 2017-01-16 13:40:14 -05:00
deads2k
dd7cd951ce move meta/v1/validation to apimachinery 2017-01-16 13:40:13 -05:00
Kubernetes Submit Queue
6defc30337 Merge pull request #39882 from deads2k/api-59-errors
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

move api/errors to apimachinery

`pkg/api/errors` is a set of helpers around `meta/v1.Status` that help to create and interpret various apiserver errors.  Things like `.NewNotFound` and `IsNotFound` pairings.  This pull moves it into apimachinery for use by the clients and servers.

@smarterclayton @lavalamp First commit is the move plus minor fitting.  Second commit is straight replace and generation.
2017-01-16 10:37:42 -08:00
Kubernetes Submit Queue
ab5c44efd5 Merge pull request #39946 from sttts/sttts-BuildDefaultStorageFactory-to-kubeapiserver
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

genericapiserver: cut off pkg/apis/extensions and pkg/storage dependencies

Move BuildDefaultStorageFactory to kubeapiserver.
2017-01-16 10:37:41 -08:00
Kubernetes Submit Queue
06c610e276 Merge pull request #39949 from Crassirostris/fluentd-liveness-probe-fix
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

Remove fluentd buffers if fluentd is stuck

Fluentd now stores its buffers on disk for the resiliency. However, if buffer is corrupted, fluentd will be restarting forever.

Following change will make fluentd liveness probe delete buffers if fluentd is stuck for more than X minutes (15 by default).
2017-01-16 10:37:40 -08:00
Kubernetes Submit Queue
4811ad0231 Merge pull request #38592 from krousey/client-context
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

Add optional per-request context to restclient

**What this PR does / why we need it**: It adds per-request contexts to restclient's API, and uses them to add timeouts to all proxy calls in the e2e tests. An entire e2e shouldn't hang for hours on a single API call.

**Which issue this PR fixes**: #38305

**Special notes for your reviewer**:

This adds a feature to the low-level rest client request feature that is entirely optional. It doesn't affect any requests that don't use it. The api of the generated clients does not change, and they currently don't take advantage of this.

I intend to patch this in to 1.5 as a mostly test only change since it's not going to affect any controller, generated client, or user of the generated client.


cc @kubernetes/sig-api-machinery 
cc @saad-ali
2017-01-16 10:37:38 -08:00
Paulo Pires
c707cbf176
kubeadm: test should not proceed if script execution fails. 2017-01-16 18:23:30 +00:00
Paulo Pires
0fdc0fcfbb
kubeadm: test should escape regexp on output. 2017-01-16 18:23:24 +00:00
deads2k
56c0ae6456 add patch RS to deployment controller 2017-01-16 12:44:25 -05:00
Jordan Liggitt
4eee0b2b41
Give replicaset controller patch permission on pods
Needed for AdoptPod/ReleasePod
2017-01-16 12:32:37 -05:00
Kubernetes Submit Queue
9118a1252f Merge pull request #39915 from pmorie/serialization-test
Automatic merge from submit-queue (batch tested with PRs 39947, 39936, 39902, 39859, 39915)

Make api serialization test easier to follow

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

This PR makes the serialization test easier to understand and is informed by the recent experience of writing a new serialization test in SIG service catalog.

**Release note**:

```release-note
NONE
```
2017-01-16 09:26:19 -08:00
Kubernetes Submit Queue
17a6f41367 Merge pull request #39859 from k82cn/test_script
Automatic merge from submit-queue (batch tested with PRs 39947, 39936, 39902, 39859, 39915)

Moved _pkg to embeded script.

fixes #39840
2017-01-16 09:26:17 -08:00
Kubernetes Submit Queue
639106540b Merge pull request #39902 from mikedanese/bad-log
Automatic merge from submit-queue (batch tested with PRs 39947, 39936, 39902, 39859, 39915)

don't lie about starting the controllers in the controller manager

We print started even if it didn't start.
2017-01-16 09:26:16 -08:00
Kubernetes Submit Queue
aef113454f Merge pull request #39936 from xilabao/patch-4
Automatic merge from submit-queue (batch tested with PRs 39947, 39936, 39902, 39859, 39915)

fix example in set selector
2017-01-16 09:26:14 -08:00
Kubernetes Submit Queue
64b39af371 Merge pull request #39947 from sttts/sttts-util-cert-certificates-api-dep
Automatic merge from submit-queue (batch tested with PRs 39947, 39936, 39902, 39859, 39915)

genericapiserver: cut off certificates api dependency

By cutting off pkg/apis/certificates depenedency from pkg/util/certs.
2017-01-16 09:26:12 -08:00
deads2k
77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Kubernetes Submit Queue
8fa23586cf Merge pull request #39918 from liggitt/e2e-examples-permissions
Automatic merge from submit-queue

Fix examples e2e permission check

Ref #39382
Follow-up from #39896

Permission check should be done within the e2e test namespace, not cluster-wide

Also improved RBAC audit logging to make the scope of the permission check clearer
2017-01-16 06:30:29 -08:00
deads2k
680ce72c07 move api/errors to apimachinery 2017-01-16 09:19:15 -05:00
Dr. Stefan Schimanski
1a7242a84c Move BuildDefaultStorageFactory to kubeapiserver 2017-01-16 14:25:58 +01:00
Dr. Stefan Schimanski
918868b115 genericapiserver: cut off certificates api dependency 2017-01-16 14:10:59 +01:00
Mik Vyatskov
edf1ffc074 Remove fluentd buffers if fluentd is stuck 2017-01-16 13:47:23 +01:00
Kubernetes Submit Queue
eb9f953496 Merge pull request #39876 from deads2k/generic-20-deps-03
Automatic merge from submit-queue

move more things to apiserver

```
pkg/genericapiserver/api/handlers/negotiation/ -> apiserver/pkg/handlers/negotiation
pkg/genericapiserver/api/metrics -> apiserver/pkg/metrics
pkg/genericapiserver/api/request -> apiserver/pkg/request
pkg/util/wsstream -> apiserver/pkg/util/wsstream
plugin/pkg/auth/authenticator/request/headerrequest -> apiserver/pkg/authentication/request/headerrequest
plugin/pkg/webhook -> apiserver/pkg/webhook
```

and mechanicals.

`k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger` needs to be sorted out.
2017-01-16 04:14:37 -08:00
xilabao
8acbbb21e1 fix example in set selector
example run failed
2017-01-16 01:55:30 -06:00
Kubernetes Submit Queue
32e163c928 Merge pull request #39715 from tanshanshan/scheduler-example
Automatic merge from submit-queue

PodFitsPorts has been replaced by PodFitsHostPorts

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

in  [defaults.go](https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go)
>  PodFitsPorts has been replaced by PodFitsHostPorts for better user understanding.
 For backwards compatibility with 1.0, PodFitsPorts is registered as well.



So  ,  I replaced PodFitsPorts  with PodFitsHostPorts  in scheduler examples

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-15 17:09:08 -08:00
Kubernetes Submit Queue
0ca72d110d Merge pull request #39655 from xychu/typo-in-quota-ctr
Automatic merge from submit-queue

Fix typo in resource quota controller comments
2017-01-15 01:14:38 -08:00
AdoHe
d6d82425a4 refactor delete to remove cobra dependency 2017-01-15 15:30:06 +08:00
Kubernetes Submit Queue
e73e749459 Merge pull request #39679 from errows/fix_sucessfully_typos
Automatic merge from submit-queue (batch tested with PRs 39417, 39679)

Fix 2 `sucessfully` typos

**What this PR does / why we need it**: Only fixes two typos in comments/logging

**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-01-14 19:51:09 -08:00
Kubernetes Submit Queue
a4dc55d628 Merge pull request #39417 from NickrenREN/fix-typo
Automatic merge from submit-queue (batch tested with PRs 39417, 39679)

fix typo
2017-01-14 19:51:06 -08:00
Kubernetes Submit Queue
2652252223 Merge pull request #39867 from Crassirostris/gcl-logging-on-gke
Automatic merge from submit-queue

Include gcl logging test in gke suite
2017-01-14 16:22:14 -08:00
Jordan Liggitt
7f81e2e4ac
Improve RBAC denial audit logging 2017-01-14 17:31:58 -05:00
Jordan Liggitt
07e52481e9
Fix examples e2e permission check 2017-01-14 17:22:45 -05:00
Kubernetes Submit Queue
f21a0f03c3 Merge pull request #39905 from mikedanese/cert-rbac
Automatic merge from submit-queue

add rbac role for certificate-controller

@liggitt @jcbsmpsn @pipejakob
2017-01-14 07:46:11 -08:00
Paul Morie
7408e6292e Make api serialization test easier to follow 2017-01-14 10:44:15 -05:00
Kubernetes Submit Queue
616038db1b Merge pull request #39675 from apprenda/dns_case_insensitive
Automatic merge from submit-queue

Don't blame DNS spec on Kubernetes requirement for lower-case DNS labels.

**What this PR does / why we need it**: #39635 was rejected because it wasn't clear to the author (me) that lower-case DNS labels are in fact a [Kubernetes requirement](https://github.com/kubernetes/kubernetes/pull/39635#issuecomment-271404975) rather than from the [DNS RFC 1035](https://www.ietf.org/rfc/rfc1035.txt) or/and [DNS RFC 1123](https://www.ietf.org/rfc/rfc1123.txt).

**Special notes for your reviewer**: @thockin this is a first pass to make the error messages clearer about the fact that DNS specs are not to _blame_.
2017-01-14 02:07:30 -08:00
Kubernetes Submit Queue
6261c1b3d6 Merge pull request #39105 from spxtr/morebazel
Automatic merge from submit-queue (batch tested with PRs 39609, 39105)

Stop running most unit tests outside of bazel.

Lets not duplicate our efforts. The two I still run here are the two we currently skip in bazel. We should fix those.
2017-01-13 21:20:33 -08:00
Kubernetes Submit Queue
d416e60538 Merge pull request #39609 from jsafrane/remove-test-sleep
Automatic merge from submit-queue

Remove sleep from DynamicProvisioner test.

The comment says that the sleep is there because of 10 minute PV controller
sync. The controller sync is now 15 seconds and it should be quick enough
to hide this in subsequent `WaitForPersistentVolumeDeleted(.. , 20*time.Minute)`
2017-01-13 21:04:51 -08:00
Kubernetes Submit Queue
4d388020d2 Merge pull request #39895 from ncdc/fix-allow-missing-template-keys-test
Automatic merge from submit-queue (batch tested with PRs 38427, 39896, 39889, 39871, 39895)

Fix expected error text

I had initially coded the expected text to match what was coming out of stderr, which was wrong. This makes it match against what comes from stdout.
2017-01-13 20:21:41 -08:00
Kubernetes Submit Queue
887144c681 Merge pull request #39871 from liggitt/bash-vars
Automatic merge from submit-queue (batch tested with PRs 38427, 39896, 39889, 39871, 39895)

Conditionally write token file entries

Fixes #39863

We have a bigger problem with not knowing what is calling these functions, but this will at least tolerate callers that are not setting the envvars we expect
2017-01-13 20:21:40 -08:00