Commit Graph

860 Commits (bafabcbb44365e672b004e1a01e5be767c274cb0)

Author SHA1 Message Date
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
Jesse Haka 3066783403 update staging godeps 2017-04-08 14:11:32 +03: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
Kubernetes Submit Queue c8f90171e4 Merge pull request #39678 from resouer/extract-resource
Automatic merge from submit-queue (batch tested with PRs 41775, 39678, 42629, 42524, 43028)

Extract resources functions belongs to api/util

Address: extract kubelet resources functions belongs to `pkg/api/v1/resource_helpers.go`
2017-04-07 17:44:14 -07:00
Kubernetes Submit Queue 7d4fe5f3cd Merge pull request #41775 from CaoShuFeng/username_password_401_403
Automatic merge from submit-queue

Ensure invalid username/password returns 401 error, not 403

If a user attempts to use basic auth, and the username/password combination
is rejected, the authenticator should return an error. This distinguishes
requests that did not provide username/passwrod (and are unauthenticated
without error) from ones that attempted to, and failed.

Related to:
https://github.com/kubernetes/kubernetes/pull/39408
2017-04-07 17:35:42 -07:00
Chao Xu 2e44bb1c3b separate constants to their own file 2017-04-07 17:31:45 -07:00
ymqytw 5f60dcd90b autogen 2017-04-07 15:44:33 -07:00
ymqytw 1804e5e548 add patch comment tags in open api 2017-04-07 15:44:32 -07:00
Kubernetes Submit Queue 98a4c6ba7f Merge pull request #43396 from rootfs/iscsi-chap
Automatic merge from submit-queue (batch tested with PRs 44119, 42538, 43802, 42336, 43396)

iSCSI CHAP support

