Commit Graph

724 Commits (2e671715e0c9a6ccb3238193e27cb8b040681ee7)

Author SHA1 Message Date
Madhusudan.C.S b8109eae5b [Federation][init-02] Stop passing command factory to the init command.
Init command completely relies on the host factory, so it is unnecessary
to pass the default command factory to the init command.
2016-11-02 19:28:17 -07:00
Madhusudan.C.S 331ef53b69 [Federation][init-01] Add unit tests for `kubefed init`'s certificate generator. 2016-11-02 19:27:39 -07:00
Kubernetes Submit Queue 9a7ad2e20d Merge pull request #35592 from madhusudancs/federation-kubefed-04
Automatic merge from submit-queue

[Federation][(Un)join-01] Refactor common functions and structs into a util package.

Please review only the last commit here. This is based on PR #35495 which will be reviewed independently.

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole @nikhiljindal
2016-11-02 14:48:46 -07:00
Kubernetes Submit Queue d28f7031a1 Merge pull request #35494 from madhusudancs/federation-kubefed-02
Automatic merge from submit-queue

[Federation][unjoin-00] Implement `kubefed unjoin` command.

Please review only the last commit here. This is based on PR #35493 which will be reviewed independently.

I will add a release note separately for this entire feature, so please don't worry too much about the release note here in the PR.

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole @nikhiljindal
2016-11-02 13:36:43 -07:00
Madhusudan.C.S 4a9377027d [Federation][init] Implement `kubefed init` command that performs federation control plane bootstrap. 2016-11-02 13:36:41 -07:00
Madhusudan.C.S 9a0fc0c4f5 [Federation][(Un)join-01] Refactor common functions and structs into a util package. 2016-11-02 13:36:09 -07:00
Madhusudan.C.S 3c692ebd77 [Federation] Implement the `kubefed` command.
Also:
1. Add it to the client build targets list.
2. Register `kubefed join` and `kubefed unjoin` commands.
2016-11-02 12:48:20 -07:00
Kubernetes Submit Queue 7d14b568c3 Merge pull request #36001 from smarterclayton/change_double_decode
Automatic merge from submit-queue

Avoid double decoding all client responses

Fixes #35982 

The linked issue uncovered that we were always double decoding the response in restclient for get, list, update, create, and patch.  That's fairly expensive, most especially for list.  This PR refines the behavior of the rest client to avoid double decoding, and does so while minimizing the changes to rest client consumers.

restclient must be able to deal with multiple types of servers. Alter the behavior of restclient.Result#Raw() to not process the body on error, but instead to return the generic error (which still matches the error checking cases in api/error like IsBadRequest). If the caller uses
.Error(), .Into(), or .Get(), try decoding the body as a Status.

For older servers, continue to default apiVersion "v1" when calling restclient.Result#Error(). This was only for 1.1 servers and the extensions group, which we have since fixed.

This removes a double decode of very large objects (like LIST) - we were trying to DecodeInto status, but that ends up decoding the entire result and then throwing it away.  This makes the decode behavior specific to the type of action the user wants.

```release-note
The error handling behavior of `pkg/client/restclient.Result` has changed.  Calls to `Result.Raw()` will no longer parse the body, although they will still return errors that react to `pkg/api/errors.Is*()` as in previous releases.  Callers of `Get()` and `Into()` will continue to receive errors that are parsed from the body if the kind and apiVersion of the body match the `Status` object.

This more closely aligns rest client as a generic RESTful client, while preserving the special Kube API extended error handling for the `Get` and `Into` methods (which most Kube clients use).
```
2016-11-02 11:36:41 -07:00
Madhusudan.C.S 90d46c8670 [Federation][unjoin-00] Implement `kubefed unjoin` command.
Also, add unit tests for `kubefed unjoin`.
2016-11-02 11:22:46 -07:00
Clayton Coleman f0fa26bcf6
ExportOptions should be registered to all public schemas 2016-11-01 22:55:58 -04:00
Marcin Wielgus 6c0016181d Switch federated secret controller to use NamespacedName 2016-11-01 23:53:46 +01:00
Madhusudan.C.S 2342f6eefb [Federation][join-01] Implement `kubefed join` command.
Also, add unit tests for `kubefed join`.
2016-11-01 12:45:28 -07:00
Dr. Stefan Schimanski d0b3981f07 Make GenericApiServer.Run interruptable and fail on first listen 2016-11-01 09:50:56 +01:00
Kubernetes Submit Queue cc84673ebe Merge pull request #35928 from caesarxuchao/remove-clientset-archive
Automatic merge from submit-queue

Remove archived clientset

