Commit Graph

860 Commits (bafabcbb44365e672b004e1a01e5be767c274cb0)

Author SHA1 Message Date
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
Kubernetes Submit Queue d5ff69468e Merge pull request #29378 from vefimova/docker_resolv
Automatic merge from submit-queue

Re-writing of the resolv.conf file generated by docker

Fixes #17406 

Docker 1.12 will contain feature "The option --dns and --net=host should not be mutually exclusive" (docker/docker#22408)
This patch adds optional support for this ability in kubelet (for now in case of "hostNetwork: true" set all dns settings are ignored if any).
To enable feature use newly added kubelet flag: --allow-dns-for-hostnet=true
2017-03-01 14:19:08 -08:00
Chao Xu aae25271d9 generated 2017-03-01 14:19:06 -08:00
Chao Xu b326064d45 copy.sh rewrites rev of apimachinery with dummy rev in Godeps.json; remove _vendor 2017-03-01 14:13:10 -08:00
Jess Frazelle cc3166e2d7
fix client-go
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-03-01 13:05:47 -08:00
Jess Frazelle 5bb53133a9
update staging client
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-03-01 13:05:44 -08:00
Chao Xu 19fc6a5d21 ignore base.go 2017-03-01 10:33:41 -08:00
Kubernetes Submit Queue c713ef434d Merge pull request #42327 from deads2k/api-06-debug
Automatic merge from submit-queue

show patch error as string not byte slice

Debugging for https://github.com/kubernetes/kubernetes/issues/39471 shows

```
client_test.go:309: Failed updating patchpod with patch type application/json-patch+json: Operation cannot be fulfilled on pods "patchpod": there is a meaningful conflict:
	 diff1=[123 34 109 101 116 97 100 97 116 97 34 58 123 34 108 97 98 101 108 115 34 58 123 34 102 111 111 34 58 110 117 108 108 125 44 34 114 101 115 111 117 114 99 101 86 101 114 115 105 111 110 34 58 34 49 52 50 50 34 125 125]
	, diff2=[123 34 109 101 116 97 100 97 116 97 34 58 123 34 108 97 98 101 108 115 34 58 110 117 108 108 125 125]
```

I don't speak byte slice, so this makes it a string for next time.

@sttts
2017-03-01 10:18:42 -08:00
vefimova fc8a37ec86 Added ability for Docker containers to set usage of dns settings along with hostNetwork is true
Introduced chages:
   1. Re-writing of the resolv.conf file generated by docker.
      Cluster dns settings aren't passed anymore to docker api in all cases, not only for pods with host network:
      the resolver conf will be overwritten after infra-container creation to override docker's behaviour.

   2. Added new one dnsPolicy - 'ClusterFirstWithHostNet', so now there are:
      - ClusterFirstWithHostNet - use dns settings in all cases, i.e. with hostNet=true as well
      - ClusterFirst - use dns settings unless hostNetwork is true
      - Default

Fixes #17406
2017-03-01 17:10:00 +00:00
deads2k ea887557d3 show patch error as string not byte slice 2017-03-01 11:32:16 -05:00
deads2k 49f8a37c64 discovery restmapping should always prefer /v1 2017-03-01 10:59:23 -05:00
Maciej Szulik b844f7d4a4 Staging changes for apps/v1beta1.deployments 2017-03-01 15:14:41 +01:00
Maciej Szulik 1f04d9353e Remove comment from all staging Godeps.json 2017-03-01 12:56:39 +01:00
Maciej Szulik 44bc6dadde Godeps updater should ignore comments 2017-03-01 12:56:06 +01:00
Kubernetes Submit Queue 3afefae02a Merge pull request #38676 from caesarxuchao/sync-gc
Automatic merge from submit-queue (batch tested with PRs 38676, 41765, 42103, 41833, 41702)

Add synchronous garbage collection

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

Split into five commits:
1. generated: don't need review
2. API: got reviewed in #38678, i addressed @lavalamp's comments there.
3. registry changes: @nikhiljindal could you help take a look?
4. gc changes: reviewed by @deads2k in #38679. It needs another pass.
5. tests: @lavalamp @deads2k could take a look?

TODO:
- [ ] Update doc. Note that the existing doc has been refactored in https://github.com/kubernetes/kubernetes.github.io/pull/2488.
- [ ] add an admission controller to check if a user can set OwnerReference.BlockOwnerDeletion
- [ ] https://github.com/kubernetes/kubernetes/pull/38676#discussion_r103277274
- [ ] split the unit tests garbagecollector_test.go according to the components tested.
- [ ] try if it's practically safe to use the cached object status in attempToDeleteItem(), after synchronous GC feature is stable. (Also see https://github.com/kubernetes/kubernetes/pull/38676#discussion_r103056971)
- [ ] add blockOwnerDeletion for rs adoption https://github.com/kubernetes/kubernetes/pull/38679#discussion_r93817284
- [ ] https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/38676/pull-kubernetes-e2e-gce-etcd3/20101/ (improve the log message)

```release-note
Added foreground garbage collection: the owner object will not be deleted until all its dependents are deleted by the garbage collector. Please checkout the [user doc](https://kubernetes.io/docs/concepts/abstractions/controllers/garbage-collection/) for details.
deleteOptions.orphanDependents is going to be deprecated in 1.7. Please use deleteOptions.propagationPolicy instead.
```
2017-03-01 01:44:02 -08:00
Kubernetes Submit Queue 499f089230 Merge pull request #42178 from derekwaynecarr/decode-node-list-spam
Automatic merge from submit-queue (batch tested with PRs 41597, 42185, 42075, 42178, 41705)

stop spamming logs on restart of api server

**What this PR does / why we need it**:
This PR reduces an excessive amount of log spam on startup of any API server with larger amounts of content.  We have experienced server restart times ~5 minutes that is a consequence of us tracing each directory in etcd during our initial decoding.  This spams the journald process, and results in much of those messages getting rate limited and dropped, and making actual problems much harder to debug.  This stops us logging discrete keys in favor of just knowing that an operation was slow for the particular object type (which is enough information!)

this PR also makes it so we know what trace operation was ended in our log messages!

sample log now:

```
Trace "decodeNodeList *[]api.PolicyBinding" (started 2017-02-20 22:20:33.98771112 +0000 UTC)
Decoded 10718 nodes
decodeNodeList *[]api.PolicyBinding [500ms] END
```
2017-03-01 00:36:09 -08:00
Kubernetes Submit Queue f1939a77b7 Merge pull request #42075 from deads2k/agg-22-auth-auto
Automatic merge from submit-queue (batch tested with PRs 41597, 42185, 42075, 42178, 41705)

auto discovery CA for extension API servers

This is what the smaller pulls were leading to.  Only the last commit is unique and I expect I'll still tweak some pod definitions, but this is where I was going.

@sttts @liggitt
2017-03-01 00:36:07 -08:00
Kubernetes Submit Queue 17b6c17536 Merge pull request #42185 from smarterclayton/watch_log
Automatic merge from submit-queue (batch tested with PRs 41597, 42185, 42075, 42178, 41705)

Don't log context or full request URI due to security concerns
2017-03-01 00:36:04 -08:00
Chao Xu 93686da104 registry changes 2017-02-28 23:05:41 -08:00
Chao Xu 5bfacf59f6 API 2017-02-28 23:05:40 -08:00
Chao Xu e4aa9db258 generated 2017-02-28 23:05:40 -08:00
Jordan Liggitt cfb1cd486e
Apply custom defaults to init containers 2017-03-01 01:50:30 -05:00
Kubernetes Submit Queue 992b18065d Merge pull request #42183 from sttts/sttts-bool-parse-warning
Automatic merge from submit-queue (batch tested with PRs 42216, 42136, 42183, 42149, 36828)

Fix bool parse warning in apimachinery

```golang
var DefaultConverter = NewConverter(parseBool(os.Getenv("KUBE_PATCH_CONVERSION_DETECTOR")))
func parseBool(key string) bool {
	value, err := strconv.ParseBool(key)
	if err != nil {
		utilruntime.HandleError(fmt.Errorf("Couldn't parse '%s' as bool for unstructured mismatch detection", key))
	}
	return value
}
````

leading to

```
W0227 10:06:01.037] E0227 10:06:01.023502   16550 converter.go:87] Couldn't parse '' as bool for unstructured mismatch detection
```
2017-02-28 21:17:00 -08:00
Clayton Coleman 60d8365751
Server timeout returns an incorrect error
Not a valid Status object in JSON
2017-02-28 19:21:06 -05:00
Aditya Dani 28df55fc31 Portworx Volume Driver in Kubernetes
- Add a new type PortworxVolumeSource
- Implement the kubernetes volume plugin for Portworx Volumes under pkg/volume/portworx
- The Portworx Volume Driver uses the libopenstorage/openstorage specifications and apis for volume operations.

Changes for k8s configuration and examples for portworx volumes.

- Add PortworxVolume hooks in kubectl, kube-controller-manager and validation.
- Add a README for PortworxVolume usage as PVs, PVCs and StorageClass.
- Add example spec files

Handle code review comments.

- Modified READMEs to incorporate to suggestions.
- Add a test for ReadWriteMany access mode.
- Use util.UnmountPath in TearDown.
- Add ReadOnly flag to PortworxVolumeSource
- Use hostname:port instead of unix sockets
- Delete the mount dir in TearDown.
- Fix link issue in persistentvolumes README
- In unit test check for mountpath after Setup is done.
- Add PVC Claim Name as a Portworx Volume Label

Generated code and documentation.
- Updated swagger spec
- Updated api-reference docs
- Updated generated code under pkg/api/v1

Godeps update for Portworx Volume Driver
- Adds github.com/libopenstorage/openstorage
- Adds go.pedge.io/pb/go/google/protobuf
- Updates Godep Licenses
2017-02-28 23:24:56 +00:00
Jordan Liggitt 6951023759
Only set a groupresource on errors if a resource was specified 2017-02-28 15:46:15 -05:00
deads2k 3d039f60cf allow incluster authentication info lookup 2017-02-28 13:29:59 -05:00
deads2k 1cb582a03a add roles and bindings for bootstrap controllers 2017-02-28 13:14:58 -05:00
Kubernetes Submit Queue b26fb689f6 Merge pull request #42059 from deads2k/agg-19-integration-test
Automatic merge from submit-queue (batch tested with PRs 35094, 42095, 42059, 42143, 41944)

add aggregation integration test

Wires up an integration test which runs a full kube-apiserver, the wardle server, and the kube-aggregator and creates the APIservice object for the wardle server.  Without services and DNS the aggregator doesn't proxy, but it does ensure we don't have an obvious panic or bring up failure.

@sttts @ncdc
2017-02-28 09:20:16 -08:00
Jordan Liggitt 0cf9b0df56
Fix panic on nil invalid field error 2017-02-28 10:46:17 -05:00
Dr. Stefan Schimanski fc6d87c0a2 Update client 2017-02-28 15:34:34 +01:00
Dr. Stefan Schimanski ee8ce696d6 client-gen: create private registry for fake clientset 2017-02-28 15:25:10 +01:00
deads2k 5cfe26dece add aggregation integration test 2017-02-28 08:42:06 -05:00
Kubernetes Submit Queue 4a17b8b100 Merge pull request #42067 from deads2k/agg-21-cleanup-default
Automatic merge from submit-queue

clean up generic apiserver options

Clean up generic apiserver options before we tag any levels.  This makes them more in-line with "normal" api servers running on the platform.

Also remove dead example code.

@sttts
2017-02-28 05:23:34 -08:00
Eric Chiang 6891505db9 apiserver/pkg/server: include scheme in insecure self client config 2017-02-27 14:02:36 -08:00
Dr. Stefan Schimanski f11d76ae44 Update client 2017-02-27 22:01:57 +01:00
Dr. Stefan Schimanski 395be3b401 apimachinery: handle duplicated and conflicting type registration 2017-02-27 21:58:21 +01:00
Dr. Stefan Schimanski 6050f59b7b apimachinery: merge Scheme.AddKnownTypes and Scheme.AddKnownTypeWithName 2017-02-27 21:58:21 +01:00
Derek Carr 9211e0380f stop spamming logs on restart of api server 2017-02-27 15:14:09 -05:00
Clayton Coleman f6300555f4
Don't log context or full request URI due to security concerns
These lines may contain information that cannot be safely logged to
disk. Only deal with known parameters, also bump to V(2) to be
consistent with other logging.
2017-02-27 14:35:16 -05:00
Dr. Stefan Schimanski 1900810f97 Fix bool parse warning in apimachinery 2017-02-27 19:56:39 +01:00
Dr. Stefan Schimanski 3f2056e498 Update client-go 2017-02-27 14:18:04 +01:00
deads2k acba2cbd6d tweak defaults for recommended apiserver options 2017-02-27 07:47:19 -05:00
Kubernetes Submit Queue 8124705c81 Merge pull request #41987 from sttts/sttts-verify-staging-client-go-unify-with-copy-sh
Automatic merge from submit-queue (batch tested with PRs 42044, 41694, 41927, 42050, 41987)

Simplify and fix hack/{verify,update}-staging-{client-go,godeps}.sh

- merge `hack/{verify,update}-staging-client-go.sh`
- pin godep with shared code
- remove godep-restore completely from the process and replace with a simple check that godeps are restored
- add safety check in `staging/copy.sh` that there is no lingering `k8s.io/apimachinery` in the GOPATH which would lead to inconsistent client-go builds (!)
- check that all these scripts only operate in a clean working dir.
2017-02-26 23:16:56 -08:00
Kubernetes Submit Queue 082cfac707 Merge pull request #35408 from xilabao/add-secret-to-pflag
Automatic merge from submit-queue (batch tested with PRs 35408, 41915, 41992, 41964, 41925)

add secret option to flag

To resolve the issue of security(pr #35030 ),

> @smarterclayton commented 5 days ago
> This is unfortunately not all flags that could be secrets. The best option would be to add support in spf13/pflag to tag a flag as a secret, and then use that bit to determine the list.
> 
> Also, Command() could be used in contexts that need exact parameters (for subshell execution), so we would need to add a new method or extend the signature here to allow exact flags to be retrieved.

we could add a secret option to the flags.
2017-02-26 18:07:53 -08:00
Kubernetes Submit Queue 945b041fab Merge pull request #41165 from nikhiljindal/del202
Automatic merge from submit-queue (batch tested with PRs 41954, 40528, 41875, 41165, 41877)

Updating apiserver to return 202 when resource is being deleted asynchronously via cascading deletion

As per https://github.com/kubernetes/kubernetes/issues/33196#issuecomment-278440622.

cc @kubernetes/sig-api-machinery-pr-reviews @smarterclayton @caesarxuchao @bgrant0607 @kubernetes/api-reviewers 

```release-note
Updating apiserver to return http status code 202 for a delete request when the resource is not immediately deleted because of user requesting cascading deletion using DeleteOptions.OrphanDependents=false.
```
2017-02-26 14:54:54 -08:00
Kubernetes Submit Queue 44dcde0c59 Merge pull request #40522 from wojtek-t/use_new_conversions_in_patch
Automatic merge from submit-queue (batch tested with PRs 41857, 41864, 40522, 41835, 41991)

Use new conversions in patch

Ref #39017
2017-02-26 11:13:55 -08:00
Kubernetes Submit Queue 5c3791b9e0 Merge pull request #41729 from smarterclayton/refactor_printers
Automatic merge from submit-queue (batch tested with PRs 41621, 41946, 41941, 41250, 41729)

Refactor printers and describers into their own package.

This sets the stage for using printer code from the server side (decoupled from kubectl) and loosens the coupling between kubectl and the printers. `pkg/printers` contains interfaces and has an import restriction against pulling in API specific code, while `pkg/printers/internalversion` can be used for internal types.

Add a method on `Factory` for retrieving PrinterForCommand which uses the Scheme and RESTMapper from the Factory, not the hardcoded ones.  This further separates kubectl from the core API scheme and allows better composition.

Change NamePrinter to use RESTMapper (previously it was hardcoding those conversions). This means that we now return plural resource names (`pods/foo`) but is correct once aliases and shortnames start being returned by the mapper.

This is a prerequisite for server side get, but is pure refactor (contains no new features).

@deads2k @liggitt
2017-02-26 06:47:03 -08:00
Kubernetes Submit Queue cb17b636a8 Merge pull request #42094 from sttts/sttts-sample-apiserver-OWNERS
Automatic merge from submit-queue (batch tested with PRs 42106, 42094, 42069, 42098, 41852)

Add OWNERS for sample-apiserver in staging
2017-02-26 04:33:57 -08:00
Dr. Stefan Schimanski 0b07908358 staging/copy.sh: add safety check for k8s.io/apimachinery/ in GOPATH 2017-02-25 22:39:15 +01:00
Dr. Stefan Schimanski dd9219f304 update-staging-{client-go,godeps}.sh: no godep-restore, pin godep, check workdir 2017-02-25 22:38:23 +01:00
xilabao 131802a5cd add secret flag to options 2017-02-25 23:40:50 +08:00
xilabao db65bed243 godep update github.com/spf13/pflag 2017-02-25 23:39:22 +08:00
Kubernetes Submit Queue 1a46a167f3 Merge pull request #41882 from sttts/sttts-loopback-selfsigned-cert
Automatic merge from submit-queue

apiserver: self-signed in-memory cert for loopback

We had complicated logic before to find a matching (SNI- or server-) cert for the loopback device. In the worst case, bootstrapping failed because the provided certs didn't have the binding IP or localhost.

We now pass an artifical `ServerName` "apiserver-loopback-client" with the loopback client and install a self-signed in-memory cert+key into the server for that hostname. The client accepts the corresponding cert.

Fixing https://github.com/kubernetes/kubernetes/issues/41081
2017-02-25 06:23:17 -08:00
Kubernetes Submit Queue 0ace44346c Merge pull request #41590 from deads2k/agg-16-hyperkube
Automatic merge from submit-queue (batch tested with PRs 41854, 41801, 40088, 41590, 41911)

add kube-aggregator to hyperkube

Adds kube-aggregator to hyperkube.

@lavalamp @pwittrock @kubernetes/sig-api-machinery-misc @smarterclayton 

Google publishes a hyperkube image somewhere, right?
2017-02-25 05:02:56 -08:00
Dr. Stefan Schimanski 9f7aa7a760 Add OWNERS for sample-apiserver in staging 2017-02-25 10:25:54 +01:00
linyouchong 506b88e070 update kubeconfig document url in comments 2017-02-24 19:20:32 +08:00
Kubernetes Submit Queue 46dda7e32a Merge pull request #41821 from deads2k/apiserver-15-healthz
Automatic merge from submit-queue

redact detailed errors from healthz and expose in default policy

Makes `/healthz` less sensitive and exposes it by default.

@kubernetes/sig-auth-pr-reviews @kubernetes/sig-api-machinery-misc @liggitt
2017-02-24 00:22:55 -08:00
Morgan Bauer 3e5f904c89
Update godoc to match 2017-02-23 21:49:16 +00:00
Kubernetes Submit Queue e5c2d716d9 Merge pull request #41887 from liggitt/watch-verb
Automatic merge from submit-queue (batch tested with PRs 39855, 41433, 41567, 41887, 41652)

Use watch param instead of deprecated /watch/ prefix

Reopen of https://github.com/kubernetes/kubernetes/pull/41722 after reverted in https://github.com/kubernetes/kubernetes/pull/41774

Required https://github.com/kubernetes/kubernetes/pull/41797 to merge first

cc @deads2k @wojtek-t
2017-02-23 09:36:35 -08:00
fate-grand-order 122ea25512 fix misspell "underlying" in request.go 2017-02-23 22:09:20 +08:00
Wojciech Tyczynski 8a954a7a5c Fix staging Godeps 2017-02-23 10:08:51 +01:00
Wojciech Tyczynski e34e1abe33 Use new runtime.Object <-> map[string]interface{} converter 2017-02-23 09:08:35 +01:00
Dr. Stefan Schimanski 726c46e2da apiserver: self-signed in-memory cert for loopback 2017-02-23 08:06:02 +01:00
Kubernetes Submit Queue 3e3133bc59 Merge pull request #41781 from wojtek-t/dont_use_base64_encoding_with-etcd3
Automatic merge from submit-queue (batch tested with PRs 41797, 41793, 41795, 41807, 41781)

Don't use base64 encoding with etcd v3

In https://github.com/kubernetes/kubernetes/pull/36229 we changed the default storage to etcd v3.

This in fact is a fix to that PR.

With etcd v3, the base64-encoding is no longer needed - so we use it only if etcd v2 is explicitly requested as storage format.

@lavalamp
2017-02-22 22:06:37 -08:00
Kubernetes Submit Queue c6036b6acc Merge pull request #41797 from deads2k/apiserver-14-instrument
Automatic merge from submit-queue (batch tested with PRs 41797, 41793, 41795, 41807, 41781)

tweak a list to a watch verb when requested

Related to https://github.com/kubernetes/kubernetes/pull/41774

@wojtek-t does this do what's needed?
2017-02-22 22:06:30 -08:00
Clayton Coleman a9c03f292b
UnstructuredList should return 'items' set to the children
The set of items is not mutable (can't add or remove items) but the list
now is. Needs to be improved to make mutability is clear.
2017-02-23 00:28:31 -05:00
Kubernetes Submit Queue e49f44d89c Merge pull request #41486 from sttts/sttts-clientset-scheme
Automatic merge from submit-queue (batch tested with PRs 41146, 41486, 41482, 41538, 41784)

client-gen: independent scheme for clientsets

This PR adds a clientset internal scheme instead of using `pkg/api.Scheme`. **The clientset API stays the same.**

In detail:

- introduce a scheme for each clientset, i.e. do not use `pkg/api.Scheme+Registry+Codec+ParameterCodecs`.

  This makes it easier to compose client-go's clientset (which is rewritten in `staging/copy.sh` and therefore hardcoded to use `k8s.io/client-go/pkg/api.Scheme+Registry+Codecs+ParameterCodecs`) with third-party clientsets (kube-aggregator, openshift, federation) which are not rewritten using `copy.sh` as all of them are self-contained and therefore relocatable.

  This fixes https://github.com/kubernetes/kubernetes/pull/41403/files#diff-76edfb07dee54ff7ddeda25c33c10d29R81 and prepares client-gen for use in OpenShift.

- register types into the clientset scheme via `AddToScheme` for versioned clientsets. This decouples the client-go clients from announce+registration (internal clients continue using announce+registry and apigroup installers).

  This reduces complexity for client-go, possibly remove the necessity for the announce+register machinery for many use-cases, maybe even to delete it mid-term.
- port federation and testgroup  `install/install.go` to `announced.GroupMetaFactory` in order to have a proper `Install.Install(...)` func for registration.

With the first change it's easy to add the types of one clientset to the scheme of the other using the `clientset/scheme.AddToScheme` method. This allows to use cross-clientset `runtime.RawExtensions`:

```golang
import (
     "k8s.io/client-go/kubernetes"
     clientsetscheme "k8s.io/client-go/kuberentes/scheme"
     aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
)

