Commit Graph

727 Commits (08bd9c773fad264b0bacc9bf85102a6bffac5272)

Author SHA1 Message Date
Kubernetes Submit Queue 4653a9b280 Merge pull request #41543 from dshulyak/decouple_remotecommand
Automatic merge from submit-queue (batch tested with PRs 44406, 41543, 44071, 44374, 44299)

Decouple remotecommand

Refactored unversioned/remotecommand to decouple it from undesirable dependencies:

- term package now is not required, and functionality required to resize terminal size can be plugged in directly in kubectl
- in order to remove dependency on kubelet package - constants from kubelet/server/remotecommand were moved to separate util package (pkg/util/remotecommand)
- remotecommand_test.go moved to pkg/client/tests module
2017-04-13 19:52:05 -07:00
Kubernetes Submit Queue b7ed2d1149 Merge pull request #43199 from jorenhehe/labels-typos
Automatic merge from submit-queue

fix typos

**Release note**:

```release-note
NONE
```
2017-04-13 18:13:39 -07:00
Kubernetes Submit Queue 1dcb288108 Merge pull request #41779 from StudyNick/zte-20170221
Automatic merge from submit-queue (batch tested with PRs 44447, 44456, 43277, 41779, 43942)

'workqueue' modify 'work queue'
2017-04-13 15:02:00 -07:00
Dmitry Shulyak f50480c714 Decouple remotecommand client from term/kubelet dependencies
In order to move client/unversioned/remotecommand to client-go as a followup
for this change we have to decouple it from tons of dependencies
2017-04-13 15:56:40 +03:00
Kubernetes Submit Queue a9019fe14a Merge pull request #44399 from deads2k/server-19-deregister
Automatic merge from submit-queue

add deregistration for paths

Aggregation and TPRs require the ability to de-register endpoints.  This adds the capability and makes it threadsafe.
2017-04-13 05:12:35 -07:00
Kubernetes Submit Queue 868eb745ab Merge pull request #42663 from soltysh/37166_followup
Automatic merge from submit-queue

Add default information to CronJobSpec

This is requested followup to https://github.com/kubernetes/kubernetes/pull/41890

@smarterclayton @janetkuo ptal
2017-04-13 03:23:26 -07:00
deads2k cd950364e5 add deregistration for paths 2017-04-12 16:21:08 -04:00
Kubernetes Submit Queue 5ba21e83b9 Merge pull request #43085 from sttts/sttts-duplicated-meta-conversions
Automatic merge from submit-queue

apimachinery/pkg/apis/meta: remove duplicated conversions
2017-04-12 07:01:09 -07:00
Kubernetes Submit Queue 949440b43a Merge pull request #43698 from sttts/sttts-non-global-admission-plugin-registry
Automatic merge from submit-queue

Non global admission plugin registry

For testing the global state is a problem. This PR turns the actual registry into a struct that must be instantiated. For the beginning, we do this in `pkg/kubeapiserver/admission`. In some follow-up (where we hunt down all globals some day), we will move this into the genericapiserver.
2017-04-12 04:12:11 -07:00
Kubernetes Submit Queue 9db7953c24 Merge pull request #44138 from sttts/sttts-cleanup-godeps-json-updater
Automatic merge from submit-queue

Clean up staging/godeps-json-updater.go
2017-04-12 03:02:42 -07:00
Kubernetes Submit Queue d70b55ead5 Merge pull request #42466 from sttts/sttts-client-go-plugin-import-verify
Automatic merge from submit-queue

hack/verify-staging-imports.sh: check that plugins are not imported b…
2017-04-12 03:02:35 -07:00
Kubernetes Submit Queue 1ba9202cd8 Merge pull request #42781 from spzala/conversionlint
Automatic merge from submit-queue

Conversionlint