**What this PR does / why we need it**:
To support CHAP authentication in a multi-tenant setup
**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
Support iSCSI CHAP authentication
```
2017-04-07 14:09:42 -07:00
Kubernetes Submit Queue 51301d83d1 Merge pull request #43802 from deads2k/api-07-listfor
Automatic merge from submit-queue (batch tested with PRs 44119, 42538, 43802, 42336, 43396)

remove ListMetaFor

Finish replacing `ListMetaFor` with `ListAccessor`.  This gives more flexibility for list handling as intended.  `UnstructuredList` matches now.

@kubernetes/sig-api-machinery-pr-reviews
2017-04-07 14:09:38 -07:00
Andy Goldstein 266ba9ffde 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.
2017-04-07 16:50:03 -04:00
Jacob Simpson 515987db3f Change the PEM block type to use the constant 2017-04-07 10:24:53 -07:00
Kubernetes Submit Queue 9095c78f14 Merge pull request #43373 from supereagle/fix-typos
Automatic merge from submit-queue (batch tested with PRs 43373, 41780, 44141, 43914, 44180)

fix some typos in apiserver

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

**Which issue this PR fixes**: 

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-04-07 09:57:35 -07:00
xiangpengzhao 420caf200c
Delete "hard-coded" default value in flags usage. 2017-04-07 11:21:37 +08:00
supereagle e35b7d1082 fix some typos in apiserver 2017-04-07 09:49:55 +08:00
Jordan Liggitt c415e4aeab
Fix original object mutation on patch retry 2017-04-06 12:30:43 -04:00
Dr. Stefan Schimanski 6e026b4d43 Clean up staging/godeps-json-updater.go 2017-04-06 09:32:57 +02:00
Cao Shufeng 30844541d5 Fix empty RBAC Forbidden message 2017-04-06 01:00:40 -04:00
Kubernetes Submit Queue e3e44b77ff Merge pull request #42964 from k82cn/update_defalt_toleration_sec
Automatic merge from submit-queue (batch tested with PRs 44084, 42964)

Updated AddOrUpdateTolerationInPod to return bool only.

Updated AddOrUpdateTolerationInPod to return bool only, as there's no case to generate error (the error was used for annotation, it'll not return error after moving to field); and also update admission & daemonset accordingly.
2017-04-05 20:45:20 -07:00
Kubernetes Submit Queue f797abc28d Merge pull request #43880 from ymqytw/refactor_SMP
Automatic merge from submit-queue (batch tested with PRs 44097, 42772, 43880, 44031, 44066)

Refactor Strategic Merge Patch

Refactor Strategic Merge Patch

```release-note
None
```
2017-04-05 16:41:22 -07:00
Kubernetes Submit Queue e900f7baec Merge pull request #41974 from fate-grand-order/patch-2
Automatic merge from submit-queue

fix misspell "underlying" in request.go
2017-04-05 15:38:49 -07:00
Mikkel Oscar Lyderik Larsen b5ce698a68 Update elazarl/goproxy 2017-04-05 23:33:21 +02:00
ymqytw 325f506c5c refactor Strategic Merge Patch 2017-04-05 10:27:11 -07:00
Huamin Chen 777eb32e91 generated files
Signed-off-by: Huamin Chen <hchen@redhat.com>
2017-04-05 12:46:42 +00:00
Slava Semushin 95049b6440 Minor cleanups.
- ValidateNoNewFinalizers: remove unused const
- Mention that mutation of spec.initContainers[*].image field is allowed
- Improve godoc comments
- validation_test.go(expectPrefix): remove unused function
2017-04-05 09:49:35 +02:00
Kubernetes Submit Queue d6cde8c4ce Merge pull request #42288 from chupman/comment-fix
Automatic merge from submit-queue (batch tested with PRs 42288, 44055)

Fixed inaccurate comments for Secret and ConfigMap

**What this PR does / why we need it**:
Updates the comments for ConfigMap and Secret in types.go to correspond to the regex used in validation.go
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Fixes #42203
**Special notes for your reviewer**:

**Release note**:

```release-note 
None
```
2017-04-04 17:39:18 -07:00
Chris Hupman dc4b8e3496 Fixed inaccurate comments for Secret and ConfigMap
Fixes #42203

ran documentation update scripts in hack folder

Signed-off-by: Chris Hupman <chupman@us.ibm.com>
2017-04-04 19:42:08 +00:00
Davanum Srinivas 29e4031f61 Update boltdb dependency to fix golang 1.7 intermittent failures
We have a old boltdb/bolt, etcd has moved to newer boltdb, so we should
do the same. Specifically this change needs to be in our tree:
92410e0673

as this fixes intermittent issues we see in our CI runs. So in this
PR, we vendor the v1.3.0 version of boltdb/bolt.

Fixes #43973
2017-04-04 10:48:19 -04:00
Cao Shufeng ab70e5f58c add "/apis/" to kube-aggregator apisHandler
This makes the following two urls have the same result.
https://<ip>:443/apis
https://<ip>:443/apis/
2017-04-04 02:37:44 -04:00
Dan Williams f20437a822 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.
2017-04-03 23:31:16 -05:00
Kubernetes Submit Queue e28cb42706 Merge pull request #42717 from andrewsykim/support-host-ip-downward-api
Automatic merge from submit-queue

Support status.hostIP in downward API

**What this PR does / why we need it**:
Exposes pod's hostIP (node IP) via downward API. 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
fixes https://github.com/kubernetes/kubernetes/issues/24657

**Special notes for your reviewer**:
Not sure if there's more documentation that's needed, please point me in the right direction and I will add some :)
2017-04-03 15:48:12 -07:00
Harry Zhang 74a99e1e1d Update generate staging client-go 2017-04-03 06:57:57 +00:00
Kubernetes Submit Queue 81545c2922 Merge pull request #42016 from MHBauer/fix-copypasta
Automatic merge from submit-queue

Update godoc to match

**What this PR does / why we need it**:
comments don't match the code. I can also just remove them.

**Which issue this PR fixes**
golint if it was run, but it is nice to have comments that appear to be relevant to the code.


**Special notes for your reviewer**:
docs only

**Release note**:

```release-note
NONE
```
2017-04-02 18:08:33 -07:00
knightXun ff68ba789e Update meta.go
i think that's better,just a advise
2017-04-01 17:25:48 +08:00
Kubernetes Submit Queue 10e9ef7189 Merge pull request #43817 from spxtr/owners
Automatic merge from submit-queue

Update my OWNERS entries.

Not sure why I was set as a reviewer for apimachinery and apiserver stuff. Adding myself to build/.
**Release note**:
```release-note
NONE
```
2017-03-31 11:29:29 -07:00
Kubernetes Submit Queue 91c03b0e8f Merge pull request #43813 from liggitt/conditional-post-start-hook
Automatic merge from submit-queue

Make RBAC post-start hook conditional on RBAC authorizer being used

Makes the RBAC post-start hook (and reconciliation) conditional on the RBAC authorizer being used

Ensures we don't set up unnecessary objects.

```release-note
RBAC role and rolebinding auto-reconciliation is now performed only when the RBAC authorization mode is enabled.
```
2017-03-31 05:51:49 -07:00
Kubernetes Submit Queue cf7a4f8f51 Merge pull request #43853 from YuPengZTE/devCertfile
Automatic merge from submit-queue (batch tested with PRs 42360, 43109, 43737, 43853)

Fix typo

Signed-off-by: yupengzte <yu.peng36@zte.com.cn>



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

**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-03-31 00:34:29 -07:00
Kubernetes Submit Queue dbca1f75f7 Merge pull request #43737 from CaoShuFeng/store_test
Automatic merge from submit-queue (batch tested with PRs 42360, 43109, 43737, 43853)

delete etcd socket file for unit tests

This change clean up the environment for etcd3 unit test.
Without this change, "make test" will leave some socket files in
workspace. And these socket files make hack/verify-generated-protobuf.sh
fails.

**Release note**:

```NONE
```
2017-03-31 00:34:26 -07:00
Jordan Liggitt 2c89ff59e2
Allow disabling specific post-start hooks 2017-03-30 21:40:07 -04:00
yupengzte bb656f97f1 Fix typo
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-03-30 19:09:26 +08:00
Kubernetes Submit Queue bf4b04b192 Merge pull request #42337 from liggitt/tls-config
Automatic merge from submit-queue (batch tested with PRs 38741, 41301, 43645, 43779, 42337)

Plumb cipher/tls version serving options

Needed to allow servers to harden or relax default tls versions and ciphers
2017-03-29 14:53:38 -07:00
Joe Finney 896db18f28 Update my OWNERS entries. 2017-03-29 10:13:21 -07:00
deads2k 7df37c484d remove ListMetaFor 2017-03-29 08:09:49 -04:00
andrewsykim f05d584a4a Regenerate code for api change 2017-03-28 20:20:20 -04:00
Christoph Blecker 6681835b0c
Fix gofmt errors 2017-03-28 17:12:04 -07:00
Kubernetes Submit Queue 9efb1f34e8 Merge pull request #43623 from liggitt/discovery-order
Automatic merge from submit-queue (batch tested with PRs 40885, 43623, 43735)

Update godoc for discovery registration

Follow up from https://github.com/kubernetes/kubernetes/pull/43553/files?diff=split#r107723539
2017-03-28 11:16:22 -07:00
Jordan Liggitt e156aca4f2
Plumb cipher/tls version serving options 2017-03-28 10:35:43 -04:00
Jordan Liggitt 85b23bb98a
Update godoc for discovery registration 2017-03-28 10:23:35 -04:00
Cao Shufeng 4e9dcf3da5 delete etcd socket file for unit tests
This change clean up the environment for etcd3 unit test.
Without this change, "make test" will leave some socket files in
workspace. And these socket files make hack/verify-generated-protobuf.sh
fails.
2017-03-28 05:36:33 -04:00
p0lyn0mial 86e06e2401 Admission plugin initializer for the generic API server.
This PR implements a standard admission plugin initializer for the generic API server.
The initializer accepts external clientset, external informers and the authorizer.
2017-03-28 08:13:09 +02:00
Kubernetes Submit Queue 4159cb57b6 Merge pull request #42835 from deads2k/server-01-remove-insecure
Automatic merge from submit-queue (batch tested with PRs 42835, 42974)

remove legacy insecure port options from genericapiserver

The insecure port has been a source of problems and it will prevent proper aggregation into a cluster, so the genericapiserver has no need for it.  In addition, there's no reason for it to be in the main kube-apiserver flow either.  This pull removes it from genericapiserver and removes it from the shared kube-apiserver code.  It's still wired up in the command, but its no longer possible for someone to mess up and start using in mainline code.

@kubernetes/sig-api-machinery-misc @ncdc
2017-03-27 17:00:21 -07:00
Kubernetes Submit Queue f14618a56b Merge pull request #43622 from deads2k/cli-10-category
Automatic merge from submit-queue (batch tested with PRs 42087, 43383, 43622)

move category expansion out of restmapper

RESTMapping isn't related to CategoryExpansion (the bit that expands "all" into items to be RESTMapped).  This provides that separation and simplifies the RESTMapper interface.

@kubernetes/sig-cli-pr-reviews
2017-03-27 16:08:20 -07:00
Kubernetes Submit Queue dfbbb115dd Merge pull request #43383 from deads2k/server-10-safe-proxy
Automatic merge from submit-queue

proxy to IP instead of name, but still use host verification

I think I found a setting that lets us proxy to an IP and still do hostname verification on the certificate.  

@liggitt @sttts  Can you see if you agree that this knob does what I think it does?  Last commit only, still needs tests.
2017-03-27 16:01:06 -07:00
Kubernetes Submit Queue 242882daf6 Merge pull request #43562 from sttts/sttts-MaxRetryWhenPatchConflicts
Automatic merge from submit-queue (batch tested with PRs 43681, 40423, 43562, 43008, 43381)

k8s.io/apiserver: make maxRetryWhenPatchConflicts public

This variable used to be public (before https://github.com/kubernetes/kubernetes/pull/37468). It is pretty use-full to write reliable integration tests that involve resource patching, and it is used in downstream project for that purpose.
2017-03-27 12:49:24 -07:00
deads2k cd29754680 move legacy insecure options out of the main flow 2017-03-27 14:07:54 -04:00
deads2k c2f8ef1b1a move insecure options to kubeapiserver 2017-03-27 13:55:45 -04:00
deads2k 8895f314b4 move category expansion out of restmapper 2017-03-27 13:54:05 -04:00
deads2k 3414231672 proxy to IP instead of name, but still use host verification 2017-03-27 12:33:03 -04:00
Kubernetes Submit Queue b705835bae Merge pull request #42911 from deads2k/server-04-combined
Automatic merge from submit-queue (batch tested with PRs 43694, 41262, 42911)

combine kube-apiserver and kube-aggregator

This combines several pulls currently in progress and wires them together.  The aggregator sits in front of the normal kube-apiserver and allows local fallthrough instead of proxying.

@kubernetes/sig-api-machinery-misc 
@DirectXMan12 since you seem invested, your life will get easier
@luxas FYI since you've started trying to wire something together.  



Dependent Pulls LGTM:
- [x] https://github.com/kubernetes/kubernetes/pull/42801
- [x] https://github.com/kubernetes/kubernetes/pull/42886
- [x] https://github.com/kubernetes/kubernetes/pull/42900
- [x] https://github.com/kubernetes/kubernetes/pull/42732
- [x] https://github.com/kubernetes/kubernetes/pull/42672
- [x] https://github.com/kubernetes/kubernetes/pull/43141
- [x] https://github.com/kubernetes/kubernetes/pull/43076
- [x] https://github.com/kubernetes/kubernetes/pull/43149
- [x] https://github.com/kubernetes/kubernetes/pull/43226
- [x] https://github.com/kubernetes/kubernetes/pull/43144
2017-03-27 09:30:24 -07:00
Kubernetes Submit Queue f60ac80ee4 Merge pull request #41262 from ncdc/bump-go-systemd
Automatic merge from submit-queue (batch tested with PRs 43694, 41262, 42911)

Bump go-systemd to v14

**What this PR does / why we need it**: bump go-systemd to the latest release, which includes a build tag fix so non-cgo systems can compile.

**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**: go-systemd added an option to unset the `NOTIFY_SOCKET` environment variable as part of the execution of `SdNotify`. I have set that to true, which means that child processes (if any) won't have that set. If anyone thinks it should remain set, I'm happy to change it to false - just let me know.

**Release note**:

```release-note
```

cc @smarterclayton @sdodson @deads2k @sttts @lavalamp @caesarxuchao
2017-03-27 09:30:22 -07:00
Kubernetes Submit Queue 870aee4087 Merge pull request #43308 from deads2k/generation-broke
Automatic merge from submit-queue (batch tested with PRs 42900, 43044, 42896, 43308, 43621)

enable generation

Looks like the deep equals and conversion generation were turned off for sample-apiserver and kube-aggregator.  This turns them back on.

@kubernetes/sig-api-machinery-misc
2017-03-27 08:32:29 -07:00
Kubernetes Submit Queue efa5322766 Merge pull request #42896 from deads2k/server-03-codec
Automatic merge from submit-queue (batch tested with PRs 42900, 43044, 42896, 43308, 43621)

require codecfactory

The genericapiserver requires a codec to start.  Help new comers to the API by forcing them to set it when they create a new config.
2017-03-27 08:32:27 -07:00
Kubernetes Submit Queue 1fa91fddc5 Merge pull request #42900 from deads2k/agg-26-fallthrough
Automatic merge from submit-queue

rewire aggregation handling chain to be normal

Uses https://github.com/kubernetes/kubernetes/pull/42886 to allow the aggregator to be "normal" as far as the handling chain goes.  This will allow for cleaner composition.

@kubernetes/sig-api-machinery-misc
2017-03-27 07:54:56 -07:00
deads2k 546b45c9c0 enable generation 2017-03-27 09:56:26 -04:00
deads2k 8e26fa25da wire in aggregation 2017-03-27 09:44:10 -04:00
Kubernetes Submit Queue 9a1648686c Merge pull request #43687 from piosz/remove-an
Automatic merge from submit-queue

Remove fluentd-ds-ready label

ref #42840
2017-03-27 06:18:45 -07:00
deads2k 087a030221 require codecfactory 2017-03-27 08:19:08 -04:00
deads2k b28966b48a rewire aggregation handling chain to be normal 2017-03-27 08:15:16 -04:00
deads2k f31eb0a77f force callers to specify the cert dns names 2017-03-27 07:49:01 -04:00
Piotr Szczesniak 37d2a457db Remove fluentd-ds-ready label 2017-03-27 10:15:26 +02:00
Kubernetes Submit Queue ff603cfc5e Merge pull request #43076 from deads2k/server-06-add-to-server
Automatic merge from submit-queue

allow combining API servers

Builds on https://github.com/kubernetes/kubernetes/pull/42886 (already lgtm'ed)

We need to be able to chain multiple API servers together so that a fallthrough case from to another results in delegated handling without double wrapping. We also need to be able to combine shared lists like healthz and poststarthooks so that a single API server start will run all the poststarthooks and present a unified view of health.  This creates an interface and methods to provide that wiring.

@kubernetes/sig-api-machinery-misc @ncdc
2017-03-26 17:38:32 -07:00
Kubernetes Submit Queue 484ac692f8 Merge pull request #43141 from deads2k/tpr-04-register
Automatic merge from submit-queue (batch tested with PRs 43429, 43416, 43312, 43141, 43421)

Create controller to auto register TPRs with the aggregator

Builds on https://github.com/kubernetes/kubernetes/pull/42732 (already lgtmed)

Creates a simple controller to wire TPRs with the API Service autoregistration controller.

@kubernetes/sig-api-machinery-misc @ncdc
2017-03-25 22:24:27 -07:00
Kubernetes Submit Queue bc0171c6ec Merge pull request #43312 from deads2k/cli-08-discovery
Automatic merge from submit-queue (batch tested with PRs 43429, 43416, 43312, 43141, 43421)

add singular resource names to discovery

Adds the singular resource name to our resource for discovery.  This is something we've discussed to remove our pseudo-pluralization library which is unreliable even for english and really has no hope of properly handling other languages or variations we can expect from TPRs and aggregated API servers.

This pull simply adds the information to discovery, it doesn't not re-wire any RESTMappers.

@kubernetes/sig-cli-misc  @kubernetes/sig-apimachinery-misc @kubernetes/api-review


```release-note
API resource discovery now includes the `singularName` used to refer to the resource.
```
2017-03-25 22:24:25 -07:00
Kubernetes Submit Queue 944131d880 Merge pull request #43416 from caesarxuchao/remove-timed-workqueue
Automatic merge from submit-queue (batch tested with PRs 43429, 43416, 43312, 43141, 43421)

remove timed_queue from workqueue

Fix https://github.com/kubernetes/kubernetes/issues/40494.

It's added to gather metrics of the workqueue used in the garbage collector. Now that a regular workqueue has supported the metrics, we can remove timed_queue.
2017-03-25 22:24:23 -07:00
Kubernetes Submit Queue f4d863a655 Merge pull request #43359 from smarterclayton/reuse_timer
Automatic merge from submit-queue

JitterUntil should reuse Timer instead of allocating
2017-03-25 19:57:38 -07:00
Kubernetes Submit Queue feffb89ee2 Merge pull request #43314 from deads2k/server-08-audit
Automatic merge from submit-queue (batch tested with PRs 43144, 42671, 43226, 43314, 43361)

use - to indicate audit log goes to system out

When debugging API servers, particularly aggregated API servers, it's really useful to see the audit trail in their normal pod logs.  This makes `--audit-log-path=-` direct audit information to stdout.

@kubernetes/sig-api-machinery-misc
2017-03-25 19:10:26 -07:00
Kubernetes Submit Queue 59728a09de Merge pull request #43144 from deads2k/server-06-informer-start
Automatic merge from submit-queue (batch tested with PRs 43144, 42671, 43226, 43314, 43361)

start informers as a post-start-hook

Switches the shared informer start to a post start hook to make future API server composition easier.  PostStartHooks will have to be unioned for server composition and this ensures that we don't accidentally skip starting them.
2017-03-25 19:10:22 -07:00
Kubernetes Submit Queue ce55522e41 Merge pull request #43039 from caesarxuchao/fix-fake-event-search
Automatic merge from submit-queue (batch tested with PRs 41297, 42638, 42666, 43039, 42567)

use metav1.ListOptions in fake_event_expansion.go

Fix https://github.com/kubernetes/client-go/issues/145.
2017-03-25 18:15:25 -07:00
Kubernetes Submit Queue f9e87e1dc2 Merge pull request #42902 from louyihua/allow-tcp-probe-host
Automatic merge from submit-queue (batch tested with PRs 42998, 42902, 42959, 43020, 42948)

Add Host field to TCPSocketAction

Currently, TCPSocketAction always uses Pod's IP in connection. But when a pod uses the host network, sometimes firewall rules may prevent kubelet from connecting through the Pod's IP.

This PR introduces the 'Host' field for TCPSocketAction, and if it is set to non-empty string, the probe will be performed on the configured host rather than the Pod's IP. This gives users an opportunity to explicitly specify 'localhost' as the target for the above situations.

```release-note
Add Host field to TCPSocketAction
```
2017-03-25 17:17:23 -07:00
Kubernetes Submit Queue 8aeb601266 Merge pull request #42886 from deads2k/server-02-fallthrough
Automatic merge from submit-queue

allow fallthrough handling from go-restful routes

This sets up the gorestful routes to fall through to a default handler and reorders the API to be ahead of the other endpoints.  This makes it possible to cleanly support cases of "match, fail, try this other handler" which we'll need for API server composition.

@kubernetes/sig-api-machinery-pr-reviews @ncdc
2017-03-25 15:56:05 -07:00
Kubernetes Submit Queue a9c8d97709 Merge pull request #42801 from deads2k/agg-25-local
Automatic merge from submit-queue

add local option to APIService

APIServices need an option to avoid proxying in cases where the groupversion is handled later in the chain.  This will allow a coherent and complete set of APIServices, but won't require extra connections.

@kubernetes/sig-api-machinery-misc @ncdc @cheftako
2017-03-25 15:12:19 -07:00
Kubernetes Submit Queue f11258ad81 Merge pull request #42672 from deads2k/agg-24-use-custom-scheme
Automatic merge from submit-queue (batch tested with PRs 42672, 42770, 42818, 42820, 40849)

use separate scheme to serve the kube-aggregator

This removes a hack which used the client scheme to serve the kube-aggregator.  This switches it to run from its own scheme.

@kubernetes/sig-api-machinery-pr-reviews 
@ncdc
2017-03-25 14:27:22 -07:00
Andy Goldstein 085db20a02 React to go-systemd changes 2017-03-24 13:59:41 -04:00
Andy Goldstein a6b06bcf5c bump(github.com/coreos/go-systemd): 48702e0da86bd25e76cfef347e2adeb434a0d0a6 2017-03-24 13:59:40 -04:00
Kubernetes Submit Queue 04b35a55df Merge pull request #43148 from justinsb/typo_newgroupmetadfactory
Automatic merge from submit-queue

Fix typo: NewGroupMetadFactory

NewGroupMetadFactory -> NewGroupMetaFactory

```release-note
NONE
```
2017-03-24 10:26:47 -07:00
Kubernetes Submit Queue ba63cb4538 Merge pull request #42903 from krousey/owners
Automatic merge from submit-queue

Remove krousey from some OWNERS files
2017-03-24 10:26:40 -07:00
Kubernetes Submit Queue dbf152acac Merge pull request #42032 from linyouchong/linyouchong-20170224
Automatic merge from submit-queue

update kubeconfig document url in comments

**What this PR does / why we need it**:
update kubeconfig document url in comments
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
NONE

**Special notes for your reviewer**:
NONE
**Release note**:
NONE
2017-03-24 10:24:57 -07:00
Jordan Liggitt 707f0fb131
Preserve API group order in discovery, prefer extensions over apps 2017-03-23 11:10:53 -04:00
Dr. Stefan Schimanski be6be1370b k8s.io/apiserver: make maxRetryWhenPatchConflicts public 2017-03-23 11:33:10 +01:00
Avesh Agarwal 0f65df66e6 Auto generated stuff. 2017-03-22 01:26:43 -04:00
deads2k b34f03e975 add controller to autoregister APIServices 2017-03-21 13:29:13 -04:00
deads2k bccef75d7a allow combining API servers 2017-03-21 13:22:41 -04:00
deads2k 02efeeaf40 allow fallthrough handling from go-restful routes 2017-03-21 13:19:28 -04:00
deads2k 36cb9ed640 add singular resource names to discovery 2017-03-21 11:04:08 -04:00
Cao Shufeng 267288249b Update basic audit filter's comment message 2017-03-21 05:42:30 -04:00
Jordan Liggitt 7ceeee8665
Update client-go 2017-03-20 23:57:38 -04:00
Jordan Liggitt 939ca532aa
generated files 2017-03-20 23:57:38 -04:00
Chao Xu 29432ce054 remove timed_queue, its functionality is supported by a regular queue now 2017-03-20 16:19:24 -07:00
Clayton Coleman 01a23fd0bc
JitterUntil should reuse Timer instead of allocating
Many of our core loops rotate around JitterUntil, which means we create
a lot of garbage at steady state for timers. Add proper timer reuse in
this loop.
2017-03-19 19:01:53 -04:00
Kubernetes Submit Queue 9497139cb6 Merge pull request #42828 from janetkuo/ds-types
Automatic merge from submit-queue

Update field descriptions of DaemonSet rolling udpate

@kargakis @lukaszo @kubernetes/sig-apps-bugs
2017-03-17 17:54:14 -07:00
Kubernetes Submit Queue eb43cd5eb3 Merge pull request #43271 from liggitt/affinity-namespace
Automatic merge from submit-queue (batch tested with PRs 43313, 43257, 43271, 43307)

Remove 'all namespaces' meaning of empty list in PodAffinityTerm

Removes the distinction between `null` and `[]` for the PodAffinityTerm#namespaces field (option 4 discussed in https://github.com/kubernetes/kubernetes/issues/43203#issuecomment-287237992), since we can't distinguish between them in protobuf (and it's a less than ideal API)

Leaves the door open to reintroducing "all namespaces" function via a dedicated field or a dedicated token in the list of namespaces

Wanted to get a PR open and tests green in case we went with this option.

Not sure what doc/release-note is needed if the "all namespaces" function is not present in 1.6
2017-03-17 15:12:33 -07:00
Janet Kuo 263d605112 Auto-generate 2017-03-17 14:42:37 -07:00
deads2k 91f461283e use - to indicate audit log goes to system out 2017-03-17 14:43:15 -04:00
Jordan Liggitt cc6bc17ab4
update client-go 2017-03-17 00:32:52 -04:00
Chao Xu 2378d39771 update-all.sh 2017-03-16 15:58:30 -07:00
Chao Xu 80686e67aa update comment on the default DeletionPropagationPolicy 2017-03-16 15:43:05 -07:00
deads2k 5b08029e79 start informers as a post-start-hook 2017-03-16 11:12:17 -04:00
jorenhehe 1d424cc55d fix typos 2017-03-16 14:08:47 +08:00
Kubernetes Submit Queue 2bec20ce55 Merge pull request #43122 from liggitt/protobuf-default
Automatic merge from submit-queue

Prevent protobuf storage with etcd2

Prevents accidentally storing protobuf content in etcd2 when upgrading to 1.6

c.f. https://github.com/kubernetes/kubernetes/issues/42976#issuecomment-286537139

```release-note
if kube-apiserver is started with `--storage-backend=etcd2`, the media type `application/json` is used.
```
2017-03-15 22:07:03 -07:00
Kubernetes Submit Queue 6d2defbc09 Merge pull request #42967 from cblecker/godep-version79
Automatic merge from submit-queue (batch tested with PRs 40964, 42967, 43091, 43115)

Update hack scripts to use godep v79 and ensure_godep_version

**What this PR does / why we need it**:
Based on #42965 and https://github.com/kubernetes/kubernetes/pull/42958#discussion_r105568318, this pins the godep version at v79, which should fix some issues when running godep in go1.8 local environments.

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

**Special notes for your reviewer**:
This should likely get the v1.6 milestone so that it can be merged into master. While I'm setting a default godep version, I'm continuing to use the local pins per this comment: https://github.com/kubernetes/kubernetes/pull/42965#issuecomment-285962723 .

**Release note**:

```release-note
NONE
```

cc: @sttts
2017-03-15 16:08:25 -07:00
Christoph Blecker d31a88fee7
Bump godep version to v79 2017-03-15 10:32:37 -07:00
Justin Santa Barbara f682aa1c91 Fix typo: NewGroupMetadFactory
NewGroupMetadFactory -> NewGroupMetaFactory
2017-03-15 11:33:50 -04:00
Jordan Liggitt 87e32c7532
Force etcd2 to use application/json, add base64-wrapper decoder as fallback 2017-03-15 11:24:12 -04:00
Mikkel Oscar Lyderik Larsen c02484d380 vendor: Update github.com/evanphx/json-patch
Updates github.com/evanphx/json-patch dependency to a version that
doesn't crash when handling an invalid json patch.

Includes fix from https://github.com/evanphx/json-patch/pull/35

Fix #40218
2017-03-14 15:56:55 -04:00
Chao Xu 68effc7b2d fix fake_event_expansion.go 2017-03-14 11:52:49 -07:00
Dr. Stefan Schimanski e310e0d059 apimachinery/pkg/apis/meta: remove duplicated conversions in v1 and internal 2017-03-14 17:54:23 +01:00
Lou Yihua 64f2b0c0fc Update generated & client-go 2017-03-14 23:49:21 +08:00
Kubernetes Submit Queue f5114ffa5a Merge pull request #42669 from curtisallen/update_dep_go-oidc
Automatic merge from submit-queue (batch tested with PRs 42802, 42927, 42669, 42988, 43012)

update to latest version of coreos/go-oidc

Includes updates that enable OIDC with OKTA as a IDP



**What this PR does / why we need it**:
Updates to the latest version of coreos/go-oidc

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

**Special notes for your reviewer**:
Updates coreos/go-oidc module to include fixes for https://github.com/coreos/go-oidc/issues/137 which prevent OKTA being used as an IDP
**Release note**:

```release-note
NONE
```

cc:/ @ericchiang
2017-03-14 07:31:34 -07:00
Klaus Ma 98a52fd6b5 generated client-go. 2017-03-13 22:40:56 +08:00
deads2k b27de102cb add local option to APIService 2017-03-13 10:10:50 -04:00
Dr. Stefan Schimanski 792d1f3dc0 hack/verify-staging-imports.sh: check that plugins are not imported by default 2017-03-12 19:51:31 +01:00
Kubernetes Submit Queue e315c388b2 Merge pull request #42944 from liggitt/patch-defaulting
Automatic merge from submit-queue

Ensure patched objects are defaulted correctly

Restores defaulting behavior for patch API calls removed in e34e1abe33 (diff-517d1b81963bbc7c9b0a16e6eb3c0e2f)

Restores the unit test that ensures we get a defaulted result after applying a patch

Fixes https://github.com/kubernetes/kubernetes/issues/42764
Fixes #42834
2017-03-11 17:49:41 -08:00
Kubernetes Submit Queue 8cb14a4f7f Merge pull request #42755 from aveshagarwal/master-fix-default-toleration-seconds
Automatic merge from submit-queue (batch tested with PRs 41794, 42349, 42755, 42901, 42933)

Fix DefaultTolerationSeconds admission plugin

DefaultTolerationSeconds is not working as expected. It is supposed to add default tolerations (for unreachable and notready conditions). but no pod was getting these toleration. And api server was throwing this error:

```
Mar 08 13:43:57 fedora25 hyperkube[32070]: E0308 13:43:57.769212   32070 admission.go:71] expected pod but got Pod
Mar 08 13:43:57 fedora25 hyperkube[32070]: E0308 13:43:57.789055   32070 admission.go:71] expected pod but got Pod
Mar 08 13:44:02 fedora25 hyperkube[32070]: E0308 13:44:02.006784   32070 admission.go:71] expected pod but got Pod
Mar 08 13:45:39 fedora25 hyperkube[32070]: E0308 13:45:39.754669   32070 admission.go:71] expected pod but got Pod
Mar 08 14:48:16 fedora25 hyperkube[32070]: E0308 14:48:16.673181   32070 admission.go:71] expected pod but got Pod
```

The reason for this error is that the input to admission plugins is internal api objects not versioned objects so expecting versioned object is incorrect. Due to this, no pod got desired tolerations and it always showed:

```
Tolerations: <none>
```

After this fix, the correct  tolerations are being assigned to pods as follows:

```
Tolerations:	node.alpha.kubernetes.io/notReady=:Exists:NoExecute for 300s
		node.alpha.kubernetes.io/unreachable=:Exists:NoExecute for 300s
