Commit Graph

1210 Commits (9dae6a734a8cf39d3c4864dae181847c50c5a5dd)

Author SHA1 Message Date
Kubernetes Submit Queue 6c9a4139f3 Merge pull request #38614 from soltysh/remove_ext_jobs
Automatic merge from submit-queue (batch tested with PRs 37468, 36546, 38713, 38902, 38614)

Remove extensions/v1beta1 Job

Fixes https://github.com/kubernetes/kubernetes/issues/32763. This endpoint was deprecated in 1.5 and was planned to be removed in 1.6. 

**Release note**:
```release-note
Remove extensions/v1beta1 Jobs resource, and job/v1beta1 generator.
```
2016-12-16 18:55:37 -08:00
Maciej Szulik cdec94523e Remove extensions/v1beta1 Job - generated changes 2016-12-17 00:07:25 +01:00
Madhusudan.C.S 5d8885dc72 [Federation] Remove unnecessary functions from develop.sh as part of deploy.sh deprecation.
This is part of a big refactor to deprecate a short-lived deploy.sh
mechanism that nobody really could use due to bugs.
2016-12-16 13:19:24 -08:00
Dr. Stefan Schimanski 7adaac79ca Update bazel 2016-12-16 17:49:23 +01:00
Robert Rati 11c577f092 [scheduling] Auto-generated file updates from moving node affinity from
annotations to api fields. #35518
2016-12-16 11:42:43 -05:00
Dr. Stefan Schimanski 5e8ca29a76 Clean up apiserver and federation defaulting and validation 2016-12-16 17:23:43 +01:00
shashidharatd b58216e333 Stop cleaning federation namespace in e2e tests 2016-12-16 14:21:40 +05:30
shashidharatd fd01ed8fdb [Federation][init-11.2] use USE_KUBEFED env var to choose bw old and new federation deployment 2016-12-16 11:22:44 +05:30
Madhusudan.C.S 5a7644c502 [Federation][init-11] Switch federation e2e tests to use the new federation control plane bootstrap via the `kubefed init` command. 2016-12-16 11:22:44 +05:30
jianhuiz 13b76697a3 add generated federation clientsets for batch/Job 2016-12-15 11:38:16 -08:00
Kubernetes Submit Queue 23cd9d7b05 Merge pull request #38736 from ixdy/build-tools-rename-back
Automatic merge from submit-queue

Rename root BUILD to BUILD.bazel, and rename build-tools/ back to build/

**What this PR does / why we need it**: undoes #35453. `build-tools/` was intended to be a temporary workaround until https://github.com/bazelbuild/bazel/issues/552 was fixed, which is has been, as of bazel 0.4.1.

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

FYI @thockin 

since this is likely to be rebase hell, my list of actions:
```console
$ git mv BUILD BUILD.bazel
$ git commit -a
$ git mv build-tools/ build/
$ sift -l 'build-tools' | xargs sed -i -e 's:build-tools/:build/:g'
$ git checkout HEAD docs/
$ git commit -a
```
2016-12-14 16:01:00 -08:00
Kubernetes Submit Queue d8efc779ed Merge pull request #38154 from caesarxuchao/rename-release_1_5
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Rename "release_1_5" clientset to just "clientset"