**What this PR does / why we need it**:
This PR adds a comment placeholder for the exported or public functions in conversion generator files. Such functions without a comment results into golint failure in various generated files. The changes in this patch takes care of about 36 related lint failures. 
Given below is an example lint error, 
zz_generated.conversion.go:91:1: exported function Convert_v1alpha1_Binding_To_servicecatalog_Binding should have comment or be unexported

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

**Special notes for your reviewer**:
Hello, I am trying to fix golint failures as we see them in the kubernetes-incubator/service-catalog project. I have separate PRs opened for lint issues related to other generator code which are in separate libraries like gengo. Thanks! 

**Release note**:

```release-note
```
2017-04-12 03:02:26 -07:00
Dr. Stefan Schimanski 63f547e1b1 pkg/admission: make plugin registry non-global 2017-04-12 11:37:25 +02:00
Kubernetes Submit Queue bd3146a2a4 Merge pull request #44357 from deads2k/agg-29-up
Automatic merge from submit-queue

delete rolebinding from correct namespace

Fixes #44212

The rolebinding needs to be deleted from the namespace we create it in.

@mdshuai
2017-04-12 01:31:36 -07:00
Kubernetes Submit Queue abd92fab1e Merge pull request #44296 from caesarxuchao/move-api-helpers.go
Automatic merge from submit-queue

Move api helpers.go to a subpackage

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

This PR moves the pkg/api/helpers.go to its own subpackage. It's mostly a mechanic move, except that
* I removed ConversionError in helpers.go, it's not used by anyone
* I moved the 3 methods of Taint and Toleration to pkg/api/methods.go, and left a TODO saying refactoring these methods to functions.

I'll send a few more PRs to make the k8s.io/kubernetes/pkg/api package only contains the code we want in the k8s.io/api repo, then we can run a [script](a0015fd1be (diff-7a2fbb4371972350ee414c6b88aee1c8)) to cut the new repo.
2017-04-11 23:46:04 -07:00
Kubernetes Submit Queue 23b666894d Merge pull request #44368 from mbohlool/bugfix
Automatic merge from submit-queue

Bugfix: OpenAPI generator should pass generate type extensions

OpenAPI spec generator does not pass generated type extensions (using `x-kubernetes-` tags on types). This is already working for field extensions but not for types.
2017-04-11 21:23:26 -07:00
Kubernetes Submit Queue e60cc6ee3d Merge pull request #44090 from NickrenREN/remove-alpha-pv
Automatic merge from submit-queue

Remove alphaProvisioner in PVController and AlphaStorageClassAnnotation

remove alpha annotation and alphaProvisioner 

**Release note**:

```release-note
NONE
```
2017-04-11 20:41:40 -07:00
Chao Xu 08aa712a6c move helpers.go to helper 2017-04-11 15:49:11 -07:00
mbohlool ab5bcf6d2d Bugfix: OpenAPI generator should pass generate type extensions 2017-04-11 15:32:19 -07:00
Kubernetes Submit Queue c17f0f60f9 Merge pull request #41427 from timothysc/etcd_3_1_godep
Automatic merge from submit-queue (batch tested with PRs 43304, 41427, 43490, 44352)

Update etcd-client godep to 3.1.5

This transitively level sets the godeps to yank in the 3.1.5 client.  

Currently WIP, b/c it required some regen and I had some weird local permissions issue. 

xref: #41143

/cc @xiang90 @mml
2017-04-11 13:46:15 -07:00
Sahdev P. Zala 08639023d0 Conversion generated code changes for golint fix
The exported or public functions requires a doc comment to pass golint.
This commit has changes of conversion generated code. The actual doc
changes are added into a separate commit for a clean review.
2017-04-11 15:34:51 -04:00
deads2k f80adb10dc delete rolebinding from correct namespace 2017-04-11 15:30:30 -04:00
Kubernetes Submit Queue f1b9c17cef Merge pull request #44221 from ncdc/fix-validateClusterInfo-empty-cluster-check
Automatic merge from submit-queue (batch tested with PRs 43545, 44293, 44221, 43888)