```

@davidopp @kevin-wangzefeng @kubernetes/sig-scheduling-pr-reviews @kubernetes/sig-scheduling-bugs @derekwaynecarr 

Fixes https://github.com/kubernetes/kubernetes/issues/42716
2017-03-10 22:02:18 -08:00
Jordan Liggitt 464db160b4
Ensure patched objects are defaulted correctly 2017-03-10 22:07:10 -05:00
Kris ee4227f4bf Remove krousey from some OWNERS files 2017-03-10 11:12:29 -08:00
Curtis Allen 7d409b3731 bump(github.com/coreos/go-oidc): be73733bb8cc830d0205609b95d125215f8e9c70
Includes updates that enable OIDC with OKTA as a IDP
2017-03-10 10:53:07 -07:00
Avesh Agarwal f88c901518 Auto update of staging client. 2017-03-09 20:24:44 -05:00
deads2k 1dc8ae9b57 use separate scheme to serve the kube-aggregator 2017-03-09 10:45:02 -05:00
Kubernetes Submit Queue aad34ad26e Merge pull request #42553 from k82cn/autogen_proto
Automatic merge from submit-queue (batch tested with PRs 42786, 42553)

Updated auto generated protobuf codes.

Generated by `./hack/update-generated-protobuf-dockerized.sh` in Mac.
2017-03-09 07:37:36 -08:00
Kubernetes Submit Queue 1a3c3be58b Merge pull request #42786 from gyliu513/feature-gates
Automatic merge from submit-queue (batch tested with PRs 42786, 42553)

Updated comments for TaintBasedEvictions.

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

**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**:
2017-03-09 07:37:35 -08:00
Guangya Liu ed28695d3e Updated comments for TaintBasedEvictions. 2017-03-09 17:06:31 +08:00
Michael Fraenkel cadc8a141d Update docs and client 2017-03-09 07:34:56 +00:00
Maru Newby 6f70b977ff apiserver: Add non-blocking run method to simplify testing 2017-03-08 06:32:10 -08:00
Kubernetes Submit Queue d306acca86 Merge pull request #42175 from enisoc/controller-ref-dep
Automatic merge from submit-queue

Deployment: Fully Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings Deployment into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

This ensures that Deployment does not fight with other controllers over control of Pods and ReplicaSets.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Deployment now fully respects ControllerRef to avoid fighting over Pods and ReplicaSets. At the time of upgrade, **you must not have Deployments with selectors that overlap**, or else [ownership of ReplicaSets may change](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#upgrading).
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-03-07 20:44:36 -08:00
Kubernetes Submit Queue 5af81b0955 Merge pull request #42173 from enisoc/controller-ref-ds
Automatic merge from submit-queue (batch tested with PRs 42692, 42169, 42173)

DaemonSet: Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings DaemonSet into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

This ensures that DaemonSet does not fight with other controllers over control of Pods.

**Special notes for your reviewer**:

**Release note**:

```release-note
DaemonSet now respects ControllerRef to avoid fighting over Pods.
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-03-07 20:10:28 -08:00
Kubernetes Submit Queue 5bc7387b3c Merge pull request #42169 from ncdc/pprof-trace
Automatic merge from submit-queue (batch tested with PRs 42692, 42169, 42173)