kclientset, _ := kubernetes.NewForConfig(c)
aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
```
Kubernetes types with a `RawExtension` can en/decode aggregator types after this.

TODO:
- [x] fix fake clientsets
- [x] get the `*Options` types registered correctly for core, compare DO-NOT-MERGE commit.
- [x] get prefered version right in internal client. Do we need all versions registered in the internal client to support negotiation?
- [x] run `staging/copy.sh` and run tests: https://github.com/kubernetes/kubernetes/pull/41744
- ~~[ ] fixup usage through-out the code-base~~
- **Follow-up**: move `import_known_versions.go` files somewhere such that import of the `api.Scheme` package automatically installs the apigroups. It looks like we depended on the import fo the clientset for this purpose.
2017-02-22 21:09:33 -08:00
Kubernetes Submit Queue 7cca0d1867 Merge pull request #41851 from janetkuo/deployment-duplicate-rs
Automatic merge from submit-queue (batch tested with PRs 38957, 41819, 41851, 40667, 41373)

Fix deployment helper - no assumptions on only one new ReplicaSet

#40415

**Release note**:

```release-note
NONE
```

@kubernetes/sig-apps-bugs
2017-02-22 19:59:34 -08:00
Kubernetes Submit Queue 6024f56f80 Merge pull request #38957 from aveshagarwal/master-taints-tolerations-api-fields
Automatic merge from submit-queue (batch tested with PRs 38957, 41819, 41851, 40667, 41373)

Change taints/tolerations to api fields

This PR changes current implementation of taints and tolerations from annotations to API fields. Taint and toleration are now part of `NodeSpec` and `PodSpec`, respectively. The annotation keys: `scheduler.alpha.kubernetes.io/tolerations` and `scheduler.alpha.kubernetes.io/taints`  have been removed.

**Release note**:
Pod tolerations and node taints have moved from annotations to API fields in the PodSpec and NodeSpec, respectively. Pod tolerations and node taints that are defined in the annotations will be ignored. The annotation keys: `scheduler.alpha.kubernetes.io/tolerations` and `scheduler.alpha.kubernetes.io/taints`  have been removed.
2017-02-22 19:59:31 -08:00
Janet Kuo a8506813dc Generated: update staging GoDeps 2017-02-22 13:29:33 -08:00
Seth Jennings 258f54bdf4 fix staging godeps 2017-02-22 12:15:21 -06:00
Dr. Stefan Schimanski 595f4ed2cb Update generated files 2017-02-22 19:03:25 +01:00
Kubernetes Submit Queue e43e663a53 Merge pull request #41650 from deads2k/api-02-godep
Automatic merge from submit-queue

add godep manifest files to staging repos

The staging repos should have manifests that match the godeps of kube so we know what they build against.  We don't need the actual vendored code, since a sync script on the other side needs to find the correct level of other staging directories and thus requires its own `godep restore && go get && godep save` cycle.

@sttts ptal
@lavalamp @caesarxuchao client-go needs a lot of unwinding to do something similar, but the idea is that you can run an acyclic path to get this updated by copying the types and dependencies with `go list`, then generate the clients, then generate this manifest.  Then in your sync script you can pull the proper levels and finish the actual vendoring.
2017-02-22 08:56:27 -08:00
Kubernetes Submit Queue c58266c826 Merge pull request #41532 from ericchiang/kubectl-auth-providers
Automatic merge from submit-queue (batch tested with PRs 41349, 41532, 41256, 41587, 41657)

client-go: don't import client auth provider packages

Both of these auth providers are useful for kubectl but not so much for everyone importing client-go. Let users optionally import them (example [0]) and reduce the overall number of imports that client-go requires.

Quick grep seems to imply it wont import it after.

```
$ grep -r 'client-go/plugin/pkg/client/auth' staging/
staging/src/k8s.io/client-go/plugin/pkg/client/auth/plugins.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
staging/src/k8s.io/client-go/plugin/pkg/client/auth/plugins.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
staging/src/k8s.io/client-go/examples/third-party-resources/main.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go:	_ "k8s.io/client-go/plugin/pkg/client/auth"
staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go:	_ "k8s.io/client-go/plugin/pkg/client/auth"
```

closes https://github.com/kubernetes/client-go/issues/49
updates https://github.com/kubernetes/client-go/issues/79 (removes cloud.google.com/go import)

cc @kubernetes/sig-api-machinery-pr-reviews @kubernetes/sig-auth-pr-reviews 

```release-notes
client-go no longer imports GCP OAuth2 and OpenID Connect packages by default.
```

[0] 8b466d64c5/examples/third-party-resources/main.go (L34-L35)
2017-02-22 08:12:40 -08:00
Avesh Agarwal 9b640838a5 Change taint/toleration annotations to api fields. 2017-02-22 09:27:42 -05:00
Jordan Liggitt 4202489a89
regenerate clients 2017-02-22 08:54:13 -05:00
Jordan Liggitt 7b6ef2cedc
Switch watch prefixes to params 2017-02-22 08:54:08 -05:00
Jordan Liggitt e6dbe5f57e
Pass typed options to dynamic client 2017-02-22 08:53:57 -05:00
Kubernetes Submit Queue e1b174842a Merge pull request #41129 from atlassian/cleanup-client-example
Automatic merge from submit-queue (batch tested with PRs 41844, 41803, 39116, 41129, 41240)

Cleanup client example

**What this PR does / why we need it**:
- Package level `config` variable in `third-party-resources/main.go` is not used, it is shadowed by the one defined in `main()`. Should probably be deleted.
- Package level `kubeconfig ` variable in `out-of-cluster/main.go` is global - make it private to `main()`.

**Which issue this PR fixes**
This fixes https://github.com/kubernetes/client-go/issues/59, except the part about global `api.Scheme`, also adds test with interface check. Supersedes https://github.com/kubernetes/client-go/pull/61.

**Special notes for your reviewer**:
This is my first PR to Kubernetes :)
2017-02-22 05:48:43 -08:00
Kubernetes Submit Queue e8ff10ce29 Merge pull request #39116 from caesarxuchao/fix-event-expansion
Automatic merge from submit-queue (batch tested with PRs 41844, 41803, 39116, 41129, 41240)

core/v1/event_expansion.go use v1.GetReference

Fix https://github.com/kubernetes/client-go/issues/47.
2017-02-22 05:48:40 -08:00
deads2k 4cd0b7cdbe redact detailed errors from healthz and expose in default policy 2017-02-22 07:52:13 -05:00
Cao Shufeng 0ec585c139 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.
2017-02-22 04:52:05 -05:00
Wojciech Tyczynski fc3de292be Merge pull request #41731 from heartlock/patch-2
fix misspell "roughly" in config.go
2017-02-22 08:51:27 +01:00
nikhiljindal 2dc404fcb7 Update REST Handler to return 202 for cascading deletion 2017-02-21 11:00:36 -08:00
nikhiljindal 4ee81eb037 Updating tests for deleted boolean from Delete() 2017-02-21 11:00:36 -08:00
nikhiljindal 1d32897eed Updating the registry to return whether the resource was immediately deleted 2017-02-21 11:00:35 -08:00
Chao Xu ec00f67ab3 should use v1.GetReference 2017-02-21 10:35:17 -08:00
Eric Chiang 163f37f775 *: update codegen and bazel 2017-02-21 09:26:03 -08:00
Eric Chiang 58dde796ec client-go: don't import client auth provider packages 2017-02-21 09:26:03 -08:00
deads2k 0625db73db update godep.json files 2017-02-21 09:38:55 -05:00
deads2k a53611ab3e add godep.json to staging repos 2017-02-21 09:38:55 -05:00
deads2k 22e10bbc29 remove cycle that snuck into tests 2017-02-21 08:03:48 -05:00
deads2k ec91c009e7 tweak a list to a watch verb when requested 2017-02-21 07:48:38 -05:00
Kubernetes Submit Queue 43fec5afb5 Merge pull request #41685 from liggitt/edit-refactor-unknown-field
Automatic merge from submit-queue (batch tested with PRs 41709, 41685, 41754, 41759, 37237)

Tolerate unknown fields in strategic merge patch

When using `apply` or `edit` with an object that has a compiled-in struct, if an unknown server-side field is sent, or is present in a provided file, the strategic merge patch computation fails looking up type info from the go struct

If the field only exists in one side of the patch (is being added or removed), or is identical in both sides of the patch, we should tolerate missing type info, since it doesn't affect the patch.
2017-02-21 04:27:46 -08:00
Kubernetes Submit Queue d70dc20e62 Merge pull request #39063 from xingzhou/kube-28678
Automatic merge from submit-queue (batch tested with PRs 41706, 39063, 41330, 41739, 41576)

Added bool type support for jsonpath.

Added keywords "true" and "false" for
supporting bool type in jsonpath.

Fixed #28678
2017-02-21 02:24:39 -08:00
Wojciech Tyczynski ce37b18728 Don't use base64 encoding with etcd v3 2017-02-21 10:31:34 +01:00
StudyNick dc460c3e15 'workqueue' modify 'work queue' 2017-02-21 16:59:16 +08:00
Wojciech Tyczynski a21b08d00f Revert "Use watch param instead of deprecated /watch/ prefix" 2017-02-21 08:37:51 +01:00
Jordan Liggitt 06f7e71fd2
Allow strategic patch to deal with unknown fields that don't require merging 2017-02-20 20:40:03 -05:00
Kubernetes Submit Queue 79bef05f2d Merge pull request #36344 from anguslees/gophercloud
Automatic merge from submit-queue (batch tested with PRs 41756, 36344, 34259, 40843, 41526)

Migrate rackspace/gophercloud -> gophercloud/gophercloud

`gophercloud` is the go library we use to interact with openstack.  It has recently been renamed and incorporated a number of breaking code cleanups.  This change migrates the Kubernetes openstack code (openstack provider, keystone auth, cinder volumes) to the new library.

Fixes #30404

```release-note
The openstack cloud provider config no longer supports the deprecated `api-key` option. 
```

Note this PR doesn't change the rackspace provider.  It uses some rackspace-specific APIs and continues to use the older rackspace/gophercloud library.
2017-02-20 13:39:36 -08:00