validateClusterInfo: use clientcmdapi.NewCluster()

Change validateClusterInfo to use clientcmdapi.NewCluster() instead of
clientcmdapi.Cluster{} when comparing against the passed in clusterInfo.
clusterInfo most likely will be a combination of
clientcmdapi.NewCluster() merged with potential overrides. This is
necessary because otherwise, the DeepEqual between what is supposed to
be an empty Cluster and clusterInfo will fail, resulting in an error
that doesn't allow fall-through to checking for in-cluster
configuration.

https://github.com/kubernetes/kubernetes/pull/40508 changed `DirectClientConfig.getContext()` to start with a `clientcmdapi.NewCluster()` instead of the zero value for `clientcmdapi.Cluster`. This means that the `Extensions` map in the `Cluster` is initialized instead of `nil`, which breaks the `DeepEqual` test unless you compare `clusterInfo` against an initialized `clientcmdapi.NewCluster()`.

cc @smarterclayton @sttts @vjsamuel @liggitt @deads2k @soltysh @fabianofranz @kubernetes/sig-api-machinery-pr-reviews
2017-04-11 12:18:22 -07:00
Kubernetes Submit Queue 867159416f Merge pull request #44293 from deads2k/api-08-unstructureditems
Automatic merge from submit-queue (batch tested with PRs 43545, 44293, 44221, 43888)

make unstructured items correspond to other items for storage

"normal" `Items` elements include the struct itself, not a pointer to the struct.  Some of the deeper bits of storage rely on this behavior in reflective paths.

This updates the `UnstructuredList` to be "normal".

@kubernetes/sig-api-machinery-pr-reviews
2017-04-11 12:18:20 -07:00
Kubernetes Submit Queue 60310ce0f7 Merge pull request #42860 from jcbsmpsn/change-pem-type-to-constant
Automatic merge from submit-queue

Change the PEM block type to use the constant
2017-04-11 11:24:27 -07:00
Kubernetes Submit Queue 673ca98fd5 Merge pull request #44294 from deads2k/server-16-gorestful
Automatic merge from submit-queue

remove dependency on gorestful for rest handling

There's no reason for us to rely upon go-restful for our REST handling.  This separates the layers so that gorestful route functions are built on top of native `http.HandlerFuncs`.

@DirectXMan12 I think this is the sort of handling you wanted to be able to add and remove at will, right?  I have other commits that demonstrate how to wire these into "normal" `http.Handlers` if its useful to you.

@kubernetes/sig-api-machinery-pr-reviews @smarterclayton @sttts @lavalamp
2017-04-11 09:50:27 -07:00
Kubernetes Submit Queue 6d8aa2b15f Merge pull request #44021 from CaoShuFeng/kube-aggregator/apis
Automatic merge from submit-queue

add "/apis/" to kube-aggregator apisHandler

This makes the following two urls have the same result.
https://ip:443/apis
https://ip:443/apis/
**Release note**:

```NONE
```
2017-04-11 09:02:22 -07:00
Timothy St. Clair fc04bba10e Update staging files 2017-04-11 10:18:46 -05:00
deads2k c5e2f7c229 remove dependency on gorestful for rest handling 2017-04-11 09:57:19 -04:00
Timothy St. Clair 818dd4443d Update generated due to proto-shift 2017-04-11 08:48:59 -05:00
Timothy St. Clair 93c051e28f Level sets dependency graph to consume etcd 3.1.5 2017-04-11 08:34:40 -05:00
deads2k 706823aaa8 make unstructured items correspond to other items for storage 2017-04-11 08:44:16 -04:00
Kubernetes Submit Queue 859b97b551 Merge pull request #44170 from danwinship/networkpolicy-docs
Automatic merge from submit-queue (batch tested with PRs 43887, 41914, 44170)

Make NetworkPolicy docs reflect reality

spinoff of #39164; this just updates the docs to reflect the way the v1beta1 API has actually been implemented