Add pprof trace support

Add support for `/debug/pprof/trace`

Can wait for master to reopen for 1.7.

cc @smarterclayton @wojtek-t @gmarek @timothysc @jeremyeder @kubernetes/sig-scalability-pr-reviews
2017-03-07 20:10:26 -08:00
Anthony Yeh c288f52d2f DaemonSet: Update Lister documentation for ControllerRef.
The DaemonSet Listers still use selectors, because this is the
behavior expected by callers. This clarifies the meaning of the
returned list. Some callers may need to switch to using
GetControllerOf() instead, but that is a separate, case-by-case issue.
2017-03-07 16:42:29 -08:00
Kubernetes Submit Queue d64434c056 Merge pull request #42625 from caesarxuchao/add-notes-client-go-examples
Automatic merge from submit-queue

Adding note saying client-go examples only work with the code in the same branch

Adding this note because the problem has confused many users.

It's doc change and only affects client-go examples, so adding the milestone.
2017-03-07 13:04:48 -08:00
Kubernetes Submit Queue 7593a9f555 Merge pull request #42648 from sttts/sttts-multiple-feature-gate-calls
Automatic merge from submit-queue (batch tested with PRs 42637, 42648)

Support multiple --feature-gates flags in the command line

Fixes the issue in https://github.com/kubernetes/kubernetes/pull/42647.