We have [client-go](https://github.com/kubernetes/client-go) now, no need to keep archived clientset in master of k8s.io/kubernetes.

Also updated the client-gen README.

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

cc @mikedanese 

```release-note
The main kubernetes repository stops hosting archived version of released clients. Please use [client-go](https://github.com/kubernetes/client-go).
```
2016-11-01 00:41:46 -07:00
Kubernetes Submit Queue a9b183db7f Merge pull request #32557 from asalkeld/an-ingress-docs
Automatic merge from submit-queue

Correct the article in generated documents

**What this PR does / why we need it**:
Fix the article in generated docs for "create/delete [article] [kind]"

**Which issue this PR fixes**
fixes #32305

**Special notes for your reviewer**:
None

**Release note**:

``` release-note
Correct the article in generated documents
```

For example:
  "a Ingress" > "an Ingress"
2016-10-31 23:16:46 -07:00
Chao Xu 4cf7adf937 remove release_1_4
remove archived federation clientsets
update README
2016-10-31 15:05:26 -07:00
Clayton Coleman ab673bbc9a
generated: alternative unsafe conversions 2016-10-31 11:00:29 -04:00
Dr. Stefan Schimanski ab3ce27f01 Make master+federation ServerRunOptions embeddings explicit 2016-10-31 11:04:58 +01:00
Dr. Stefan Schimanski d6dc0e561f Apiserver cleanups
- remove unused genericapiserver Config.MasterServiceNamespace
- move init code into ApplyOptions
- initialize genericapiserver Config.MaxRequestsInFlight
- move ServiceReadWritePort to master
2016-10-31 10:55:19 +01:00
Justin Santa Barbara a3ba760a27 Federation: separate notion of zone-name & dns-suffix
We can put subdomains into hosted zones (for example,
foo.federation.example.com can be hosted in example.com)

By allowing sharing a common hosted zone, this means the user doesn't
have to do as much setup.
2016-10-30 20:50:09 -04:00
Angus Salkeld 3a08cf0619 Correct the article in generated documents
For example:

  "a Ingress" > "an Ingress"
2016-10-31 09:46:29 +10:00
Chao Xu 850729bfaf include multiple versions in clientset
update client-gen to use the term "internalversion" rather than "unversioned";
leave internal one unqualified;
cleanup client-gen
2016-10-29 13:30:47 -07:00
Kubernetes Submit Queue 4ec036c8af Merge pull request #35452 from deads2k/auth-02-front-proxy
Automatic merge from submit-queue

allow authentication through a front-proxy

This allows a front proxy to set a request header and have that be a valid `user.Info` in the authentication chain.  To secure this power, a client certificate may be used to confirm the identity of the front proxy

@kubernetes/sig-auth fyi
@erictune per-request
@liggitt you wrote the openshift one, ptal.
2016-10-29 07:52:09 -07:00
Kubernetes Submit Queue bb9e3d3324 Merge pull request #35687 from shashidharatd/federation-ci2
Automatic merge from submit-queue

Fix federation-apiserver authentication e2e tests

**What this PR does / why we need it**: Fixes couple of federation e2e tests

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # partly fixes #35251
2016-10-29 07:12:15 -07:00
Clayton Coleman edd5262e03
generated: API docs 2016-10-28 11:30:12 -04:00
deads2k 3f9a4d51d5 wire up authenticating front proxy: 2016-10-28 08:36:46 -04:00
fmeng c2cec013de register default functions for federation/apis/core 2016-10-28 15:12:10 +08:00
shashidharatd bc62f83ff6 Fix federation-apiserver authentication e2e tests 2016-10-27 16:48:09 +05:30
Kubernetes Submit Queue dcdbf27d4f Merge pull request #34648 from nikhiljindal/NSCasDel
Automatic merge from submit-queue

Adding cascading deletion support to federated namespaces

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

With this change, whenever a federated namespace is deleted with `DeleteOptions.OrphanDependents = false`, then federation namespace controller first deletes the corresponding namespaces from all underlying clusters before deleting the federated namespace.

cc @kubernetes/sig-cluster-federation @caesarxuchao


```release-note
Adding support for DeleteOptions.OrphanDependents for federated namespaces. Setting it to false while deleting a federated namespace also deletes the corresponding namespace from all registered clusters.
```
2016-10-26 21:04:03 -07:00
Kubernetes Submit Queue ab0ee35462 Merge pull request #35651 from caesarxuchao/remove-label-selectors
Automatic merge from submit-queue

Sending #35255 again: Remove versioned LabelSelectors

ref #35255: "Remove versioned LabelSelectors"

FYI @smarterclayton
2016-10-26 18:21:22 -07:00
nikhiljindal f955d556f8 Adding cascading deletion support to federated namespaces 2016-10-26 16:54:12 -07:00
Brian Grant 2ae2339d6a Merge pull request #35546 from thockin/kill-head-scary-warning-on-master
Remove obsolete munger on docs
2016-10-26 16:44:53 -07:00
Chao Xu 0a896a9e57 remove versioned LabelSelector definitions 2016-10-26 13:50:13 -07:00
Clayton Coleman b5a46d914e
generated: conversions 2016-10-26 12:48:45 -04:00
gmarek 24975aad30 Revert "remove versioned LabelSelector definitions"
This reverts commit 1ace8fa9ce.
2016-10-26 16:52:02 +02:00
Wojciech Tyczynski bbb410c7af generated: Safe conversions 2016-10-26 11:20:37 +02:00
Chao Xu 1ace8fa9ce remove versioned LabelSelector definitions 2016-10-25 22:09:02 -07:00
Kubernetes Submit Queue fc7f64a99a Merge pull request #35388 from mbohlool/co2
Automatic merge from submit-queue

Add GroupVersion tags to OpenAPI spec and remove all specs except main one

Tags are used as a grouping mechanism in OpenAPI. We generated one spec per GroupVersion before for this grouping but by adding those tags in this PR, those files have no use. We can always add them back if there were a use-case for them.

**Release note**:

```release-note
Deprecate OpenAPI spec for GroupVersion endpoints in favor of single spec /swagger.json
```

Reference: #13414
2016-10-25 21:25:37 -07:00
Clayton Coleman d1c39c0a76
generated: Unsafe conversions 2016-10-25 19:30:34 -04:00
Tim Hockin b0fa2056a6 Remove 'this is HEAD' warning on docs 2016-10-26 00:06:59 +02:00
mbohlool cf181f91a7 Update OpenAPI specs 2016-10-25 14:27:48 -07:00
Mike Danese 763c4987f2 autogenerated 2016-10-24 14:47:27 -07:00
Mike Danese 27116c6818 rename build/ to build-tools/ 2016-10-24 14:41:56 -07:00
Kubernetes Submit Queue 33ebe1f18b Merge pull request #34905 from ingvagabund/client-to-clientset
Automatic merge from submit-queue

Replace client with clientset

Replace client with clientset in some places

Fixes: #34637
2016-10-24 05:38:43 -07:00
Marcin Wielgus 545cfb1a6f Add configmaps to federation apiserver 2016-10-24 12:09:28 +02:00
Jan Chaloupka 4fde09d308 Replace client with clientset in code 2016-10-23 22:00:35 +02:00
Dr. Stefan Schimanski 05fcc6b56a Update bazel 2016-10-22 14:31:56 +02:00
Dr. Stefan Schimanski cca05af615 Move swagger+openapi setup to routes and decouple from run 2016-10-22 13:42:22 +02:00
mbohlool a6517173ee Generated openapi spec 2016-10-22 02:43:42 -07:00
mbohlool 3e67cf8b9b Add authentication to openapi Spec 2016-10-22 02:43:42 -07:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Kubernetes Submit Queue a7807eb5a4 Merge pull request #34138 from ingvagabund/create-restclient-interface
Automatic merge from submit-queue

Create restclient interface

Refactoring of code to allow replace *restclient.RESTClient with any RESTClient implementation that implements restclient.RESTClientInterface interface.
2016-10-21 16:02:04 -07:00
Jan Chaloupka 6079053407 Update clientset generator to use RESTClient interface instead of the RESTClient data type 2016-10-21 10:13:51 +02:00
Dr. Stefan Schimanski 08d4fa5c4f Turn APIGroupPrefix into a constant 2016-10-19 11:52:15 +02:00
Clayton Coleman 4324e39393
Flag all packages as needing defaulters 2016-10-18 21:07:33 -04:00
Kubernetes Submit Queue 6931fb1830 Merge pull request #34984 from mwielgus/configmap-fed-client
Automatic merge from submit-queue

ConfigMap in federated client

cc: @quinton-hoole @nikhiljindal
2016-10-18 16:21:50 -07:00
Kubernetes Submit Queue 6e2f5f8f6d Merge pull request #28742 from jessfraz/test-go1.7rc1
Automatic merge from submit-queue

Update to go 1.7

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

Closes #33070
Closes #32999

```release-note
Updated Go to 1.7
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

This is to test go version 1.7
2016-10-18 05:59:04 -07:00
Kubernetes Submit Queue 67732d7383 Merge pull request #34967 from deads2k/api-27-fix-version
Automatic merge from submit-queue

make version an explicit choice so zero config and customized work

Makes `/version` key off of setting the version.  This allows composers to add a version that is correct.
2016-10-18 05:07:02 -07:00
Kubernetes Submit Queue 7414cafbeb Merge pull request #34860 from mbohlool/optional
Automatic merge from submit-queue

+optional tag for OpenAPI spec

OpenAPI rely on "omitempty" json tag to determine if a field is optional or not. This change will add "+optional" tag to all fields with "omitempty" json tag and support the tag in OpenAPI spec generator.
2016-10-17 22:07:00 -07:00
Marcin 31df1cb113 Autogenerated code for config map federated client 2016-10-17 23:44:47 +02:00
deads2k 5a9b16d40a make version an explicit choice so zero config and customized work 2016-10-17 16:10:07 -04:00
mbohlool 0191433d58 Generated protobufs 2016-10-17 09:11:20 -07:00
mbohlool 25afcc5522 Add +optional tag to all fields with omitempty json tag 2016-10-17 08:52:13 -07:00
deads2k 14c164a328 add ownerref permission checks 2016-10-17 09:38:05 -04:00
deads2k 7412be4465 default serializer 2016-10-14 11:27:32 -04:00
Kubernetes Submit Queue c3742a8fbe Merge pull request #34047 from deads2k/rbac-11-informer-cache
Automatic merge from submit-queue

Run rbac authorizer from cache

RBAC authorization can be run very effectively out of a cache.  The cache is a normal reflector backed cache (shared informer).

I've split this into three parts:
 1. slim down the authorizer interfaces
 1. boilerplate for adding rbac shared informers and associated listers which conform to the new interfaces
 1. wiring

@liggitt @ericchiang @kubernetes/sig-auth
2016-10-14 08:12:28 -07:00
Jess Frazelle db33b491cc
update generated protobuf
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-13 21:22:59 -07:00
deads2k fbd5032da2 split genericapiserver configuration apart so that you can run without flag options 2016-10-13 13:09:53 -04:00
Kubernetes Submit Queue dd529f3c4a Merge pull request #34551 from deads2k/api-23-remove-legacy-prefixy
Automatic merge from submit-queue

Change legacy API resource registration

Updates the legacy API resource registration to emphasize its different-ness and to simplify supporting objects.  The option has to remain in the genericapiserverconfig for multiple prefixes to enable cases where composers/extenders had composed additional groupless APIs. See OpenShift as an example.

However this is now transparent to "normal" composers.

@ncdc since sttts is out.
2016-10-13 08:23:35 -07:00
Kubernetes Submit Queue 36be3b34f6 Merge pull request #34487 from jessfraz/update-gcloud-docker-commands
Automatic merge from submit-queue

Update `gcloud docker` commands to use `gcloud docker -- ARGS`

We can then avoid the following warning:
```
WARNING: The '--' argument must be specified between gcloud specific args on the left and DOCKER_ARGS on the right. IMPORTANT: previously, commands allowed the omission of the --, and unparsed arguments were treated as implementation args. This usage is being deprecated and will be removed in March 2017.
This will be strictly enforced in March 2017. Use 'gcloud beta docker' to see new behavior.
```
2016-10-13 07:04:59 -07:00
deads2k e1638f11a3 run authorization from a cache 2016-10-13 07:53:40 -04:00
Kubernetes Submit Queue ca75b47657 Merge pull request #32555 from pweil-/admission-authorizer
Automatic merge from submit-queue

WantsAuthorizer admission plugin support

The next step of PSP admission is to be able to limit the PSPs used based on user information.  To do this the admission plugin would need to make authz checks for the `user.Info` in the request.  This code allows a plugin to request the injection of an authorizer to allow it to make the authz checks.

Note:  this could be done with a SAR, however since admission is running in the api server using the SAR would incur an extra hop vs using the authorizer directly.

@deads2k @derekwaynecarr
2016-10-13 03:40:11 -07:00
Kubernetes Submit Queue adfbe8d952 Merge pull request #33629 from mbohlool/o2
Automatic merge from submit-queue

Generate unique Operation IDs for root OpenAPI spec

This PR adds a customization method GetOperationID to OpenAPI spec generation and then use it to make sure root spec has unique operation IDs by mostly adding GroupVersion to the start of operation ID.
2016-10-12 21:06:24 -07:00
Kubernetes Submit Queue eed41cd6d4 Merge pull request #34319 from mwielgus/daemonset-controller
Automatic merge from submit-queue

Federated DaemonSet controller

Based on the secrets controller. E2e tests will come in the next PR.

**Release note**:
```release-note
Federated DaemonSet controller. Supports all the API that regular DaemonSet has.
```

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-10-12 18:24:55 -07:00
Kubernetes Submit Queue cf3e963d10 Merge pull request #34620 from madhusudancs/fed-update-charts-image-version
Automatic merge from submit-queue

[Federation] Fix bash continuation, update charts version and kubeconfig mount permission

```release-note
* New federation deployment mechanism now allows non-GCP clusters.
* Writes the federation kubeconfig to the local kubeconfig file.
```

cc @kubernetes/sig-cluster-federation
2016-10-12 17:27:23 -07:00
mbohlool f022419d6c generated openapi spec 2016-10-12 14:54:13 -07:00
mbohlool 5ba06cf2bc Make Kubernetes OpenAPI operation IDs unique 2016-10-12 14:54:12 -07:00
deads2k 6406aacb59 remove legacy API prefix from generic 2016-10-12 15:32:27 -04:00
Kubernetes Submit Queue 7d8c0fa0c9 Merge pull request #34609 from mwielgus/usespecandmeta
Automatic merge from submit-queue

Use ObjectMetaAndSpecEquivalent in federation controllers

Use util added in #34561.

cc: @quinton-hoole
2016-10-12 10:16:00 -07:00
pweil- 5c66dcb526 inject authorizer when admission controller requests it 2016-10-12 13:05:34 -04:00
Marcin Wielgus 493481efe8 Add non default replica preferences test to federation depoyment tests 2016-10-12 17:19:47 +02:00
Kubernetes Submit Queue bb74e2396e Merge pull request #34470 from mwielgus/planner-to-utils
Automatic merge from submit-queue

Move planner to federation utils

cc: @quinton-hoole @jianhuiz
2016-10-12 05:53:31 -07:00
Marcin Wielgus 6cafcc0c02 Use ObjectMetaAndSpecEquivalent in federation controllers 2016-10-12 14:08:35 +02:00
Kubernetes Submit Queue 4d882744d6 Merge pull request #34561 from mwielgus/specandmeta
Automatic merge from submit-queue

ObjectMeta and Spec equivalent function in federation utils

To be used in update in controllers.

cc: @quinton-hoole
2016-10-12 04:31:11 -07:00
Kubernetes Submit Queue 7c7bfdaf6d Merge pull request #34531 from mwielgus/checking-fun
Automatic merge from submit-queue

Checking function integrated with get from chanel in fed tests

Current federation controller tests assume that each actions results in only one etcd action. However, due to various timing issues, this may not necessary the truth and multiple updates can be generated. Thus tests should try to get all available messages from the debug channels instead failing on the first message, which may come from the previous test scenario. 

Applied to deployment tests. Other tests will be updated in the following PR(s).

cc: @quinton-hoole @wojtek-t
2016-10-12 03:14:11 -07:00
Marcin Wielgus 6a9ab3a0a6 ObjectMeta and Spec equivalent function in federation utils 2016-10-12 10:48:04 +02:00
Marcin Wielgus fa8248bd6b Move planner to federation utils 2016-10-12 10:40:01 +02:00
Madhusudan.C.S 453c46fca7 Update charts image version.
Also adjust the permissions for kubeconfig mount and fix bash line
continuation.
2016-10-12 00:15:01 -07:00
Kubernetes Submit Queue d27076c18b Merge pull request #31908 from colhom/aws-compat
Automatic merge from submit-queue

[WIP] AWS compatibility for federation cluster and e2e

I've been testing this and have reached a point where the e2e tests run, and some test failures are popping up which are not overtly related to AWS specific things.

```sh
SSSSSSSSSSSSSSSS

Summarizing 5 Failures:

[Fail] [k8s.io] [Feature:Federation] Federated Services DNS [BeforeEach] should be able to discover a federated service 
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/federation-util.go:233

[Fail] [k8s.io] [Feature:Federation] Federated Services Service creation [It] should create matching services in underlying clusters 
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/federation-util.go:233

[Fail] [k8s.io] Federated ingresses [Feature:Federation] Federated Ingresses [It] should create and update matching ingresses in underlying clusters 
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/federated-ingress.go:289

[Fail] [k8s.io] [Feature:Federation] Federated Services DNS [BeforeEach] non-local federated service [Slow] missing local service should never find DNS entries for a missing local service 
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/federation-util.go:233

[Fail] [k8s.io] [Feature:Federation] Federated Services DNS [BeforeEach] non-local federated service should be able to discover a non-local federated service 
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/federation-util.go:233

Ran 16 of 383 Specs in 519.872 seconds
FAIL! -- 11 Passed | 5 Failed | 1 Pending | 366 Skipped --- FAIL: TestE2E (519.89s)
```

\cc @quinton-hoole @madhusudancs for advice. Should I investigate further?
2016-10-11 23:43:17 -07:00
Kubernetes Submit Queue e7a095b403 Merge pull request #30745 from madhusudancs/fed-make-phases
Automatic merge from submit-queue

Separate the build recipe in federation Makefile into separate phases.

This is based on PR #30744. Please review only the last commit here.

cc @kubernetes/sig-cluster-federation @colhom
2016-10-11 21:52:54 -07:00
Colin Hom c7ee1a0749 fixup! set advertise address if not ip address 2016-10-11 11:55:00 -07:00
Marcin Wielgus bf453f8cc2 Federated DaemonSet controller 2016-10-11 19:00:22 +02:00
Marcin Wielgus 3372aef1cc Checking function integrated with get from chanel in fed tests 2016-10-11 17:09:17 +02:00
Kubernetes Submit Queue ead65fc25f Merge pull request #34334 from mwielgus/ns-delete
Automatic merge from submit-queue

Include DaemonSets and Deployments in Namespace deletion

More generic deletion should be added next week.

cc: @quinton-hoole
2016-10-11 05:46:46 -07:00
Kubernetes Submit Queue f59fd3df8d Merge pull request #34482 from mwielgus/podanalyzer
Automatic merge from submit-queue

Move pod analyzer to federated utils

Both replicaset and deployment controllers are using it.
2016-10-11 03:15:54 -07:00
Marcin Wielgus 7f472510bf Add deployments to federation apiserver 2016-10-11 10:36:35 +02:00
Kubernetes Submit Queue b3a9671cb8 Merge pull request #34245 from mwielgus/fed-api-daemons
Automatic merge from submit-queue

DaemonSets in federated apiserver

cc: @quinton-hoole @nikhiljindal
2016-10-10 23:53:57 -07:00
Jess Frazelle cde5559d09
Update `gcloud docker` commands to use `gcloud docker -- ARGS`
We can then avoid the following warning:
```
WARNING: The '--' argument must be specified between gcloud specific args on the left and DOCKER_ARGS on the right. IMPORTANT: previously, commands allowed the omission of the --, and unparsed arguments were treated as implementation args. This usage is being deprecated and will be removed in March 2017.
This will be strictly enforced in March 2017. Use 'gcloud beta docker' to see new behavior.
```

Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-10 13:42:34 -07:00
Marcin Wielgus 3cb8a46a1e Move pod analyzer to utils 2016-10-10 21:09:30 +02:00
Marcin Wielgus 47f0e738e9 Move periodic backoff gc to federation utils 2016-10-10 19:59:35 +02:00
Kubernetes Submit Queue e72f26a3ff Merge pull request #34109 from mwielgus/fed-deployment-controller
Automatic merge from submit-queue

Federated deployment controller - part 1

Based on federated replicaset controller (copy + find/replace).

Remaining stuff:
- refacing out common elements to libs
- using owerref in pod analysis
- e2e tests
- renaming concurrency flag for rs and reusing it in deployment
- updating only one cluster at a time if rollingupdate strategy is used.

cc: @quinton-hoole @kubernetes/sig-cluster-federation

**Release note**:

```release-note
Federated deployment controller that supports the same api as the regular kubernetes deployment controller.
```
2016-10-10 10:08:01 -07:00
Marcin Wielgus c9e771a7b2 Federated deployment controller - part 1 2016-10-10 16:25:05 +02:00
Kubernetes Submit Queue 0603af42c6 Merge pull request #34001 from mbohlool/h2o
Automatic merge from submit-queue

Generate and store federation OpenAPI spec in source tree

A follow up of #33628 to also add federation spec to source tree.
2016-10-08 17:46:51 -07:00
Kubernetes Submit Queue f2016df2cc Merge pull request #34054 from deads2k/testapi-01-remove-default.groupversion
Automatic merge from submit-queue

remove testapi.Default.GroupVersion

I'm going to try to take this as a series of mechanicals.  This removes `testapi.Default.GroupVersion()` and replaces it with `registered.GroupOrDie(api.GroupName).GroupVersion`.

@caesarxuchao I'm trying to see how much of `pkg/api/testapi` I can remove.
2016-10-07 20:30:34 -07:00
Colin Hom 0c562bac48 federation: aws compatibility for cluster and e2e frameworks 2016-10-07 11:25:18 -07:00
Marcin Wielgus 104c0dcb09 Include DaemonSets and Deployments in Namespace deletion 2016-10-07 17:04:19 +02:00
deads2k 518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
Marcin Wielgus e033c5fe7b Use RaceFreeFakeWatcher in federation controllers helper and ingress controller 2016-10-07 15:37:57 +02:00
mbohlool eeccee6dce Generated federation opeapi spec 2016-10-06 13:13:15 -07:00
Marcin Wielgus d16fd00d2a DaemonSets in federated apiserver 2016-10-06 21:02:28 +02:00
Kubernetes Submit Queue 41f17bd9ac Merge pull request #34158 from quinton-hoole/2016-10-05-fix-ingress-bug-mac
Automatic merge from submit-queue

Add missing argument to log message in federated ingress controller.

Minor fix, to address this:

1006 01:08:50.605184       1 ingress_controller.go:674] No annotation "kubernetes.io/ingress.global-static-ip-name" exists on ingress "e2e-tests-federated-ingress-2787b/federated-ingress" in federation, and index of cluster "federation-e2e-gce-us-central1-f" is 1 and not zero.  Not queueing create operation for ingress *%!q(MISSING)* until annotation exists
2016-10-06 11:43:58 -07:00
Kubernetes Submit Queue 42e5f95a6b Merge pull request #34024 from deads2k/controller-06-deployment-controller
Automatic merge from submit-queue

update deployment and replicaset listers

Updates the deployment lister to avoid copies and updates the deployment controller to use shared informers.

Pushing WIP to see which tests are broken.
2016-10-06 00:02:34 -07:00
Kubernetes Submit Queue 45e5719c2c Merge pull request #33792 from caesarxuchao/decouple-workqueue-prometheus
Automatic merge from submit-queue

decouple workqueue metrics from prometheus

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
We want to include the workqueue in client-go, but do not want to having to import Prometheus. This PR decouples the workqueue from prometheus.

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

Partially address https://github.com/kubernetes/kubernetes/issues/33497
User requested for `workqueue` in client-go: https://github.com/kubernetes/client-go/issues/4#issuecomment-249444848

**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
The implicit registration of Prometheus metrics for workqueue has been removed, and a plug-able interface was added. If you were using workqueue in your own binaries and want these metrics, add the following to your imports in the main package: "k8s.io/pkg/util/workqueue/prometheus".
```
2016-10-05 22:10:11 -07:00
Quinton Hoole 68c0c5ddea Add missing argument to log message in federated ingress controller. 2016-10-05 18:20:12 -07:00
Kubernetes Submit Queue bd3664cbef Merge pull request #34000 from wojtek-t/set_cache_size
Automatic merge from submit-queue

Set deserialization cache size based on target memory usage

**Special notes for your reviewer**:

This is the PR we talked about yesterday.

**Release note**:

```release-note
To reduce memory usage to reasonable levels in smaller clusters, kube-apiserver now sets the deserialization cache size based on the target memory usage.
```
2016-10-05 14:23:39 -07:00
deads2k c30b2efc46 update replicaset lister 2016-10-05 15:20:27 -04:00
Marcin 64d5335f98 Daemonset in federated clientset 2016-10-05 19:58:49 +02:00
Dr. Stefan Schimanski 68cee1d9ac Make genericapiserver handler chain customizable 2016-10-05 10:32:36 -04:00
Marcin 34753b6950 Add deployment to federation clientset 2016-10-05 13:43:59 +02:00
Wojciech Tyczynski 2bfcb1a850 Set deserialization cache size based on target memory usage 2016-10-05 10:00:02 +02:00
Chao Xu a3861b9cb9 generated 2016-10-04 20:39:29 -07:00
Chao Xu 75cc05de82 manual changes to let client-gen use versioned options 2016-10-04 20:39:29 -07:00
Kubernetes Submit Queue 649f6dbf61 Merge pull request #33846 from deads2k/api-20-server-needs-serving-info
Automatic merge from submit-queue

stop plumbing options to start

The API server should have sufficient information to start itself without relying on an `options` object from a different packages focused on CLI interaction.  This provides that separation

@liggitt distinct from other changes
2016-10-04 08:46:08 -07:00
Seth Jennings 98ff390a63 wait for store update before modify 2016-10-03 13:56:50 -05:00
Chao Xu feb0d1daa8 decouple workqueue metrics from prometheus 2016-10-03 11:02:06 -07:00
deads2k 8eddc7158b stop plumbing options to start 2016-10-03 13:35:00 -04:00
Ilya Dmitrichenko abc0a98d25
Replace references to http://releases.k8s.io/HEAD/docs/user-guide/ 2016-10-02 11:44:40 +01:00
Kubernetes Submit Queue 6a1622a723 Merge pull request #33785 from deads2k/api-16-pass-config-to-hook
Automatic merge from submit-queue

pass loopback config to poststart hooks

Updates post start hooks to take a clientconfig with the new loopback credentials for bootstrapping.

@ericchiang This is a little bit of plumbing, but mainly auth I think.
2016-10-01 10:27:04 -07:00
deads2k 57039cfdfa make well-known users and groups into constants 2016-09-30 10:34:33 -04:00
deads2k 4c8959df59 pass loopback config to posthooks 2016-09-30 10:34:33 -04:00
Kubernetes Submit Queue 91faaa802d Merge pull request #33769 from mwielgus/copy-test
Automatic merge from submit-queue

Copy objects in federation test helper

Push clean copies of passed objects in test helper in federation controllers tests.

Fixes: #33667

cc: @gmarek @quinton-hoole @kubernetes/sig-cluster-federation
2016-09-30 06:13:23 -07:00
Marcin Wielgus 426857a9f5 Copy objects in federation test helper 2016-09-30 13:41:19 +02:00
Kubernetes Submit Queue 54ab8609ef Merge pull request #33605 from quinton-hoole/2016-09-27-fix-fed-e2e-resource-cleanup
Automatic merge from submit-queue

Use UpdateStatus, not Update, to add LoadBalancerStatus to Federated Ingress.

See https://github.com/kubernetes/kubernetes/pull/33502 for detailed description.
2016-09-29 17:58:56 -07:00
deads2k 5080a575ad add anytoken authenticator 2016-09-29 14:14:06 -04:00
Kubernetes Submit Queue d187997c94 Merge pull request #32386 from liggitt/anonymous-authenticated-groups
Automatic merge from submit-queue

Allow anonymous API server access, decorate authenticated users with system:authenticated group

When writing authorization policy, it is often necessary to allow certain actions to any authenticated user. For example, creating a service or configmap, and granting read access to all users

It is also frequently necessary to allow actions to any unauthenticated user. For example, fetching discovery APIs might be part of an authentication process, and therefore need to be able to be read without access to authentication credentials.

This PR:
* Adds an option to allow anonymous requests to the secured API port. If enabled, requests to the secure port that are not rejected by other configured authentication methods are treated as anonymous requests, and given a username of `system:anonymous` and a group of `system:unauthenticated`. Note: this should only be used with an `--authorization-mode` other than `AlwaysAllow`
* Decorates user.Info returned from configured authenticators with the group `system:authenticated`.

This is related to defining a default set of roles and bindings for RBAC (https://github.com/kubernetes/features/issues/2). The bootstrap policy should allow all users (anonymous or authenticated) to request the discovery APIs.

```release-note
kube-apiserver learned the '--anonymous-auth' flag, which defaults to true. When enabled, requests to the secure port that are not rejected by other configured authentication methods are treated as anonymous requests, and given a username of 'system:anonymous' and a group of 'system:unauthenticated'. 

Authenticated users are decorated with a 'system:authenticated' group.

NOTE: anonymous access is enabled by default. If you rely on authentication alone to authorize access, change to use an authorization mode other than AlwaysAllow, or or set '--anonymous-auth=false'.
```

c.f. https://github.com/kubernetes/kubernetes/issues/29177#issuecomment-244191596
2016-09-29 10:47:49 -07:00
Dr. Stefan Schimanski 8391a19b57 Decouple defaulting from genericapiserver and master 2016-09-28 23:16:09 +02:00
Kubernetes Submit Queue dc06ceb87d Merge pull request #32246 from caesarxuchao/fed-1.5
Automatic merge from submit-queue

Update federation controllers to use release 1.5 clientset

This PR is based on #32243, we won't merge it until next week, to make cherry-picks easier.
2016-09-28 04:17:20 -07:00
Kubernetes Submit Queue a824e56ce5 Merge pull request #33155 from guangxuli/k8s_test_0921
Automatic merge from submit-queue

directly break the loop if condition map
2016-09-27 19:53:06 -07:00
Chao Xu a780db9a03 changes in federation controllers 2016-09-27 14:33:24 -07:00
Quinton Hoole 894a4e226f Use UpdateStatus, not Update, to add LoadBalancerStatus to Federated Ingress. 2016-09-27 13:29:38 -07:00
Quinton Hoole f74b40ed81 Add better logging if IP addres updates. 2016-09-27 13:29:37 -07:00
Quinton Hoole 99aac62a5a Add periodic ingress reconciliations. 2016-09-27 13:29:37 -07:00
Kubernetes Submit Queue 294c9aa630 Merge pull request #33469 from thockin/autoconvert_cleanups
Automatic merge from submit-queue

Autoconvert cleanups

A few accumulated cleanups to conversion, and then a big change.  Please review commit-by-commit.  Verified by nuking all generated files and comparing the new results.

cc @lavalamp
2016-09-27 06:15:21 -07:00
Kubernetes Submit Queue 1e7fa1f6cd Merge pull request #33334 from caesarxuchao/copy-auth-plugin
Automatic merge from submit-queue

Copy auth plugin to client-go repo

client-go doesn't copy the [auth plugin](https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/client/auth/plugins.go). This causes user cannot access cluster run by GKE. User will see error "No Auth Provider found for name gcp".

This PR fixes this issue. It's marked as WIP because I'll need to rebase after #32906 gets merged. Also, the fix needs to be cherry-picked into 1.4 branch to update client-go/1.4.
2016-09-27 02:30:38 -07:00
Tim Hockin 7efb2d4738 Always emit autoConvert funcs, but call for help
Previously we refused to emit 'autoConvert_*' functions if any field was not
convertible.  The way around this was to write manual Conversion functions, but
to do so safely you must handle every fields.  Huge opportunity for errors.

This PR cleans up the filtering such that it only operates on types that should
be converted (remove a lot of code) and tracks when fields are skipped.  In
that case, it emits an 'autoConvert' function but not a public 'Convert'
function.  If there is no manual function, the compile will fail.

This also means that manual conversion functions can call autoConvert functions
and then "patch up" what they need.
2016-09-26 20:07:54 -07:00
Chao Xu a397e306a4 run client-gen
run copy.sh
2016-09-26 15:40:36 -07:00
Jordan Liggitt 0c36c5e556
Add anonymous auth to the auth chain 2016-09-26 17:19:00 -04:00
Hongchao Deng 6f3ac807fd pass SelectionPredicate instead of Filter to storage layer 2016-09-26 09:47:19 -07:00
Jordan Liggitt 2ac293a0bd
Put loopback authn/authz first in chain 2016-09-25 20:33:25 -04:00
Kubernetes Submit Queue 46c36fc04f Merge pull request #33359 from shashidharatd/federation
Automatic merge from submit-queue

Fix goroutine leak in federation service controller

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: Fixes a memory leak

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

**Special notes for your reviewer**: Every second new goroutines are created and are getting blocked waiting for the lock in the event queue. only one worker will get a lock when there are some events to process, so all the goroutines which are created every second waits for the lock forever and causes the memory/goroutine leak.

As a fix the new worker will be created only when there is no worker exist. and only one worker per cluster either waits for the event or processes all the events and goes out of existence.

```release-note
Fixes memory/goroutine leak in Federation Service controller.
```
2016-09-24 01:30:27 -07:00