We used to keep multiple releases in the main repo. Now that [client-go](https://github.com/kubernetes/client-go) does the versioning, there is no need to keep releases in the main repo. This PR renames the "release_1_5" clientset to just "clientset", clientset development will be done in this directory.

@kubernetes/sig-api-machinery @deads2k 

```release-note
The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go
```
2016-12-14 14:21:51 -08:00
Jeff Grafton 27d096d27d Rename build-tools/ back to build/ 2016-12-14 13:42:15 -08:00
Chao Xu 6709b7ada2 run hack/update-codegen.sh
run hack/verify-gofmt.sh
update bazel
2016-12-14 12:39:49 -08:00
Chao Xu 28c2ed2c8d manually update import_known_versions.go 2016-12-14 12:39:49 -08:00
Chao Xu c81057be2c move federation_release_1_5 to federation_clientset 2016-12-14 12:39:49 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Kubernetes Submit Queue 6fa4042211 Merge pull request #38690 from sttts/sttts-swagger-postbuildhandler
Automatic merge from submit-queue

genericapiserver: unify swagger and openapi in config

- make swagger config customizable
- remove superfluous `Config.Enable*` flags for OpenAPI and Swagger.

This is necessary for downstream projects to tweak the swagger spec.
2016-12-14 11:11:02 -08:00
Dr. Stefan Schimanski cab89a67df genericapiserver: unify swagger and openapi in config 2016-12-14 18:41:04 +01:00
Dr. Stefan Schimanski 543417dbf0 Replace apiserver glog.Fatals with fmt.Errorfs 2016-12-14 09:35:47 +01:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Kubernetes Submit Queue e092d3f47b Merge pull request #38571 from madhusudancs/fed-federation-api-getoptions
Automatic merge from submit-queue

Register metav1.GetOptions with federation APIs.

PR #37693 missed a spot.

cc @kubernetes/sig-federation @nikhiljindal
2016-12-11 19:24:29 -08:00
Madhusudan.C.S 8c63a14e5e Register metav1.GetOptions with federation APIs.
PR #37693 missed a spot.
2016-12-10 16:35:08 -08:00
Clayton Coleman d06be8dc1f
refactor: update swagger specs 2016-12-10 18:05:57 -05:00
Clayton Coleman 3c72ee2189
Change references to OwnerReference 2016-12-10 18:05:36 -05:00
Jordan Liggitt 4536388909
Update bazel 2016-12-09 16:26:06 -05:00
Jordan Liggitt 711986876b
Remove generated codecs for internal types 2016-12-09 16:26:04 -05:00
Jordan Liggitt d5afb71cf4
Remove json serialization annotations from internal types 2016-12-09 16:26:03 -05:00
Kubernetes Submit Queue 5b5b1e7533 Merge pull request #38371 from wojtek-t/get_options_in_client
Automatic merge from submit-queue (batch tested with PRs 38354, 38371)

Add GetOptions parameter to Get() calls in client library

Ref #37473 

This PR is super mechanical - the non trivial commits are:
- Update client generator
- Register GetOptions in batch/v2alpha1 group
2016-12-09 04:12:09 -08:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Wojciech Tyczynski cff55e5894 Autogenerate clients 2016-12-09 09:42:01 +01:00
Kubernetes Submit Queue 98c4c73c71 Merge pull request #37770 from enj/enj/r/storage_decorator
Automatic merge from submit-queue (batch tested with PRs 38278, 37770)

Refactor REST storage to use generic defaults

This removes the repetition in the REST storage builders by moving the logic to `restoptions.ApplyOptions`.  `registry.StorageWithCacher`/`generic.StorageDecorator` no longer assume that they can build the `keyFunc` for arbitrary objects.  `restoptions.ApplyOptions` uses the `registry.Store`'s `KeyFunc` for its call to `generic.StorageDecorator`.

```release-note
Cluster federation servers have changed the location in etcd where federated services are stored, so existing federated services must be deleted and recreated. Before upgrading, export all federated services from the federation server and delete the services. After upgrading the cluster, recreate the federated services from the exported data.
```
2016-12-09 00:25:35 -08:00
Kubernetes Submit Queue 129f5d8b95 Merge pull request #38278 from hodovska/external-name-no-ports
Automatic merge from submit-queue

API v1: do not require ports for all types of services

Ports values had to be specified for all types of services but object with service type "ExternalName" does't define ports. That's why we had to remove required condition.
Presence of ports in service types where ports are actually required is verified here: 
https://github.com/kubernetes/kubernetes/blob/master/pkg/api/validation/validation.go#L2439

For more information about ExternalName services see:
http://kubernetes.io/docs/user-guide/services/#services-without-selectors

Fixes https://github.com/kubernetes/kubernetes/issues/34394
2016-12-08 23:43:14 -08:00
Jordan Liggitt da15bd9260
Update client status generator to not use json tags 2016-12-08 21:58:01 -05:00
Kubernetes Submit Queue 133117e146 Merge pull request #35116 from shashidharatd/fed-coredns-provider
Automatic merge from submit-queue

Add CoreDNS as Federation DNS provider

This PR contains following
1. DNS provider implementation for CoreDNS with etcd as backend
2. Script for optionally deploying CoreDNS in federation control plane

Still to do:
1. HA for CoreDNS service need to be handled, would be taken up in subsequent PR
2. Need to configure CoreDNS as fallback DNS to in-cluster KubeDNS(Manual Step). Need to consider automation.

Request for review: @quinton-hoole @madhusudancs @nikhiljindal @kshafiee @deepak-vij
cc @kubernetes/sig-cluster-federation
2016-12-08 18:50:05 -08:00
Kubernetes Submit Queue b0b6f3c256 Merge pull request #38401 from liggitt/addressable-deep-copy
Automatic merge from submit-queue (batch tested with PRs 36071, 32752, 37998, 38350, 38401)

Pass addressable values to DeepCopy

Extracted from https://github.com/kubernetes/kubernetes/pull/35728

These are the places we are currently calling DeepCopy incorrectly, and we need to fix, even if we don't pick up the changes to DeepCopy in #35728:
* creating a new cloner means we have no generated functions registered
* passing non-addressable values doesn't pick up generated deep copy functions, and forces us into reflective mode
2016-12-08 16:26:00 -08:00
Kubernetes Submit Queue 8182f178f6 Merge pull request #36447 from irfanurrehman/federation-kubefed-todo-2
Automatic merge from submit-queue

[Federation] Implement dry run support in kubefed init

This one implements one of the TODO items pending in the previous set of kubefed PRs.
This one is done on top of another todo PR https://github.com/kubernetes/kubernetes/pull/36310 which is being reviewed separately.
Please review only the last 2 commits in this one.
The design doc PR for kubefed is at https://github.com/kubernetes/kubernetes/pull/34484.

cc  @kubernetes/sig-cluster-federation  @madhusudancs @nikhiljindal



**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`. 
-->
``` 
[Federation] `kubefed init` now supports dry run mode. 
```
2016-12-08 14:32:08 -08:00
Monis Khan a6bafbacbf
Refactor REST storage to use generic defaults
Signed-off-by: Monis Khan <mkhan@redhat.com>
2016-12-08 17:24:21 -05:00
Kubernetes Submit Queue 702c33a564 Merge pull request #36310 from irfanurrehman/federation-kubefed-todo-1
Automatic merge from submit-queue

[Federation] Make federation etcd PVC size configurable

This one implements one of the many TODO items pending in the previous set of kubefed PRs.
The design doc PR is at https://github.com/kubernetes/kubernetes/pull/34484

cc  @kubernetes/sig-cluster-federation  @madhusudancs



**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`. 
-->
``` 
[Federation] kubefed init now has a new flag, --etcd-pv-capacity, which can be used to configure the persistent volume capacity for etcd.  
```
2016-12-08 13:03:07 -08:00
Jordan Liggitt 6819706adf
Pass addressable values to DeepCopy 2016-12-08 14:16:01 -05:00
yarntime@163.com c747586b07 fix typo 2016-12-08 09:56:01 +08:00
Dominika Hodovska cb82ef8a60 API v1: ports are not required for all services 2016-12-07 12:20:28 +01:00
Kubernetes Submit Queue d6b9a7aa60 Merge pull request #37693 from wojtek-t/pipe_get_options_to_storage
Automatic merge from submit-queue (batch tested with PRs 37693, 38085)

Pipe get options to storage

Ref #37473
2016-12-07 00:52:26 -08:00
Kubernetes Submit Queue e56b1ec1cd Merge pull request #38173 from yarntime/fix_typo_in_ingress
Automatic merge from submit-queue

fix typo in ingress

fix typo.
2016-12-06 21:11:05 -08:00
Kubernetes Submit Queue cbf497b749 Merge pull request #38119 from liggitt/long-running
Automatic merge from submit-queue (batch tested with PRs 37032, 38119, 38186, 38200, 38139)

Detect long-running requests from parsed request info

Follow up to https://github.com/kubernetes/kubernetes/pull/36064

Uses parsed request info to more tightly match verbs and subresources

Removes regex-based long-running request path matching (which is easily fooled)

```release-note
The --long-running-request-regexp flag to kube-apiserver is deprecated and will be removed in a future release. Long-running requests are now detected based on specific verbs (watch, proxy) or subresources (proxy, portforward, log, exec, attach).
```
2016-12-06 18:29:35 -08:00
Kubernetes Submit Queue d4d6a32e9b Merge pull request #38123 from deads2k/api-48-remove-fields
Automatic merge from submit-queue (batch tested with PRs 38194, 37594, 38123, 37831, 37084)

remove unnecessary fields from genericapiserver config

Cleans up some unnecessary fields in the genericapiserver config.
2016-12-06 17:41:33 -08:00
deads2k b723333be3 move APIResourceConfigSource to master 2016-12-06 10:19:25 -05:00
deads2k 6ea1d5d53d join client CA bundles into the accept path for genericapiserver 2016-12-06 09:56:13 -05:00
deads2k fbb35b72ed update delegating auth to include front-proxy 2016-12-06 09:40:07 -05:00
deads2k 4f625db133 move client-ca to authentication args 2016-12-06 09:34:49 -05:00
Wojciech Tyczynski c8711f29a5 Update autogenerated files 2016-12-06 12:25:57 +01:00
shashidharatd 2807e8050e Implement CoreDNS as external dns provider for federation 2016-12-06 16:20:55 +05:30
Wojciech Tyczynski 3432fea8b2 Pipe GetOptions to storage 2016-12-06 11:48:37 +01:00
yarntime@163.com 16c582ed37 fix typo 2016-12-06 17:18:25 +08:00
Kevin Wang 007d7a802f Add option to disable federation ingress controller 2016-12-06 15:14:21 +11:00
Jordan Liggitt 4359054616
Detect long-running requests from parsed request info 2016-12-05 16:46:28 -05:00
deads2k 2923d09091 remove rbac super user 2016-12-05 13:49:54 -05:00
Marcin Wielgus b70e194fea Enable update tests in federated namespace controller 2016-12-05 19:40:54 +01:00
Kubernetes Submit Queue 5e41d0904f Merge pull request #37830 from sttts/sttts-stratify-cert-generation
Automatic merge from submit-queue

Stratify apiserver cert generation

- move self-signed cert generation to `SecureServingOptions.MaybeDefaultWithSelfSignedCerts`
- make cert generation only depend on `ServerRunOptions`, not on an unfinished `Config` (this breaks the chicken-egg problem of a finished config in https://github.com/kubernetes/kubernetes/pull/35387#pullrequestreview-5368176)
- move loopback client config code into `config_selfclient.go`

Replaces https://github.com/kubernetes/kubernetes/pull/35387#event-833649341 by getting rid of duplicated `Complete`.
2016-12-05 10:15:47 -08:00
Dr. Stefan Schimanski 3f01c37b9d Update generated files 2016-12-05 16:05:52 +01:00
Kubernetes Submit Queue 45a436ac24 Merge pull request #36909 from sttts/sttts-discovery-with-verbs
Automatic merge from submit-queue (batch tested with PRs 37370, 37003, 36909)

Add verbs to APIResourceInfo for discovery

Verbs will be used by generic controllers (gc, namespace) to avoid unnecessary API calls, reducing load on the apiserver. E.g. not all objects can be deleted.

Example:
```json
{
  "kind": "APIResourceList",
  "apiVersion": "v1",
  "groupVersion": "batch/v1",
  "resources": [
    {
      "name": "jobs",
      "namespaced": true,
      "kind": "Job",
      "verbs": [
        "create",
        "delete",
        "deletecollection",
        "get",
        "list",
        "update",
        "watch"
      ]
    },
    {
      "name": "jobs/status",
      "namespaced": true,
      "kind": "Job",
      "verbs": [
        "create",
        "get"
      ]
    }
  ]
}
```
2016-12-05 06:48:41 -08:00
Dr. Stefan Schimanski 5b1d45bc15 Stratify certificate loading and self-sign cert generation
This removes all dependencies on Config during cert generation, only operating
on ServerRunOptions. This way we get rid of the repeated call of Config.Complete
and cleanly stratify the GenericApiServer bootstrapping.
2016-12-05 14:58:15 +01:00
Marcin 3b255d8955 Bazel update for federated secret controller tests 2016-12-05 13:00:21 +01:00
Marcin Wielgus 3e61baf3f0 Enable update tests for federated secret controller 2016-12-05 12:58:33 +01:00
Dr. Stefan Schimanski 2dff13f332 Update generated files 2016-12-05 12:42:31 +01:00
Kubernetes Submit Queue 444e082441 Merge pull request #37476 from wojtek-t/get_options
Automatic merge from submit-queue

Create GetOptions to allow passing "ResourceVersion" to GET requests.

Ref #37473

@kubernetes/sig-api-machinery @smarterclayton
2016-12-05 03:20:02 -08:00
Kubernetes Submit Queue 778bab2b81 Merge pull request #37407 from mwielgus/ingress_ctrl_fix
Automatic merge from submit-queue

Enable updates in federated ingress controller tests

And make channel in test helper non-blocking.

cc: @nikhiljindal @madhusudancs
2016-12-05 02:41:44 -08:00
Wojciech Tyczynski c1699253ff Regenerate autogenerated files 2016-12-05 09:18:57 +01:00
Clayton Coleman 3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman 5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Dr. Stefan Schimanski 1f5511b131 Move RESTStorageProvider interface into pkg/master 2016-12-03 18:35:15 +01:00
yupeng 31c46e1d2c error strings should not end with punctuation
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-12-03 15:42:47 +08:00
Kubernetes Submit Queue cd560926bd Merge pull request #36889 from wojtek-t/reuse_fields_and_labels
Automatic merge from submit-queue

Reuse fields and labels

This should significantly reduce memory allocations in apiserver in large cluster.
Explanation:
- every kubelet is refreshing watch every 5-10 minutes (this generally is not causing relist - it just renews watch)
- that means, in 5000-node cluster, we are issuing ~10 watches per second
- since we don't have "watch heartbets", the watch is issued from previously received resourceVersion
- to make some assumption, let's assume pods are evenly spread across pods, and writes for them are evenly spread - that means, that a given kubelet is interested in 1 per 5000 pod changes
- with that assumption, each watch, has to process 2500 (on average) previous watch events
- for each of such even, we are currently computing fields.

This PR is fixing this problem.
2016-12-02 21:49:43 -08:00
Kubernetes Submit Queue efa42b95a6 Merge pull request #37532 from smarterclayton/remove_export
Automatic merge from submit-queue

Remove ExportOptions from api/internal and use unversioned

Should only have one internal object in use

Part of #37530
2016-12-02 21:11:56 -08:00
Marcin be979ac276 Update bazel for ingress tests 2016-12-02 15:13:14 +01:00
Marcin Wielgus ac8184dfcc Ingress test fixes 2016-12-02 15:13:08 +01:00
Marcin a50b8c9ab3 Bazel update 2016-12-01 15:15:29 +01:00
Marcin Wielgus 741aa4898e Enable update unit test in federated daemonset controller 2016-12-01 15:15:26 +01:00
Kubernetes Submit Queue b0fd700f61 Merge pull request #36604 from deads2k/api-42-add-generic-loopback
Automatic merge from submit-queue

move parts of the mega generic run struct out

This splits the main `ServerRunOptions` into composeable pieces that are bindable separately and adds easy paths for composing servers to run delegating authentication and authorization.

@sttts @ncdc alright, I think this is as far as I need to go to make the composing servers reasonable to write.  I'll try leaving it here
2016-11-30 21:11:05 -08:00
Kubernetes Submit Queue 737edd02a4 Merge pull request #35258 from feiskyer/package-aliase
Automatic merge from submit-queue

Fix package aliases to follow golang convention

Some package aliases are not not align with golang convention https://blog.golang.org/package-names. This PR fixes them. Also adds a verify script and presubmit checks.

Fixes #35070.

cc/ @timstclair @Random-Liu
2016-11-30 16:39:46 -08:00
Kubernetes Submit Queue 9068bdc693 Merge pull request #37572 from mwielgus/ing-fix-loop
Automatic merge from submit-queue

Fix infinte loop in federated ingress controller

Previously ingress controller was constantly scheduling reconcilation, even if no updates were needed. That behavior creates a big mess in the logs and consumes resources. 

This pr also fixes the stop function for federated ingress controller.

cc: @nikhiljindal @madhusudancs
2016-11-30 10:00:51 -08:00
Kubernetes Submit Queue d9fcabcbd0 Merge pull request #37290 from mwielgus/rev-fed-dep
Automatic merge from submit-queue

Revision handling in federated deployment controller

Deployment controller in regular kubernetes automatically adds an annotation in deployment. This causes a bit of confusion in controller and tests. This PR skips revision annotation in checks. In the next K8S release we will need to have better support for deployment revisions. 

Helps with #36588

cc: @nikhiljindal @madhusudancs
2016-11-30 09:21:25 -08:00
Kubernetes Submit Queue d51f07b60d Merge pull request #37353 from nikhiljindal/serviceDelete
Automatic merge from submit-queue

Stop deleting underlying services when federation service is deleted

Fixes https://github.com/kubernetes/kubernetes/issues/36799

Fixing federation service controller to not delete services from underlying clusters when federated service is deleted.
None of the federation controller should do this unless explicitly asked by the user using DeleteOptions. This is the only federation controller that does that.

cc @kubernetes/sig-cluster-federation @madhusudancs

```release-note
federation service controller: stop deleting services from underlying clusters when federated service is deleted.
```
2016-11-30 06:02:39 -08:00
Pengfei Ni f584ed4398 Fix package aliases to follow golang convention 2016-11-30 15:40:50 +08:00
Kubernetes Submit Queue 631612028a Merge pull request #37323 from nikhiljindal/firstClusterPR
Automatic merge from submit-queue

Fixing the logic to select first cluster in federated ingress controller

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

Before this change, ingress controller was using cluster with clusterIndex = 0 as the first cluster to create the ingress in.
But the ordering of clusters can change and hence ingress controller ended up creating the ingress in multiple clusters.
This PR fixes it by using an annotation on federated ingress. Controller now picks up a cluster randomly as the first cluster and creates ingress there. This clusters name is stored as an annotation on the federated ingress. Contoller does not create an ingress in any other cluster if this annotation is set on the federated ingress and IP has not been propagated. Once IP has been propagated, controller creates the ingress in all clusters.

cc @kubernetes/sig-cluster-federation @madhusudancs
2016-11-29 09:00:14 -08:00
deads2k ab9a842f3c add loopback auth defaulting to generic apiserver 2016-11-29 11:02:35 -05:00
deads2k ca2b5f136e split authorization from main options struct 2016-11-29 10:59:43 -05:00
deads2k 5cea15ac9f add delegating auth options 2016-11-29 10:59:43 -05:00
deads2k 7c0e48f544 split out authentication options 2016-11-29 10:59:43 -05:00
deads2k 56b7a8b02b remove some options from mega-struct 2016-11-29 10:59:43 -05:00
deads2k 18074d7606 split insecure serving options 2016-11-29 10:59:42 -05:00
deads2k a08f3ba521 split secure serving options 2016-11-29 10:59:42 -05:00
deads2k a9af8206cb split generic etcdoption out of main struct 2016-11-29 10:59:42 -05:00
Kubernetes Submit Queue 460619ec6c Merge pull request #37091 from kargakis/doc-fix
Automatic merge from submit-queue

extensions: fix api doc for maxUnavailable

Fixes https://github.com/kubernetes/kubernetes/issues/37083

@kubernetes/deployment
2016-11-29 07:33:28 -08:00
Wojciech Tyczynski 36e6cd19e1 Cache fields for filtering in watchCache. 2016-11-29 09:48:09 +01:00
Marcin Wielgus d3155002b8 Fix infinte loop in federated ingress controller 2016-11-28 21:42:06 +01:00
Kubernetes Submit Queue 968aae020f Merge pull request #36354 from bboreham/fed-readme-links
Automatic merge from submit-queue

Fix doc links in Federation readme

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

The user guide and admin guide links were swapped round

**Release note**: NONE
2016-11-28 11:42:20 -08:00
Clayton Coleman 0b1a806181
generated: remove ExportOptions 2016-11-27 23:21:10 -05:00
Clayton Coleman 3dde81f8d0
Remove references to v1/internal ExportOptions 2016-11-27 23:21:06 -05:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Chao Xu bcc783c594 run hack/update-all.sh 2016-11-23 15:53:09 -08:00
Chao Xu eca157588d federation 2016-11-23 15:53:09 -08:00
nikhiljindal 34eae2207e Stop deleting underlying services when federation service is deleted 2016-11-23 13:02:39 -08:00
nikhiljindal 63799452b2 Fixing the logic to select first cluster in federated ingress controller 2016-11-23 10:54:29 -08:00
Kubernetes Submit Queue 5c918def7a Merge pull request #36602 from jianhuiz/federation-replicaset-controller-ready-available-replicas
Automatic merge from submit-queue

populate ready replicas and aviable replicas to federated replicaset …

populate ready replicas and aviable replicas to federated replicaset status

@nikhiljindal #33312
#29481 #32771

@deepak-vij
2016-11-22 20:45:24 -08:00
Kubernetes Submit Queue 280560a1eb Merge pull request #37271 from nikhiljindal/E2edsi
Automatic merge from submit-queue

Fixing the ingress annotation key in federated ingress controller

Fixing a few issues found during debugging https://github.com/kubernetes/kubernetes/issues/36074.

cc @kubernetes/sig-cluster-federation @madhusudancs @bprashanth
2016-11-22 16:10:04 -08:00
Marcin Wielgus 11b9706a19 Revision handling in federated deployment controller 2016-11-22 16:20:15 +01:00
Michail Kargakis 831baed2a4 extensions: fix api doc for maxUnavailable 2016-11-22 14:00:16 +01:00
nikhiljindal e98e335718 Fixing the ingress annotation key in federated ingress controller 2016-11-21 22:49:02 -08:00
Kubernetes Submit Queue 67dc87395b Merge pull request #36869 from madhusudancs/kubefed-join-context-secret-name-flags
Automatic merge from submit-queue

[Federation][join-flags] Add flags for cluster context and secret names while joining clusters to federation.

Vast majority of cluster contexts are not RFC 1123 subdomains. Since
cluster and secret names for the API objects are derived from the
cluster context name, there is no way for users to join clusters
with such context names to federation, unless they modify the context
name in their kubeconfigs itself. That's a lot of inconvenience and
entirely goes against the goal and beats the purpose of the `kubefed`
tool. So we are providing these flags to allow users to override these
values.

Also, since users register their clusters with federation, it is makes
sense in terms of user experience to make the cluster name a positional
argument because that feels more natural. Also, specifying cluster name
in the join command as a mandatory positional argument make
`kubefed join` consistent with `kubefed unjoin`. This also means
`--cluster-context` is now made a flag and defaults to cluster name if
unspecified.

`--secret-name` also defaults to the cluster name if unspecified.

Fixes: Issue #35954

cc @kubernetes/sig-cluster-federation @quinton-hoole @irfanurrehman
2016-11-21 13:02:03 -08:00
Kubernetes Submit Queue 27a0a86282 Merge pull request #37174 from mbohlool/optional
Automatic merge from submit-queue

Fields with omitempty tag should still be considered as optional

We've added an "+optional" tag while ago for optional fields. Before that OpenAPI spec generated assumed all fields with "omitempty" in their json tags are optional. This should be still the case (as well as +optional tag) until these two things happen:

- We update all documentation asking developers to use +optional (My bad, I should have added this after the +optional PR)
- We fix swagger 1.2 spec generator to use +optional instead of omitempty.

Fixes #37149
2016-11-21 10:57:52 -08:00
Kubernetes Submit Queue ab184e1b1f Merge pull request #36399 from mwielgus/fedrc1
Automatic merge from submit-queue

Make desired objects in fed controller reconcilation function fully writable

When creating desired objects for sub-cluster in reconciliate functions we don't make full copies. This may result in unexpected race condition in the future when someone actually adds some object modifications (not needed in most cases but anyway - the cost of extra copy will be relatively small comparing to inter-cluster traffic). In case of ReplicaSet and Deployment the spec copy was a shallow one - ok for setting just replicas but also error-prone in the future.

cc: @quinton-hoole @nikhiljindal @madhusudancs
2016-11-21 00:00:26 -08:00
mbohlool 55d7fbd52c Update generated OpenAPI spec 2016-11-20 00:23:40 -08:00
mbohlool 5c3e078cd5 Update OpenAPI specs 2016-11-17 21:22:15 -08:00
Irfan Ur Rehman b21cfdcd0f [Federation] Review comments fixed for dry run support in kubefed init 2016-11-18 01:23:15 +05:30
Irfan Ur Rehman 2309821c5c [Federation] Unit tests for dry run support in kubefed init 2016-11-18 01:23:15 +05:30
Irfan Ur Rehman 0462c656e8 [Federation] Implement dry run support in kubefed init 2016-11-18 01:23:15 +05:30
Irfan Ur Rehman 98d55db5ec [Federation] Review comment fixes for making federation etcd PVC size configurable 2016-11-18 01:09:25 +05:30
Kubernetes Submit Queue 47a431e82f Merge pull request #36336 from justinsb/federation_dns_hosted_zone_2
Automatic merge from submit-queue

Federation: allow specification of dns zone by ID
2016-11-17 00:49:09 -08:00
Kubernetes Submit Queue add6ed4dd1 Merge pull request #36719 from saturnism/patch-3
Automatic merge from submit-queue

Fixed typo - cluser -> cluster, and replicasets -> ReplicaSet for consistency

<!--  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**:

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

**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
```
2016-11-16 15:09:03 -08:00
Irfan Ur Rehman 58b631fe77 [Federation] Unit tests for federation etcd PVC size configurability 2016-11-16 20:52:16 +05:30
Irfan Ur Rehman 9cef38c705 [Federation] Make federation etcd PVC size configurable 2016-11-16 20:52:16 +05:30
Madhusudan.C.S 005f5cd21e [Federation][join-flags] Add flags for cluster context and secret names while joining clusters to federation.
Vast majority of cluster contexts are not RFC 1123 subdomains. Since
cluster and secret names for the API objects are derived from the
cluster context name, there is no way for users to join clusters
with such context names to federation, unless they modify the context
name in their kubeconfigs itself. That's a lot of inconvenience and
entirely goes against the goal and beats the purpose of the `kubefed`
tool. So we are providing these flags to allow users to override these
values.

Also, since users register their clusters with federation, it is makes
sense in terms of user experience to make the cluster name a positional
argument because that feels more natural. Also, specifying cluster name
in the join command as a mandatory positional argument make `kubefed
join` consistent with `kubefed unjoin`. This also means `--cluster-
context` is now made a flag and defaults to cluster name if unspecified.

`--secret-name` also defaults to the cluster name if unspecified.
2016-11-15 23:47:53 -08:00
Madhusudan.C.S 2f00e0eeba [Federation][init-10d] Use the right service and dns provider names in controller manager. 2016-11-15 10:42:31 -08:00
Kubernetes Submit Queue 30c830b217 Merge pull request #36492 from irfanurrehman/federation-kubefed-todo-3
Automatic merge from submit-queue

[Federation][Bugfix] Make the dns provider configurable in kubefed init

Fixes: Issue #36690 

The design doc PR relating the whole feature for kubefed is at #34484.


cc @kubernetes/sig-cluster-federation @madhusudancs @nikhiljindal
2016-11-13 17:51:28 -08:00
Ray Tsang cd9533cc39 Update types.go 2016-11-13 17:32:54 +01:00
Kubernetes Submit Queue 3e6210994c Merge pull request #36605 from mwielgus/test-fix-1
Automatic merge from submit-queue

Federation test util fix - 1

* Make nil and empty map equivalent when testing ObjectMeta equivalence
* Add a function that waits for a particular content inside federated store

cc: @nikhiljindal @madhusudancs
2016-11-11 08:21:59 -08:00
Marcin Wielgus 2fb71ed955 Test equality in get from storage 2016-11-11 16:00:16 +01:00
Marcin Wielgus 92c3e20e93 Make null and empty as equivalent in ObjectMetaEquivalent 2016-11-11 16:00:16 +01:00
Kubernetes Submit Queue e4e3e41522 Merge pull request #36613 from mwielgus/watcher-fix-2
Automatic merge from submit-queue

Ensure proper serialization of updates and creates in federation test watcher

Fix for finalizer test problems. The issue there was that the updates were coming out of order. It was caused by firing updates in new goroutines in test watcher. The proper solution is to order them in a queue and fire in order on a single goroutine.

Ref: https://github.com/kubernetes/kubernetes/issues/36473#issuecomment-259605870

cc: @nikhiljindal @madhusudancs
2016-11-10 16:28:24 -08:00
Marcin Wielgus 3540846fbe Ensure proper serialization of updates and creates in federation test watcher 2016-11-10 23:23:24 +01:00
Marcin 41e13fcfa7 Automaticaly generated bazel 2016-11-10 21:37:04 +01:00
Marcin Wielgus b560066e01 Wait for deployment in the storage in deployment controller test 2016-11-10 21:08:32 +01:00
jianhuiz 939ae93e87 populate ready replicas and aviable replicas to federated replicaset status 2016-11-10 10:11:10 -08:00
Kubernetes Submit Queue 7d312c2b47 Merge pull request #36476 from nikhiljindal/deployRS
Automatic merge from submit-queue

Adding cascading deletion support to federation replicaset and deployments

Forked from https://github.com/kubernetes/kubernetes/pull/36330

Ref #33612
Adding cascading deletion support for federated replicasets and deployments.

```release-note
federation: Adding support for DeleteOptions.OrphanDependents for federated replicasets and deployments. Setting it to false while deleting a federated replicaset or deployment also deletes the corresponding resource from all registered clusters.
```
2016-11-10 05:36:43 -08:00
Irfan Ur Rehman a7a56caa6b [Federation] Unit test update for dns provider configurability 2016-11-10 12:56:21 +05:30
Irfan Ur Rehman c5a5a71976 [Federation] Make the dnsProvider configurable in kubefed init 2016-11-10 12:55:44 +05:30
nikhiljindal 675da90d51 autogenerated bazel and test owner changes 2016-11-09 21:41:19 -08:00
nikhiljindal 7c721cbc2f Updating federation ingress controller to support cascading deletion 2016-11-09 21:39:51 -08:00
nikhiljindal 434b1cc406 Updating daemon set controller to support cascading deletion 2016-11-09 21:39:51 -08:00
Jess Frazelle 3bd8704489 Merge pull request #36536 from nikhiljindal/disableTest
Disabling flaky federation unit tests
2016-11-09 16:07:49 -05:00
nikhiljindal 6b5375b32c Disabling flaky unit tests 2016-11-09 12:22:36 -08:00
nikhiljindal a519506c35 Fixing scripts to bring up federation control plane 2016-11-09 09:47:24 -08:00
nikhiljindal d26c438a72 autogenerated bazel and test owner changes 2016-11-08 20:05:04 -08:00
nikhiljindal 1802400700 Updating deployment controller to support cascading deletion 2016-11-08 20:05:04 -08:00
nikhiljindal 54c2fbbfdf Updating federation replicaset controller to support cascading deletion 2016-11-08 20:05:04 -08:00
nikhiljindal 8ca1b3092f Fixing federation secret controller unit test flakiness 2016-11-08 14:08:59 -08:00
Kubernetes Submit Queue 0271eac28f Merge pull request #35765 from mfanjie/master
Automatic merge from submit-queue

register default functions for federation/apis/core

fix issue #35667 and all related e2e test fail on federation.
2016-11-08 09:53:14 -08:00
Marcin Wielgus f91b3feee4 Make objects in fed controller reconcilation function fully writable 2016-11-08 11:16:31 +01:00
Kubernetes Submit Queue a0758f6767 Merge pull request #36338 from nikhiljindal/delCode
Automatic merge from submit-queue

Deleting dead code from federation service controller
2016-11-07 23:41:32 -08:00
Kubernetes Submit Queue d8fa6a99a2 Merge pull request #36296 from nikhiljindal/cascDelFedSecret
Automatic merge from submit-queue

Adding cadcading deletion support for federated secrets

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

Adding cascading deletion support for federated secrets.
The code is same as that for namespaces.  Just ensuring that DeletionHelper functions are called at right places in secret_controller.
Also added e2e tests.

cc @kubernetes/sig-cluster-federation @caesarxuchao

```release-note
federation: Adding support for DeleteOptions.OrphanDependents for federated secrets. Setting it to false while deleting a federated secret also deletes the corresponding secrets from all registered clusters.
```
2016-11-07 22:15:08 -08:00
Justin Santa Barbara df4280651c Federation: allow specification of dns zone by ID
If we have a public & private zone with the same name (which is common
on AWS), this means we can still create records.  Also tighten up some
of the logic to allow for zones with duplicate names.
2016-11-07 17:21:36 -05:00
nikhiljindal 11ede23257 bazel changes 2016-11-07 11:43:00 -08:00
nikhiljindal 17b2178222 Adding cadcading deletion support to federated secrets 2016-11-07 11:42:59 -08:00
nikhiljindal 647b826d69 Fix a data race condition in federation namespace controller 2016-11-07 11:34:27 -08:00
Bryan Boreham 0b88460347 Fix doc links in Federation readme
The user guide and admin guide links were swapped round
2016-11-07 11:31:08 +00:00
mbohlool c7129ff3d8 Update federation OpenAPI spec 2016-11-07 02:47:23 -08:00
Kubernetes Submit Queue e6fadcbf4b Merge pull request #36283 from nikhiljindal/nscascdelTests
Automatic merge from submit-queue

Adding more e2e tests for federated namespace cascading deletion and fixing bugs

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

Adding more e2e tests for testing cascading deletion of federated namespace.
New tests are now verifying that cascading deletion happen when DeletionOptions.OrphanDependents=false and it does not happen when DeleteOptions.OrphanDependents=true.

Also updated deletion helper to always add OrphanFinalizer. generic registry will remove it if DeleteOptions.OrphanDependents=false. Also updated namespace registry to do the same.

We need to add the orphan finalizer to keep the orphan by default behavior. We assume that its dependents are going to be orphaned and hence add that finalizer. If user does not want the orphan behavior, he can do so using DeleteOptions and then the registry will remove that finalizer.

cc @kubernetes/sig-cluster-federation @caesarxuchao @derekwaynecarr
2016-11-07 01:37:14 -08:00
nikhiljindal 1fe6ee8915 Deleting dead code from federation service controller 2016-11-06 21:48:05 -08:00
Kubernetes Submit Queue 3c17fa5d36 Merge pull request #36048 from madhusudancs/federation-kubefed-init-10c
Automatic merge from submit-queue

[Federation][init-10c] Fix hyperkube binary path in the image and disable auth mechanisms we don't support for now.

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

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @nikhiljindal
2016-11-06 20:46:52 -08:00
nikhiljindal aa518d13de Adding more e2e tests for federated namespace cascading deletion and fixing a few bugs 2016-11-05 20:57:57 -07:00
Madhusudan.C.S 4618eedcf6 [Federation][init-10c] Disable auth mechanisms we don't support for now. 2016-11-05 19:38:45 -07:00
Madhusudan.C.S 41b39f3019 [Federation][init-10b] Update local kubeconfig with the new federation API server credentials. 2016-11-05 19:37:48 -07:00
Kubernetes Submit Queue c80acb4cb8 Merge pull request #35481 from smarterclayton/apidoc
Automatic merge from submit-queue

Describe graceful deletionTimestamp more accurately

Spawned from #34160
2016-11-05 18:51:47 -07:00
Kubernetes Submit Queue 42fe4ab027 Merge pull request #35372 from justinsb/federation_dns_hosted_zone_1
Automatic merge from submit-queue

Federation: separate notion of zone-name & dns-suffix
2016-11-05 17:29:09 -07:00
Madhusudan.C.S 8d8eca5f2a [Federation][init-10a] Make the federation API server and controller manager image names configurable.
This enables testing non-release images.
2016-11-05 16:42:14 -07:00
Madhusudan.C.S 1de77559f3 [Federation][init-09] Implement unit tests for `kubefed init`. 2016-11-05 16:35:42 -07:00
Kubernetes Submit Queue a788f662ea Merge pull request #30601 from madhusudancs/fed-cm-kubeconfig-from-flags
Automatic merge from submit-queue

Read the federation controller manager kubeconfig from a filesystem path

This decoupling from the Kubernetes API allows admins to run federation control plane components wherever they like, even outside Kubernetes. This also makes the federation controller manager read its config from one single place in a uniform and/or consistent way, instead of spreading the config around command line flags and secrets.

``` release-note
Federation controller manager can consume the federation API server kubeconfig from a file configured via --kubeconfig flag.

If you are upgrading your Cluster Federation components from v1.4.x, please update your `federation-apiserver` and `federation-controller-manager` manifests to the new version:
```

cc @kubernetes/sig-cluster-federation
2016-11-05 15:35:23 -07:00
Clayton Coleman 0be25e481b
generated: docs 2016-11-04 23:38:37 -04:00
Kubernetes Submit Queue ec6a5d279f Merge pull request #36019 from mwielgus/fed-secret-nn
Automatic merge from submit-queue

Switch federated secret controller to use NamespacedName

To make it cleaner and consistent with other controllers.

cc: @quinton-hoole
2016-11-04 20:24:19 -07:00
Marcin 8b91e49510 Autogenerated bazel 2016-11-05 01:14:09 +01:00
Madhusudan.C.S efafff4078 [Federation] Update the deprecated name for 1.5 and try with flags only when `--kubeconfig` is non-empty. 2016-11-04 11:31:31 -07:00
Madhusudan.C.S dbfc110934 For backwards compatibility, directly try to build the rest client config from the secret if --kubeconfig flag is empty. 2016-11-04 11:31:30 -07:00
Madhusudan.C.S 362c561bd4 Read the federation controller manager kubeconfig from a filesystem path.
This decoupling from the Kubernetes API allows admins to run federation
control plane components wherever they like, even outside Kubernetes.
2016-11-04 11:31:30 -07:00
Marcin d010d1d897 Autogen updates for configmap controller 2016-11-04 16:44:40 +01:00
Marcin Wielgus 493cdf9328 Federated ConfigMap controller 2016-11-04 16:43:00 +01:00
Madhusudan.C.S efea270553 [Federation][init-08] Refactor the tests by pulling the common utilities into a testing package.
This makes these utilities reusable by other packages.
2016-11-04 01:03:41 -07:00
Madhusudan.C.S dd365b42bf [Federation][init-07] Pull the default federation namespace into a constant. 2016-11-04 00:13:20 -07:00
Madhusudan.C.S caef02cf43 [Federation][init-06] Check for the availability of federation API server's service loadbalancer address before waiting.
This speeds up the tests. Otherwise tests end up unnecessarily waiting for the
poll interval/duration which is 5 seconds right now.
2016-11-04 00:12:11 -07:00
Madhusudan.C.S d70d961689 [Federation][init-05] Separate the notions of controller manager name and federation name in the controller manager deployment spec. 2016-11-03 16:12:03 -07:00
Madhusudan.C.S 47977fbbc4 [Federation][init-04] Explicitly specify the number of API server and controller manager replicas. 2016-11-03 15:45:53 -07:00
Madhusudan.C.S 1b929bd4c1 [Federation][init-03] Print the federation API server address on success. 2016-11-03 15:45:24 -07:00
Kubernetes Submit Queue fc6db328ce Merge pull request #35859 from madhusudancs/federation-kubefed-init-02
Automatic merge from submit-queue

[Federation][init-02] Stop passing command factory to the init command.

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

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @nikhiljindal
2016-11-03 13:53:03 -07:00
Kubernetes Submit Queue 758c56cc85 Merge pull request #35856 from madhusudancs/federation-kubefed-init-01
Automatic merge from submit-queue

[Federation] Add unit tests for `kubefed init`'s certificate generator.

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

These are a subset of unit tests for code introduced in PR #35594

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @quinton-hoole
2016-11-03 11:19:01 -07:00
Kubernetes Submit Queue 2f84a7c8d2 Merge pull request #35594 from madhusudancs/federation-kubefed-init-00
Automatic merge from submit-queue

[Federation][init] Implement `kubefed init` command that performs federation control plane bootstrap.

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

I am intentionally not including the unit tests in this PR to better distribute and parallelize reviews. This PR is already big.

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-03 02:08:14 -07:00
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
Kubernetes Submit Queue 563d23960d Merge pull request #32581 from justinsb/dns_expose_provider_id
Automatic merge from submit-queue

DNS Federation: Add ID to Zone interface
2016-09-24 00:15:05 -07:00
Kubernetes Submit Queue b2aed32578 Merge pull request #33269 from deads2k/client-15-svc-lister
Automatic merge from submit-queue

simplify svc lister

trying to track down what killed the e2e tests.
2016-09-23 03:10:57 -07:00
shashidharatd 690a06b9b8 Handle review comments for Fix goroutine leak in federation service controller 2016-09-23 15:04:10 +05:30
shashidharatd d8ff4870cb Fix goroutine leak in federation service controller 2016-09-23 12:39:54 +05:30
Quinton Hoole 359bd17066 Don't try to write the wrong UID, version on Federated Ingress updates.
Fixes #33135.
2016-09-22 17:14:49 -07:00
Kubernetes Submit Queue 6b3f5c4147 Merge pull request #33038 from deads2k/api-11-push-deps-down
Automatic merge from submit-queue

remove storage related fields from genericapiserver

Removes `StorageFactory` and `StorageDecorator` from from `genericapiserver` since both constructs are related to building a `RESTStorage`, which should be provided fully formed (or via factory func) to a truly generic API server.

I found this while trying to move the creation API routes earlier.
2016-09-22 17:04:13 -07:00
Kubernetes Submit Queue f230e6c7bc Merge pull request #33007 from smarterclayton/fix_versioned_event
Automatic merge from submit-queue

Correct versioned.Event output in Swagger

Fixes #24240

```release-note
The value of the `versioned.Event` object (returned by watch APIs) in the Swagger 1.2 schemas has been updated from `*versioned.Event` which was not expected by many client tools. The new value is consistent with other structs returned by the API.
```
2016-09-22 07:03:28 -07:00
deads2k f6882e8465 remove storage related fields from genericapiserver 2016-09-22 09:21:34 -04:00
deads2k 483af28944 fix up service lister 2016-09-22 09:12:37 -04:00
Kubernetes Submit Queue e115a4282d Merge pull request #33169 from deads2k/api-12-move-groups
Automatic merge from submit-queue

move registry packages for all API groups

This continues the pattern of `registry/<group>/resource` for our backing storage.  This entire pull is nothing but moves.  I'll reswizzle the actual storage next, but these are cargo-culted everywhere, so I want to lay this down early.

@sttts @ncdc
2016-09-22 00:51:59 -07:00
Kubernetes Submit Queue af3a6ef545 Merge pull request #33213 from jianhuiz/federation-replicaset-incorrect-planner
Automatic merge from submit-queue

fix planner loop ends before finishing replica assignments

fix planner bug that failed assign all the replicas sometime
#32733 

@quinton-hoole @nikhiljindal @deepak-vij @kshafiee @mwielgus @shashidharatd
2016-09-21 23:30:48 -07:00
Kubernetes Submit Queue c46bc88f04 Merge pull request #31491 from dims/fixes-issue-13598
Automatic merge from submit-queue

Allow secure access to apiserver from Admission Controllers

* Allow options.InsecurePort to be set to 0 to switch off insecure access
* In NewSelfClient, Set the TLSClientConfig to the cert and key files
  if InsecurePort is switched off
* Mint a bearer token that allows the client(s) created in NewSelfClient
  to talk to the api server
* Add a new authenticator that checks for this specific bearer token

Fixes #13598
2016-09-21 21:31:56 -07:00
Antoine Pelisse 938872582e Revert "simplify RC and SVC listers" 2016-09-21 15:49:38 -07:00
jianhuiz 8b720ffaeb fix planner loop ends before finishing replica assignments 2016-09-21 14:10:51 -07:00
deads2k 561f8d75a5 move core resource registry packages 2016-09-21 10:11:50 -04:00
deads2k e9c1b87b80 move extensions registry packages 2016-09-21 09:14:38 -04:00
Kubernetes Submit Queue 2d9d84dc64 Merge pull request #32888 from deads2k/client-10-fixup-remaining-listers
Automatic merge from submit-queue

simplify RC and SVC listers

Make the RC and SVC listers use the common list functions that more closely match client APIs, are consistent with other listers, and avoid unnecessary copies.
2016-09-21 04:13:56 -07:00
Kubernetes Submit Queue f2bfa543f0 Merge pull request #33130 from madhusudancs/fed-default-image-tag
Automatic merge from submit-queue

Update the Kubernetes version in sample federation deployment config to 1.4.0.

cc @kubernetes/sig-cluster-federation
2016-09-21 03:38:10 -07:00
guangxuli a6ad0e1a5c directly break the loop if condition map 2016-09-21 12:56:52 +08:00
Kubernetes Submit Queue 735fca1c03 Merge pull request #32622 from mbohlool/openapi
Automatic merge from submit-queue

Move generated openAPI specs out of genericapiserver and make it configurable

A follow up to #31468

Generated OpenAPI Spec does not belong to genericapiserver package. A new package "generated" created in hope of all generated codes goes into it in future. Openapi folder of that package contains generated definitions and generic API server will accept the definition map as a configuration parameter.

Reference: #13414
2016-09-20 21:42:57 -07:00
Madhusudan.C.S dc5668b80f Update the Kubernetes version in sample federation deployment config to 1.4.0. 2016-09-20 14:57:53 -07:00
mbohlool 38b2567d8b Move generated openAPI specs out of genericapiserver and make it configurable 2016-09-20 14:06:10 -07:00
nikhiljindal 127c6b2f0c Fixing a panic by initialising the map before using it 2016-09-20 13:37:37 -07:00
Davanum Srinivas 25d4a70827 Allow secure access to apiserver from Admission Controllers
* Allow options.InsecurePort to be set to 0 to switch off insecure access
* In NewSelfClient, Set the TLSClientConfig to the cert and key files
  if InsecurePort is switched off
* Mint a bearer token that allows the client(s) created in NewSelfClient
  to talk to the api server
* Add a new authenticator that checks for this specific bearer token

Fixes #13598
2016-09-20 10:42:21 -04:00
deads2k 16fbb47189 fix up service lister 2016-09-20 08:24:33 -04:00
deads2k a2a6423574 separate RESTStorage by API group 2016-09-20 08:00:50 -04:00
Clayton Coleman 8fd096e5c8
generated: swagger, docs 2016-09-19 19:43:42 -04:00
deads2k 4aa61ddcb2 remove dead mapper 2016-09-19 09:57:19 -04:00
Justin Santa Barbara 816e50bd8d Add ID to Zone interface
This allows us to differentiate when we have two HostedZones with the
same DNS name.
2016-09-16 21:32:10 -04:00
Kubernetes Submit Queue 12d916750e Merge pull request #32387 from sttts/sttts-handler-cleanup
Automatic merge from submit-queue

Cleanup non-rest apiserver handlers

- rename MuxHelper -> PathRecorderMux
- move non-rest handlers into routes packages within genericapiserver and `pkg/routes` (those from master)
- move ui and logs handlers out of genericapiserver (they are
  not generic)
- make version handler configurable (`config.EnableVersion`)
2016-09-16 08:58:06 -07:00
Kubernetes Submit Queue e8fbcb1669 Merge pull request #32654 from soltysh/sj_clientset
Automatic merge from submit-queue

Switch ScheduledJob controller to use clientset

**What this PR does / why we need it**:
This is part of #25442. I've applied here the same fix I've applied in the manual client in #29187, see the 1st commit for that (@caesarxuchao we've talked about it in #29856).

@deads2k as promised 
@janetkuo ptal
2016-09-16 05:03:57 -07:00
Kubernetes Submit Queue e10b061857 Merge pull request #32612 from nikhiljindal/fedAPIRefReadme
Automatic merge from submit-queue

Adding a README for federation API ref docs

The API ref docs were added in https://github.com/kubernetes/kubernetes/pull/31759

README makes it easy to link to all other API-ref docs.

This is similar to the existing docs/api-reference/README.md for kubernetes.

cc @kubernetes/sig-cluster-federation @caesarxuchao
2016-09-15 17:22:51 -07:00
Mike Danese a765d59932 move informer and controller to pkg/client/cache
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-09-15 12:50:08 -07:00
Dr. Stefan Schimanski 7f78661d0b Cleanup non-rest apiserver handlers
- rename MuxHelper -> PathRecorderMux
- move non-rest handlers into routes packages within genericapiserver and
  `pkg/routes` (those from master)
- move ui and logs handlers out of genericapiserver (they are
  not generic)
- make version handler configurable (`config.EnableVersion`)
2016-09-15 13:22:45 +02:00
Clayton Coleman 716bac3bbb
All REST that set DeleteCollectionWorkers should set EnableGC 2016-09-15 00:09:34 -04:00
Maciej Szulik 5894834cc8 Generated changes for clientset 2016-09-14 11:27:29 +02:00
Davanum Srinivas 64efc3a744 Update Google Cloud API client import paths
Bump version of golang.org/x/oauth2
Vendor google.golang.org/cloud/
Vendor google.golang.org/api/
Vendor cloud.google.com/go/compute/
Replace google.golang.org/cloud with cloud.google.com/go/

Fixes #30069
2016-09-13 22:21:06 -04:00
nikhiljindal e9fd43f00f Adding a README for federation API ref docs 2016-09-13 15:29:53 -07:00
Kubernetes Submit Queue 4d0d9fa8f3 Merge pull request #32545 from nikhiljindal/fixFedSecTest
Automatic merge from submit-queue

Fixing federation secret and replicaset e2e tests

Verified that both of these pass once https://github.com/kubernetes/kubernetes/pull/32438 is merged.

cc @kubernetes/sig-cluster-federation 

Ref https://github.com/kubernetes/kubernetes/pull/31655#discussion_r78432043
2016-09-13 15:17:15 -07:00
nikhiljindal d19cfc0dcc Fixing federation secret and replicaset e2e tests 2016-09-13 12:20:46 -07:00
Quinton Hoole fac6318c57 Federated Ingress: unify UID's across Cluster Ingress Controllers
Fixes #31180
2016-09-13 08:29:33 -07:00
Kubernetes Submit Queue 6ffd30c2df Merge pull request #31468 from mbohlool/master
Automatic merge from submit-queue

Improvements on OpenAPI spec generation

- Generating models using go2idl library (no reflection anymore)
- Remove dependencies on go-restful/swagger
- Generate one swagger.json file for each web-service
- Bugfix: fixed a bug in trie implementation

Reference: #13414


**Release note**:

```release-note
Generate separate OpenAPI spec for each API GroupVersion on /<Group>/<Version>/swagger.json
```
2016-09-13 01:56:23 -07:00
Kubernetes Submit Queue a44d2f8009 Merge pull request #32243 from caesarxuchao/generate-1-5-clientset
Automatic merge from submit-queue

Generate 1 5 clientset

Generate the 1.5 clientset. Stop updating 1.4 clientset. Remove 1.2 clientset.

@nikhiljindal @lavalamp 

I will rebase #31994 atop of this one.
2016-09-12 23:04:50 -07:00
mbohlool 702f55e61d Add +k8s:openapi-gen tag to API types 2016-09-12 18:47:03 -07:00
Chao Xu 70d62a93a5 other manual changes 2016-09-12 10:24:18 -07:00
Kubernetes Submit Queue b50251c1eb Merge pull request #32472 from lojies/changeinfofErrorfendpoint_helper
Automatic merge from submit-queue

change infof to Errorf in endpoint_helper.go

change glog.Infof() to glog.Errorf()
2016-09-12 02:01:55 -07:00
lojies 9498b227a1 change infof to Errorf in some codes 2016-09-12 15:55:42 +08:00
Kubernetes Submit Queue cf0764ee1b Merge pull request #31747 from madhusudancs/fed-dep-gcp-cred
Automatic merge from submit-queue

Mount GCP credentials to federation deployment container for GKE clusters.

GKE clusters use GCP credentials and hence require them for deploying federation components on to those clusters.

cc @kubernetes/sig-cluster-federation
2016-09-11 23:27:57 -07:00
Kubernetes Submit Queue cf4ea938c8 Merge pull request #32278 from pigmej/typos_englishify_federation
Automatic merge from submit-queue

Typos and englishify federation

**What this PR does / why we need it**: Typos + "englishify" /federated

**Which issue this PR fixes** None

**Special notes for your reviewer**: Just typos + "englishify" federated and obviously autogenerated stuff.

**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`. 
-->
`NONE`
2016-09-11 21:34:35 -07:00
Madhusudan.C.S 230a1c789d Mount GCP credentials to federation deployment container for GKE clusters.
GKE clusters use GCP credentials and hence require them for
deploying federation components on to those clusters.
2016-09-09 14:36:45 -07:00
Jedrzej Nowak 6aaad93908 Typos and englishify federation 2016-09-09 09:53:24 +02:00
Chao Xu ff9da535d3 generated 1.5 release 2016-09-08 16:03:07 -07:00
Kubernetes Submit Queue e4909db6a3 Merge pull request #32144 from nikhiljindal/freshDebugNs
Automatic merge from submit-queue

Updating federation api ref docs

Updating API ref docs to include changes from https://github.com/kubernetes/kubernetes/pull/31925.

PR generated by running `hack/update-federation-api-reference-docs.sh`

cc @kubernetes/sig-cluster-federation
2016-09-08 15:54:20 -07:00
Kubernetes Submit Queue 943d7aa5aa Merge pull request #31247 from deads2k/api-03
Automatic merge from submit-queue

refactor genericapiserver new to combine initialization

Combines `New` and `init` since the two were inseparable before anyway.  `New` now has all the code to create the `GenericAPIServer`.

The rest of the change is a move.  I want to refactor the flow more, but I figured that doing it separately would simplify the review.

@sttts how do you feel about looking at this one?
2016-09-08 09:10:24 -07:00
Kubernetes Submit Queue b616349efc Merge pull request #32282 from mwielgus/register-on-fake-fix
Automatic merge from submit-queue

Remove panic handling from federated test helper

This was added by accident when helping @quinton-hoole with https://github.com/kubernetes/kubernetes/pull/31600.
2016-09-08 06:59:48 -07:00
deads2k b0d770ad7b refactor genericapiserver new to combine initialization 2016-09-08 08:57:10 -04:00
Marcin Wielgus d93456ab37 Remove panic handling from federated test helper 2016-09-08 14:53:10 +02:00
Marcin Wielgus 13a80ce912 FakeWatcher with channel size constructor 2016-09-08 13:38:44 +02:00
Kubernetes Submit Queue 34012d7877 Merge pull request #32234 from mwielgus/fake-watch-fix
Automatic merge from submit-queue

WatcherDispatcher for federated controller tests

This PR fixes a problem when 2 informers create a watch for the same resource using the same client. Previously only one informer would receive updates.

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

quinton-hoole: To provide some more context to those doing cherrypicking, the bug that this PR fixes makes federated unit tests fail intermittently, and generally behave very poorly.
2016-09-07 16:25:07 -07:00
Marcin Wielgus 961b1a94e2 WatcherDispatcher for federated controller tests 2016-09-07 23:53:37 +02:00
Marcin Wielgus 091b843b4a Delete resources in federated namespce 2016-09-07 21:01:38 +02:00
nikhiljindal 922e24f88b Updating api ref docs 2016-09-06 11:39:14 -07:00
Kubernetes Submit Queue 59a25fb7ed Merge pull request #31677 from jianhuiz/federation-replicaset-controller-delay-fix
Automatic merge from submit-queue

fix deliverer dealy constant usage

some delay constants were not correctly used

#29741
@quinton-hoole @deepak-vij @kshafiee @mwielgus
2016-09-05 20:52:34 -07:00
Kubernetes Submit Queue ac7fbf502a Merge pull request #31925 from nikhiljindal/freshDebugNs
Automatic merge from submit-queue

Adding namespaces/finalizer subresource to federation apiserver

Fixes https://github.com/kubernetes/kubernetes/issues/31077

cc @kubernetes/sig-cluster-federation @mwielgus 


Verified manually that I can delete federation namespaces now.
Will update federation-namespace e2e test to verify that namespace is deleted fine
2016-09-02 19:30:25 -07:00
nikhiljindal 556fa932dd Updated federation swagger spec 2016-09-02 15:30:33 -07:00
nikhiljindal 274487da87 Adding namespaces/finalizer subresource to federation apiserver 2016-09-02 15:30:32 -07:00
Kubernetes Submit Queue 2907015b58 Merge pull request #31814 from mwielgus/add-hash-to-planer
Automatic merge from submit-queue

Use hash in federated replica set planner

Without this all replicaset of size 1 would land in the same cluster if the default preferences (weight=1) are used. 

cc: @jianhuiz  @quinton-hoole @kubernetes/sig-cluster-federation
2016-09-01 08:20:17 -07:00
Marcin Wielgus 015a970ceb Use hash in federated replica set planner 2016-09-01 16:35:40 +02:00
Kubernetes Submit Queue e35675cf59 Merge pull request #31821 from mwielgus/event-name-sync
Automatic merge from submit-queue

Sync event names in federated controller

cc: @quinton-hoole
2016-09-01 01:48:25 -07:00
Kubernetes Submit Queue f512ec3af8 Merge pull request #31826 from mwielgus/rs-events
Automatic merge from submit-queue

Events for federated replica set controller

cc: @quinton-hoole @jianhuiz @kubernetes/sig-cluster-federation
2016-09-01 01:48:20 -07:00
Kubernetes Submit Queue 199338a551 Merge pull request #31759 from nikhiljindal/fedSwaggerDoc
Automatic merge from submit-queue

Generating API reference docs for federation apiserver

Fixes #30541 

Adding a script `update-federation-api-reference-docs.sh` similar to the existing `update-api-reference-docs.sh` for kube-apiserver. Have moved the common parts to `hack/lib/swagger.sh`.
The new script will produce API reference docs for federation-apiserver.

Next step will be to surface these docs at kubernetes.io.

cc @kubernetes/sig-cluster-federation @kubernetes/sig-api-machinery @caesarxuchao
2016-08-31 15:33:43 -07:00
Marcin Wielgus 118de37dbe Sync event names in federated controller 2016-08-31 23:40:53 +02:00
Marcin Wielgus d1bfb3f8ff Events for federated replica set controller 2016-08-31 23:35:20 +02:00
jianhuiz 3ba0c0578e fix deliverer dealy constant usage 2016-08-31 13:47:42 -07:00
nikhiljindal 633c549040 Autogenerated commit by running update-federation-api-reference-docs.sh 2016-08-31 13:21:42 -07:00
Kubernetes Submit Queue ae940c09f3 Merge pull request #31744 from mwielgus/rs-fix-2
Automatic merge from submit-queue

Clean-up and fixes in federated replica set

* Create and update consistent with other controllers. Previously an annotation update on federated rs would not trigger local rs update.
* Use of federatedUpdater. The previous code use talked to clusters manually, assuming that the stats values in the local rs would be automatically and immediately updated. These stats are updated by controllers so they are not immediately updated and the currently existing stats can be used for building federated rs stats.
* Trigger a rs recheck after some operations are executed.

cc: @quinton-hoole @jianhuiz @wojtek-t @kubernetes/sig-cluster-federation
2016-08-31 11:25:01 -07:00
Kubernetes Submit Queue 1063731234 Merge pull request #31705 from mwielgus/secrets-events
Automatic merge from submit-queue

Events for federated secrets controller

cc: @quinton-hoole @nikhiljindal @kubernetes/sig-cluster-federation
2016-08-31 11:03:45 -07:00
Marcin Wielgus 7258b8e4f6 Events for federated secrets controller 2016-08-31 18:57:40 +02:00
Marcin Wielgus 4c55babcf8 Clean-up and fixes in federated replica set 2016-08-31 18:53:54 +02:00
Marcin Wielgus e850d4f0a2 Events for federated ingress controller 2016-08-30 23:52:35 +02:00
nikhiljindal a954ff18e6 Adding update-federation-generated-swagger-docs to generate comment funcs for federation gvs 2016-08-30 14:15:21 -07:00
Marcin Wielgus 044fab9f58 Events for federated namesapce controller 2016-08-30 16:28:49 +02:00
Marcin Wielgus 6531c83b7b OnError callback function for federated updater 2016-08-30 12:01:50 +02:00
Madhusudan.C.S 9989d5d483 Federation README typo fix. 2016-08-29 14:17:42 -07:00
Madhusudan.C.S 272d966d94 Separate the build recipe in federation Makefile into separate phases. 2016-08-29 14:16:39 -07:00
Kubernetes Submit Queue 1919fe3a59 Merge pull request #31526 from mwielgus/event-sink
Automatic merge from submit-queue

EventSink for federated controllers

So that the controllers can reuse k8s.io/kubernetes/pkg/client/record machinery.

cc: @quinton-hoole @nikhiljindal @kubernetes/sig-cluster-federation
2016-08-29 13:46:24 -07:00
Kubernetes Submit Queue 09a97203aa Merge pull request #30744 from madhusudancs/fed-split-build-to-develop-deploy
Automatic merge from submit-queue

Separate federation build.sh into development and deployment scripts.

The idea behind this separation is that it provides a clear distinction
between the dev environment and the prod environment. The
deploy/deploy.sh script will be shipped to the users, but
develop/develop.sh will be purely for development purposes and won't
be part of a release distribution.

Purely for developer convenience, all the deployment functionality is
made available through the develop/develop.sh script.

This change also copies deploy/* files into the release distribution.

cc @kubernetes/sig-cluster-federation @colhom 

```release-note
Federation can now be deployed using the `federation/deploy/deploy.sh` script. This script does not depend on any of the development environment shell library/scripts. This is an alternative to the current `federation-up.sh`/`federation-down.sh` scripts. Both the scripts are going to co-exist in this release, but the `federation-up.sh`/`federation-down.sh` scripts might be removed in a future release in favor of `federation/deploy/deploy.sh` script.
```
2016-08-29 13:46:19 -07:00
Madhusudan.C.S a39f8ed943 Update README. 2016-08-29 10:49:20 -07:00
Marcin Wielgus 417913234d EventSink for federated controllers 2016-08-27 19:48:11 +02:00
Kubernetes Submit Queue 961ef2b51d Merge pull request #31470 from caesarxuchao/regenerate-release-1-4
Automatic merge from submit-queue

Fix missing expansion files in clientset release 1.4

<!--  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**:
Fix missing expansion files in clientset release 1.4;
Update the client-gen tool to automatically update generated_expansion.go;
Update the readme to document the best practice of using client-gen.

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

https://github.com/kubernetes/kubernetes/issues/29698#issuecomment-241315798


**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
```

cc @lavalamp @krousey @mbohlool
2016-08-27 00:45:52 -07:00
Kubernetes Submit Queue adc2db5ff9 Merge pull request #29929 from madhusudancs/fed-bin-downsize-v2
Automatic merge from submit-queue

[Federation] Downsize the release binary distribution v2.

Second attempt of PR #29632.

There are two things that this PR does:

1. It removes `federation-apiserver` and `federation-controller-manager` from binaries and docker_wrapped_binaries target lists.
2. Build the docker image for `hyperkube` on-the-fly while pushing the federation images. 

```release-note
Federation binaries and their corresponding docker images - `federation-apiserver` and `federation-controller-manager` are now folded in to the `hyperkube` binary. If you were using one of these binaries or docker images, please switch to using the `hyperkube` version. Please refer to the federation manifests - `federation/manifests/federation-apiserver.yaml` and `federation/manifests/federation-controller-manager-deployment.yaml` for examples.
```

cc @kubernetes/sig-cluster-federation @colhom 

Fixes Issue #28633
2016-08-26 15:11:58 -07:00
Chao Xu bf578f1bc2 run client-gen 2016-08-26 10:55:22 -07:00
Marcin Wielgus 9cdcb31d2b Increase log level for debug infos in Federated ReplicaSet controller 2016-08-26 17:39:06 +02:00
Kubernetes Submit Queue 6eb279ee6e Merge pull request #31512 from mwielgus/more-debug-rs
Automatic merge from submit-queue

More scheduling debug in federated replica set

cc: @quinton-hoole @jianhuiz @kubernetes/sig-cluster-federation
2016-08-26 06:49:11 -07:00
Marcin Wielgus 535a110603 More scheduling debug in federated replica set 2016-08-26 13:48:16 +02:00
Kubernetes Submit Queue 23d0937eaf Merge pull request #31438 from mwielgus/ns-controller-delete
Automatic merge from submit-queue

Proper phase/finalizer logic in federated namespace controller

Part 1 of delete logic cleanup.
Part 2 will contain namespace content deletion and tests.

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-26 04:39:36 -07:00
Marcin Wielgus 31dd5e8d91 Proper phase/finalizer logic in federated namespace controller 2016-08-26 12:44:20 +02:00
Kubernetes Submit Queue 40efde7e0a Merge pull request #31390 from hongchaodeng/fix
Automatic merge from submit-queue

return destroy func to clean up internal resources of storage

What?
Provide a destroy func to clean up internal resources of storage.
It changes **unit tests** to clean up resources. (Maybe fix integration test in another PR.)

Why?
Although apiserver is designed to be long running, there are some cases that it's not.
See https://github.com/kubernetes/kubernetes/issues/31262#issuecomment-242208771
We need to gracefully shutdown and clean up resources.
2016-08-25 16:44:10 -07:00
Madhusudan.C.S a6ff2364c5 Addressed review comments. 2016-08-25 14:34:19 -07:00
Madhusudan.C.S 833d758070 Limit sourcing the build scripts only for build/push phase of federation control plane components. 2016-08-25 14:29:55 -07:00
Madhusudan.C.S d9cea93eb6 [Federation] Do not build separate binaries for federation control plane components, hyperkube should be sufficient.
Also build the hyperkube docker image on-the-fly.

This is only a temporary fix until the proposal in issue
https://github.com/kubernetes/kubernetes/issues/28630 is implemented.

Also, the new build/deployment method completely obviates this step.

We use debian image instead of busybox and do not build hyperkube as a
static binary yet. Wait until PR
https://github.com/kubernetes/kubernetes/pull/26028 is merged to build
static hyperkube binaries.
2016-08-25 14:29:32 -07:00
Madhusudan.C.S 9650a84f7b Separate federation build.sh into development and deployment scripts.
The idea behind this separation is that it provides a clear distinction
between the dev environment and the prod environment. The
deploy/deploy.sh script will be shipped to the users, but
develop/develop.sh will be purely for development purposes and won't
be part of a release distribution.

Purely for developer convenience, all the deployment functionality is
made available through the develop/develop.sh script.

This change also copies deploy/* files into the release distribution.
2016-08-25 12:37:50 -07:00
Kubernetes Submit Queue b44b716965 Merge pull request #31248 from wojtek-t/better_selectable_fields
Automatic merge from submit-queue

Avoid unnecessary copies & allocations in field selectors
2016-08-25 09:01:44 -07:00
Hongchao Deng 9fc0e1e98d return destroy func to clean up internal resources of storage 2016-08-25 08:32:21 -07:00
Madhusudan.C.S 8868459d92 Underscore is not a valid secret data key, so use underscore instead. 2016-08-25 00:12:12 -07:00
Kubernetes Submit Queue 4f4c50223e Merge pull request #31265 from mwielgus/fed-test-ref
Automatic merge from submit-queue

Federation controller tests refactoring - move common func to utils

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-24 10:11:42 -07:00
Wojciech Tyczynski d5a596bca1 More efficient field selectors 2016-08-24 09:08:38 +02:00
Marcin Wielgus 1d2e9a2d31 Federation controller tests refactoring 2016-08-23 18:33:04 +02:00
Kubernetes Submit Queue d6fb8b06dd Merge pull request #31231 from mwielgus/rs-fix3
Automatic merge from submit-queue

Test if 2 federated informers in rs controller are in sync

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-23 08:04:11 -07:00
Kubernetes Submit Queue ea7d417377 Merge pull request #31237 from mwielgus/secret-tests
Automatic merge from submit-queue

Tests for data update in federated secret controller

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-23 06:36:51 -07:00
Marcin Wielgus e29cf44a1e Tests for data update in federated secret controller 2016-08-23 14:42:51 +02:00
Kubernetes Submit Queue 794761f1d6 Merge pull request #31224 from mwielgus/hadnlers-fix
Automatic merge from submit-queue

ObjectMeta equivalence in federated controller handlers + update in fed secrets

Federated secrets should trigger also on data/type update, not only on object meta.

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-23 05:13:17 -07:00
Kubernetes Submit Queue 4b949093c2 Merge pull request #28921 from jianhuiz/federation-cluster-in-meta
Automatic merge from submit-queue

Add Cluster field in ObjectMeta

There will be no sub-rs, but add `Cluster` field to the ObjectMeta (for all the objects)

"To distinguish the object at the federation level from it's constituents at the cluster level we will add a "Cluster" field to the metadata of all objects (where the federation itself will also have a cluster identifier).  That way it is possible to list, interact with, and distinguish between the objects either at the federation level or at the individual cluster level based on the cluster identifier. "


@quinton-hoole @nikhiljindal @deepak-vij @mfanjie @huangyuqi

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-23 04:33:51 -07:00
Marcin Wielgus 7d1c85e476 Test if 2 federated informers in rs controller are in sync 2016-08-23 13:10:48 +02:00