Before this change the whole set of gates was replaced with new values. Now values are overridden one by one.
2017-03-07 12:14:18 -08:00
Dr. Stefan Schimanski faa5b44381 Support multiple --feature-gates flags in the command line 2017-03-07 17:55:46 +01:00
Kubernetes Submit Queue ed04316828 Merge pull request #41890 from soltysh/issue37166
Automatic merge from submit-queue (batch tested with PRs 41890, 42593, 42633, 42626, 42609)

Remove everything that is not new from batch/v2alpha1

Fixes #37166.

@lavalamp you've asked for it 
@erictune this is a prereq for moving CronJobs to beta. I initially planned to put all in one PR, but after I did that I figured out it'll be easier to review separately. ptal 

@kubernetes/api-approvers @kubernetes/sig-api-machinery-pr-reviews ptal
2017-03-07 08:10:38 -08:00
Andy Goldstein b011529d8a Add pprof trace support
Add pprof trace support and --enable-contention-profiling to those
components that don't already have it.
2017-03-07 10:10:42 -05:00
Chao Xu cecf0ca730 adding note 2017-03-06 22:34:12 -08:00
Kubernetes Submit Queue 8b10527bb1 Merge pull request #42506 from liggitt/etcd-prefix
Automatic merge from submit-queue (batch tested with PRs 42506, 42585, 42596, 42584)