**Release note**:
```release-note
NONE
```
2017-04-10 19:46:16 -07:00
Kubernetes Submit Queue d4eaf0b680 Merge pull request #44281 from deads2k/server-15-objectmetafor
Automatic merge from submit-queue (batch tested with PRs 43273, 44287, 44281)

Remove ObjectMetaFor

Builds on https://github.com/kubernetes/kubernetes/pull/43767

The second commit removes `ObjectMetaFor`.  This was debt we left around after we created the interfaces.  Fixing this makes it possible to start running `Unstructured` through generic storage.

@kubernetes/sig-api-machinery-pr-reviews @smarterclayton @lavalamp
2017-04-10 16:19:14 -07:00
Kubernetes Submit Queue b9a5a5c9b3 Merge pull request #42748 from dcbw/cfssl-localup
Automatic merge from submit-queue (batch tested with PRs 43866, 42748)

hack/cluster: download cfssl if not present

hack/local-up-cluster.sh uses cfssl to generate certificates and
will exit it cfssl is not already installed.  But other cluster-up
mechanisms (GCE) that generate certs just download cfssl if not
present.  Make local-up-cluster.sh do that too so users don't have
to bother installing it from somewhere.
2017-04-10 14:27:11 -07:00
deads2k 04460c8750 remove objectmetafor 2017-04-10 15:13:35 -04:00
Kubernetes Submit Queue f5052024ba Merge pull request #43767 from deads2k/server-13-namer
Automatic merge from submit-queue

remove go-restful from namer for rest handling

Our RESTHandler code is currently tightly coupled to go-restful, but there's no reason for this coupling.  It makes integrations that want API handling (decode, sanity check, admission, verb handling), but don't need the REST installer flow impractical.  I know of two layers now: metrics and TPR.

This starts the process of unwinding by switching the `ScopeNamer` (used for request identification and selflinks) to use the standard http library along with the `RequestInfo` we place in the context for authorization and any other interested layer.

@kubernetes/sig-api-machinery-misc @smarterclayton @ncdc @sttts
2017-04-10 12:06:08 -07:00
Kubernetes Submit Queue 4ee4df9602 Merge pull request #41758 from abdasgupta/go18-resolve
Automatic merge from submit-queue (batch tested with PRs 41758, 44137)

Updated key.pm and cert.pm to remove error in setting up localhostCert pool.

Signed-off-by: Abhishek Dasgupta <a10gupta@linux.vnet.ibm.com>

Errors like following are coming while running `make test` with Go1.8:
```
=== RUN   TestProxyUpgrade
2017/02/16 06:36:19 http: TLS handshake error from 127.0.0.1:36740: tls: no cipher suite supported by both client and server
2017/02/16 06:36:19 http: panic serving 127.0.0.1:46266: runtime error: invalid memory address or nil pointer dereference
goroutine 31 [running]:
net/http.(*conn).serve.func1(0xc420213ea0)
	/usr/local/go/src/net/http/server.go:1721 +0xb0
panic(0x703e00, 0xc05b00)
	/usr/local/go/src/runtime/panic.go:489 +0x284
k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/registry/generic/rest.(*UpgradeAwareProxyHandler).tryUpgrade(0xc42034b0e0, 0xbbba60, 0xc4203f81c0, 0xc42043b300, 0xc4200a1b00)
	/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/registry/generic/rest/proxy.go:155 +0x4d8
k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/registry/generic/rest.(*UpgradeAwareProxyHandler).ServeHTTP(0xc42034b0e0, 0xbbba60, 0xc4203f81c0, 0xc42043b300)
	/root/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/registry/generic/rest/proxy.go:86 +0x7c
net/http.serverHandler.ServeHTTP(0xc4203ac370, 0xbbba60, 0xc4203f81c0, 0xc42043b300)
	/usr/local/go/src/net/http/server.go:2568 +0x90
net/http.(*conn).serve(0xc420213ea0, 0xbbc9a0, 0xc4202e9ec0)
	/usr/local/go/src/net/http/server.go:1825 +0x514
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2668 +0x254
--- FAIL: TestProxyUpgrade (0.01s)
	proxy_test.go:347: error setting up localhostCert pool
	proxy_test.go:377: https (valid hostname): proxy_test: x509: RSA key missing NULL parameters
	proxy_test.go:441: https (valid hostname + RootCAs): websocket dial err: websocket.Dial ws://127.0.0.1:45249/some/path: unexpected EOF
```