Preserve custom etcd prefix compatibility for etcd3

Fixes #42505

```release-note
restored normalization of custom `--etcd-prefix` when `--storage-backend` is set to etcd3
```
2017-03-06 22:20:09 -08:00
Kubernetes Submit Queue 4c4c9e47f3 Merge pull request #42489 from ymqytw/switch_json
Automatic merge from submit-queue

switch to k8s json to avoid number decoding issue

Fixes #42488
Fixes #42282

> use "k8s.io/apimachinery/pkg/util/json" to avoid number conversion issues

@liggitt Same reason as https://github.com/kubernetes/kubernetes/pull/40666#pullrequestreview-19186078

```release-note
NONE
```
2017-03-06 19:51:16 -08:00
Jordan Liggitt 6853e4d71e
Preserve custom etcd prefix compatibility for etcd3 2017-03-06 20:58:06 -05:00
Kubernetes Submit Queue 73c5d6cd2f Merge pull request #41653 from jlowdermilk/gcp-auth-plugin
Automatic merge from submit-queue (batch tested with PRs 42080, 41653, 42598, 42555)

Support whitespace in command path for gcp auth plugin

```
External command option on gcp client auth plugin supports whitespace in command path.
```

Splitting on whitespace to get cmd+args breaks when the path the executable contains spaces. Resolve by adding a new "cmd-args" field to config to allow the full string of "cmd-path" to be interpreted as path to executable.

This change is backwards compatible with existing behavior.
2017-03-06 17:16:13 -08:00
Kubernetes Submit Queue d50a59ec66 Merge pull request #42080 from enisoc/controller-ref-ss
Automatic merge from submit-queue (batch tested with PRs 42080, 41653, 42598, 42555)

StatefulSet: Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings StatefulSet into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

Fixes #36859

**Special notes for your reviewer**:

**Release note**:

```release-note
StatefulSet now respects ControllerRef to avoid fighting over Pods. At the time of upgrade, **you must not have StatefulSets with selectors that overlap** with any other controllers (such as ReplicaSets), or else [ownership of Pods may change](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#upgrading).
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-03-06 17:16:10 -08:00
Klaus Ma 42fe601055 Updated auto generated codes. 2017-03-06 23:13:35 +00:00
Anthony Yeh 57fb5e2bba Deployment: Update Lister documentation for ControllerRef.
The Deployment Listers still use selectors, because this is the
behavior expected by callers. This clarifies the meaning of the
returned list. Some callers may need to switch to using
GetControllerOf() instead, but that is a separate, case-by-case issue.
2017-03-06 15:12:07 -08:00
Jeff Lowdermilk 995ecfe84e Support whitespace in command path for gcp auth plugin
Specific use case is GKE users running gcloud/kubectl on Windows
with a cloud sdk installation path containing spaces. Also improving
test coverage using trick borrowed from exec_test.go
2017-03-06 13:52:18 -08:00
Kubernetes Submit Queue 69019e3051 Merge pull request #31783 from dominikschulz/cleanmetrics
Automatic merge from submit-queue (batch tested with PRs 31783, 41988, 42535, 42572, 41870)

Clean user agent to reduce metrics cardinality

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

This PR is an example implementation for my issue #31781.

``` release-note
```

This commit cleans common browser user-agents to reduce the metrics
cardinality in exported prometheus metrics.

Resolves kubernetes/kubernetes#31781
2017-03-06 11:30:12 -08:00
Anthony Yeh 25d90cdaec StatefulSet: Update Lister documentation for ControllerRef.
The StatefulSet Listers still use selectors, because this is the
behavior expected by callers. This clarifies the meaning of the
returned list. Some callers may need to switch to using
GetControllerOf() instead, but that is a separate, case-by-case issue.
2017-03-06 09:46:03 -08:00
Kubernetes Submit Queue 61e7d1ebf1 Merge pull request #42491 from deads2k/auth-03-adder
Automatic merge from submit-queue

make the system:authenticated group adder smarter

Fixes #42437 

This prevents the group adder from adding the system:authenticated group when:
 1. it's already in the list
 2. the user is system:anonymous
 3. system:unauthenticated is in the list

Smaller alternative to https://github.com/kubernetes/kubernetes/pull/42421 for 1.6.

@kubernetes/sig-auth-pr-reviews @enj @liggitt
2017-03-06 05:45:03 -08:00
Maciej Szulik 591b2e005c Staging client changes for cleaning batch/v2alpha1 2017-03-06 12:27:16 +01:00
Dominik Schulz b5c89a8be6 Clean user agent
This commit cleans common browser user-agents to reduce the metrics
cardinality in exported prometheus metrics.
2017-03-06 07:10:04 +01:00
Kubernetes Submit Queue 93a3efd896 Merge pull request #42300 from caesarxuchao/fix-client-verify
Automatic merge from submit-queue

ignore base.go in client-verify

We need to cherry-pick it to 1.6 to fix #42290.
2017-03-03 21:56:48 -08:00
Kubernetes Submit Queue 99445553df Merge pull request #42310 from liggitt/init-container-default
Automatic merge from submit-queue (batch tested with PRs 42443, 38924, 42367, 42391, 42310)

Apply custom defaults to init containers

Adds overridden defaults to init containers. They were not being defaulted the same way normal containers were.
2017-03-03 18:08:45 -08:00
Vladimir Vivien 915a54180d Addition of ScaleIO Kubernetes Volume Plugin
This commits implements the Kubernetes volume plugin allowing pods to seamlessly access and use data stored on ScaleIO volumes.
2017-03-03 15:47:19 -05:00
ymqytw b29f4c26d7 switch to k8s json to avoid number conversion issue 2017-03-03 12:17:53 -08:00
Kubernetes Submit Queue 6db099fcee Merge pull request #42275 from deads2k/cli-05-restmapper
Automatic merge from submit-queue (batch tested with PRs 41306, 42187, 41666, 42275, 42266)

discovery restmapping should always prefer /v1

The core kube API, empty group, version==v1 should always be the most preferred group and resource from a rest mapper.  This special cases that.  All the others should be based on discovery order as we previously agreed.

@kubernetes/sig-cli-pr-reviews @kubernetes/sig-api-machinery-pr-reviews 
@enj
2017-03-03 10:54:43 -08:00
Kubernetes Submit Queue 4932b1422c Merge pull request #42187 from smarterclayton/wrong_error_from_timeout
Automatic merge from submit-queue (batch tested with PRs 41306, 42187, 41666, 42275, 42266)

Server timeout returns an incorrect error

Not a valid Status object in JSON

Part of #42163
2017-03-03 10:54:40 -08:00
deads2k 379a73a8db make the system:authenticated group adder smarter 2017-03-03 12:32:52 -05:00
Kubernetes Submit Queue ec09dab13e Merge pull request #41770 from k82cn/updated_sched_name
Automatic merge from submit-queue (batch tested with PRs 42365, 42429, 41770, 42018, 35055)

Updated scheduler name for multi-scheduler.

fixes #41859
2017-03-03 09:24:44 -08:00
Kubernetes Submit Queue 053458cc83 Merge pull request #41984 from enisoc/controller-ref-rc-rs
Automatic merge from submit-queue (batch tested with PRs 41984, 41682, 41924, 41928)

RC/RS: Fully Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings ReplicaSet and ReplicationController into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

Although RC/RS had partially implemented ControllerRef, they didn't use it to determine which controller to sync, or to update expectations. This could lead to instability or controllers getting stuck.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-03-02 10:51:05 -08:00
Kubernetes Submit Queue c6206c198a Merge pull request #42277 from liggitt/group-resource-error
Automatic merge from submit-queue

Only set a groupresource on errors if a resource was specified

@deads2k this gets rid of the weird .meta.k8s.io error on unauthorized errors
2017-03-02 06:14:55 -08:00
Kubernetes Submit Queue 3d868401e2 Merge pull request #42253 from liggitt/nil-invalid-field-error
Automatic merge from submit-queue (batch tested with PRs 42128, 42064, 42253, 42309, 42322)

Fix panic on nil invalid field error

bug fix for validation panic

if a field.Invalid is constructed with a nil badvalue, the Error() method panics, since reflect.TypeOf() returns nil
2017-03-02 05:00:52 -08:00
Kubernetes Submit Queue 6969aff027 Merge pull request #42128 from jsafrane/v1-2-combined
Automatic merge from submit-queue (batch tested with PRs 42128, 42064, 42253, 42309, 42322)

Add storage.k8s.io/v1 API

This is combined version of reverted #40088 (first 4 commits) and #41646. The difference is that all controllers and tests use old `storage.k8s.io/v1beta1` API so in theory all tests can pass on GKE.

Release note:
```release-note
StorageClassName attribute has been added to PersistentVolume and PersistentVolumeClaim objects and should be used instead of annotation `volume.beta.kubernetes.io/storage-class`. The beta annotation is still working in this release, however it will be removed in a future release.
```
2017-03-02 05:00:39 -08:00
Kubernetes Submit Queue 1634d8f9f7 Merge pull request #42084 from caesarxuchao/keep-k8s.io-godep
Automatic merge from submit-queue (batch tested with PRs 41672, 42084, 42233, 42165, 42273)

Keep entries of apimachinery in client-go's Godeps.json

1. copy.sh now copies staging/ to a temp dir, creates snapshots for them, and then adds the temp dir to GOPATH before running `godep save`. This way, we don't need the `go list` check added in #41987 so that's removed @sttts.
2. copy.sh fills the entries for k8s.io/apimachinery with dummy SHA1 in client-go's Godeps.json. The publish robot will later fill the actually published one.
3. copy.sh removes the entire `_vendor` from client-go. We cannot keep `_vendor` because it makes hard to use the `git filter-branch` magic for client-go, because the filtered commits might contain changes to `_vendor` while client-go only has `vendor/`.

Some notes on point 3: the robot will restore the vendor/ later, but exclude k8s.io/* and glog, so that users retrieving client-go with `go get` won't end up with multiple copies of them. I think this should be a ***general rule*** for published k8s.io/* repos: every published repos should have complete Godeps.json with latest commit hashes of other k8s.io/* repos, but vendor/k8s.io/* and vendor/glog will be removed from all repos.

@sttts @lavalamp @deads2k
2017-03-02 03:20:23 -08:00
Kubernetes Submit Queue fc31dae165 Merge pull request #41932 from ericchiang/self-client-config-scheme
Automatic merge from submit-queue (batch tested with PRs 42126, 42130, 42232, 42245, 41932)

apiserver/pkg/server: include scheme in insecure self client config

Noticed this during bootkube development: https://github.com/kubernetes-incubator/bootkube/issues/325

In Go 1.8's `url.Parse` became more strict, and `url.Parse("127.0.0.1:8080")` now fails.

https://beta.golang.org/doc/go1.8#net_url
https://play.golang.org/p/dw_cPeotG4

Accidentally compiled bootkube with 1.8 and tracked a panic down to the loopback client config. Though we're still using the old "genericapiserver", this seems to be translated from the old one.

The actual panic we observed was

```
E0222 19:40:11.364949       5 server.go:254] Failed to create clientset: parse 127.0.0.1:8080: first path segment in URL cannot contain colon
panic: parse 127.0.0.1:8080: first path segment in URL cannot contain colon
goroutine 35 [running]:
github.com/kubernetes-incubator/bootkube/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion.NewForConfigOrDie(0xc420728ea0, 0xc420738e30)
        /home/eric/src/github.com/kubernetes-incubator/bootkube/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion/core_client.go:132 +0x62