This PR is resolving similar errors through updating Certificate and Key variables.
2017-04-10 10:06:13 -07:00
Kubernetes Submit Queue a9b0aaa66e Merge pull request #43377 from deads2k/server-09-logging
Automatic merge from submit-queue

only log stacks on server errors

Stack traces on http logging statements can be useful, but you  usually only need them for server errors not for things like redirects or even client errors since the server won't be fixing those.

This tightens the "log stack" behavior to only happen for server errors.  Messages will still be logged, but the automatic stacks will only come out for server errors.

@enj @mfojtik @smarterclayton
@kubernetes/sig-api-machinery-misc
2017-04-10 07:53:09 -07:00
deads2k da27957390 remove go-restful from namer for rest handling 2017-04-10 09:21:23 -04:00
Dan Winship 11471e965d Regenerate files 2017-04-10 09:00:48 -04:00
Kubernetes Submit Queue a177c8e8b1 Merge pull request #43943 from knightXun/patch-2
Automatic merge from submit-queue

Update meta.go

i think that's better,just a advise.less code sounds good.
2017-04-10 05:58:11 -07:00
Maciej Szulik ce013adfbb Staging client changes for defaults updates 2017-04-10 14:02:16 +02:00
deads2k b73cddb227 only log stacks on server errors 2017-04-10 07:57:43 -04:00
Abhishek Dasgupta 0d42da1b93 Updated key.pm and cert.pm to remove error in setting up localhostCert pool.
Signed-off-by: Abhishek Dasgupta <a10gupta@linux.vnet.ibm.com>
2017-04-10 17:10:55 +05:30
NickrenREN fa7bd44966 Remove alphaProvisioner in PVController and AlphaStorageClassAnnotation 2017-04-10 17:09:40 +08:00
Cao Shufeng f85899a975 Use const value for legacyAPIServiceName 2017-04-10 04:47:33 -04:00
Kubernetes Submit Queue 6d7e6c74c9 Merge pull request #43375 from CaoShuFeng/forbiddenMessage
Automatic merge from submit-queue

Fix empty RBAC Forbidden message

Fix empty RBAC Forbidden message when accessing cluster scope resources.
**Release note**:

```NONE
```
2017-04-08 09:02:19 -07:00
Kubernetes Submit Queue d043e20feb Merge pull request #44121 from mbohlool/patch
Automatic merge from submit-queue (batch tested with PRs 43777, 44121)

Add patchMergeKey and patchStrategy  support to OpenAPI

Support generating Open API extensions for strategic merge patch tags in go struct tags
Support `patchStrategy` and `patchMergeKey`.
Also support checking if the Open API extension and struct tags match.

```release-note
Support generating Open API extensions for strategic merge patch tags in go struct tags
```

cc: @pwittrock @ymqytw 

(Description mostly copied from #43833)
2017-04-07 20:01:10 -07:00
Kubernetes Submit Queue d8fbff35cd Merge pull request #44223 from caesarxuchao/gather-constants
Automatic merge from submit-queue

move constants to their own file

A step towards #44065

These constants are part of the API and will be moved to k8s.io/api. The helper functions are not and will remain in the main repo. This PR separates them to different files. Next step is put all the helper functions into sub-packages, so that the package `k8s.io/kubernetes/pkg/api` only contains code we want to move to k8s.io/api.

I added the retest-not-required label because this just moves code to another file in the same package.
2017-04-07 18:28:20 -07:00