github.com/kubernetes-incubator/bootkube/vendor/k8s.io/kubernetes/pkg/master.(*Config).Complete(0xc420739db8, 0x0)
        /home/eric/src/github.com/kubernetes-incubator/bootkube/vendor/k8s.io/kubernetes/pkg/master/master.go:180 +0x40a
github.com/kubernetes-incubator/bootkube/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app.Run(0xc42007a3c0, 0x0, 0x0)
        /home/eric/src/github.com/kubernetes-incubator/bootkube/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go:347 +0x1e8d
github.com/kubernetes-incubator/bootkube/pkg/bootkube.(*bootkube).Run.func1(0xc4206b01e0, 0xc420164300)
        /home/eric/src/github.com/kubernetes-incubator/bootkube/pkg/bootkube/bootkube.go:124 +0x2f
created by github.com/kubernetes-incubator/bootkube/pkg/bootkube.(*bootkube).Run
        /home/eric/src/github.com/kubernetes-incubator/bootkube/pkg/bootkube/bootkube.go:124 +0xb0
```

I don't actually know if this is the correct fix or if there should be changes to `NewForConfigOrDie`. Am looking for comments more than anything.

edit: @abourget pointed out over on bootkube that the actual panic was fixed in the internalclient by https://github.com/kubernetes/kubernetes/pull/38519.

cc @deads2k @sttts @kubernetes/sig-api-machinery-pr-reviews
2017-03-02 02:07:31 -08:00
Jan Safranek 9487552e41 Regenerate everything 2017-03-02 10:23:58 +01:00
Jan Safranek c535c3e20b Regenerate everything 2017-03-02 08:56:26 +01:00
Kubernetes Submit Queue 47f63acf23 Merge pull request #41931 from jessfraz/pip
Automatic merge from submit-queue (batch tested with PRs 41931, 39821, 41841, 42197, 42195)

Admission Controller: Add Pod Preset

Based off the proposal in https://github.com/kubernetes/community/pull/254

cc @pmorie @pwittrock 

TODO:
- [ ] tests



**What this PR does / why we need it**: Implements the Pod Injection Policy admission controller

**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
Added new Api `PodPreset` to enable defining cross-cutting injection of Volumes and Environment into Pods.
```
2017-03-01 20:07:54 -08:00
Klaus Ma a74fcd0a8d generated client-go. 2017-03-02 11:19:33 +08:00
Kubernetes Submit Queue 01bfbb5fa0 Merge pull request #42259 from deads2k/rbac-07-reconcile-binding
Automatic merge from submit-queue

Add RBAC roles for bootstrap controllers

Supercedes https://github.com/kubernetes/kubernetes/pull/42221

When locking down controllers to individual RBAC roles we need to make sure that the bootstrap controllers have the right permissions.

This adds the roles and bindings at the correct namespace scopes for the bootstrap-signer and token-cleaner controllers.

@liggitt ptal
@jbeda @luxas you got a good way to test this?  It must not be covered in normal e2e or we'd've seen the issue before.
2017-03-01 16:57:51 -08:00
Anthony Yeh f54a5c9728 RC/RS: Update Lister documentation for ControllerRef.
The RC/RS Listers still use selectors, because this is the behavior
expected by callers. This clarifies the meaning of the returned list.
Some callers may need to switch to using GetControllerOf() instead,
but that is a separate, case-by-case issue.
2017-03-01 15:43:51 -08:00