Commit Graph

243 Commits (b038355c81ee621ef0bb199c20442879b97eadc1)

Author SHA1 Message Date
k8s-merge-robot d2f5bbc0d7 Merge pull request #27742 from mml/fed-err-shadow
Automatic merge from submit-queue

Fix block-local err bug in service_helper.go
2016-06-20 23:33:40 -07:00
Quinton Hoole c1604d84b8 Added managed zone creation to all dnsproviders. 2016-06-20 22:47:05 -07:00
k8s-merge-robot 64b2c0e2db Merge pull request #27736 from mml/fed-check-err-first
Automatic merge from submit-queue

Check for an error before checking for nil.
2016-06-20 22:21:14 -07:00
k8s-merge-robot 70ad689df4 Merge pull request #27332 from nikhiljindal/awsSecrets
Automatic merge from submit-queue

federation: Creating kubeconfig files to be used for creating secrets for clusters on aws and gke

Extension of https://github.com/kubernetes/kubernetes/pull/26914 which created the kubeconfig files for gce clusters.
This PR extends it to AWS, vagrant and GKE.

The change for AWS and vagrant is exactly same as GCE.
For GKE, since `gcloud create clusters` creates kubeconfig, we are just copying the generated kubeconfig to the desired location

cc @kubernetes/sig-cluster-federation @colhom 
@roberthbailey for GKE
2016-06-20 21:13:21 -07:00
k8s-merge-robot 0ded5b952f Merge pull request #27735 from mml/fed-log-version
Automatic merge from submit-queue

Log version info at start.

I need more confidence that the version I'm debugging matches the code on my
machine.
2016-06-20 20:03:26 -07:00
Matt Liggett 3ec2b19611 Fix block-local err bug in service_helper.go
The real error message goes out of scope before we try to log it.
2016-06-20 17:47:43 -07:00
Matt Liggett 3659c6ff32 Check for an error before checking for nil.
The error object, if it exists, probably has more specific information
to hand to the caller.
2016-06-20 17:13:16 -07:00
Matt Liggett 3c78acdb9b Log version info at start. 2016-06-20 16:43:48 -07:00
Quinton Hoole acaad60620 Rename dnsprovider/providers/aws/route53/internal/testing to stubs. 2016-06-20 16:29:07 -07:00
nikhiljindal 9026195614 Updating the code to fix the context name before using it as secret and cluster names 2016-06-20 14:50:28 -07:00
Mike Danese 4dd7b7c6ef fix some vets 2016-06-20 14:16:43 -07:00
Robert Deusser cd1450b3ec Fix spelling errors
More spelling fixes
2016-06-20 11:36:11 -04:00
k8s-merge-robot a055c4e80f Merge pull request #27400 from nikhiljindal/delFedPush
Automatic merge from submit-queue

Deleting federation-push.sh

This has bit me a few times. And based on my discussions with @madhusudancs has bit him as well.

Running federation-push.sh doesnt work anymore.
Running build/push-federation-images.sh does the right thing.
They were both trying to do the same thing anyway.

Our documentation (https://github.com/kubernetes/kubernetes/blob/master/docs/devel/e2e-tests.md#federation-e2e-tests) suggests running push-federation-images.sh.

Deleting federation-push.sh

@kubernetes/sig-cluster-federation @colhom @mml
2016-06-19 22:57:59 -07:00
k8s-merge-robot 090e6ff660 Merge pull request #27625 from goltermann/spell2
Automatic merge from submit-queue

Fix several spelling errors in comments

What the title says
2016-06-18 23:08:28 -07:00
Quinton Hoole 30afb6b072 Return error not empty list when dnsprovider returns an error. 2016-06-18 16:15:55 -07:00
Quinton Hoole 8d8d1922dd Change default Federation DNS zone to be RFC 2606 compliant. 2016-06-17 15:32:45 -07:00
k8s-merge-robot 0ea74dae5c Merge pull request #27511 from quinton-hoole/2016-06-15-improve-logging-in-federation-service-controller
Automatic merge from submit-queue

Improve error logging on DNS updates for federated services

This makes debugging easier.  Prior to this, the logs would e.g. contain "Successfully updated 4 out of 4 DNS records", when in fact zero DNS records had been successfully updated.  It's difficult to debug what's happening with such confusing log messages.
2016-06-17 11:24:25 -07:00
goltermann 218645b346 Fix several spelling errors in comments. 2016-06-17 10:41:18 -07:00
Chao Xu a29f6aa8ae add Patch to clientsets 2016-06-17 10:30:58 -07:00
k8s-merge-robot c3a3241002 Merge pull request #27592 from nikhiljindal/fixFedTest
Automatic merge from submit-queue

federation: reverse the order of creating controller manager and secret since controller requires secret

Ref #26762

federation-controller-manager fails if the secret is not there when it comes up: 970104df31/federation/cmd/federation-controller-manager/app/controllermanager.go (L82).

Updating the bring up scripts to first create the secrets and then create the deployments.

@kubernetes/sig-cluster-federation @mml
2016-06-17 00:57:06 -07:00
nikhiljindal 71e1fea2f7 reverse the order of creating controller manager and secret since controller requires secret 2016-06-16 18:31:34 -07:00
k8s-merge-robot 7c97ca596e Merge pull request #27515 from mfanjie/ensuredns-multi-clusters
Automatic merge from submit-queue

federation: only reachable endpoint should be treated as healthy

@quinton-hoole it seems all Ingress IP for the same service is treated as healthy, so I made a fix to filter the Ingress without ready endpoints.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-16 17:10:00 -07:00
mfanjie 8630e46336 only reachable endpoint should be treated as healthy 2016-06-16 11:09:34 +08:00
Quinton Hoole 7b5265c493 Improve error detection and logging on DNS updates for federated services. 2016-06-15 17:30:08 -07:00
Matt Liggett 307f7cf308 Force docker tag change.
Otherwise we sometimes get an error about an existing tag.
2016-06-15 16:41:28 -07:00
nikhiljindal 690ac21ca7 Deleting federation-push.sh 2016-06-14 15:11:47 -07:00
k8s-merge-robot c7e3b2f676 Merge pull request #27252 from mfanjie/fix-ensuredns
Automatic merge from submit-queue

federation: fix dns provider initialization issues

This PR is based on the integration test with Google DNS API. This is the first time of full integration test.
So multiple issues was found and I combined all of them in this single PR

1. add dns provider initialization and add ensureDns call when removing federation service.
2. add new flags federation-name and zone-name to controller manager, both are used as part of the dns record name
3. fix assertion failure at rrsets.go#L61, which will cause panic
4. change getFederationDNSZoneName to get zoneName from config instead of hard code
5. change logic of ensureDnsRrsets, only add new dns record when endpointReachable(set to true when ready address is catched) is true
6. fix bug in processEndpointUpdate, only call ensuredns when ready address is caught
7. change behavior of syncService, there is cases that endpoint is created before ingress IP assignment, so before there is defect for this case, ensureDns was not called when service being updated, so if Ingress IP is assigned after endpoint ready address is caught, the corresponding A records can not be created
8. add a checking before update federation service

@nikhiljindal , can you help to add 1.3 milestone when @quinton-hoole is on leave?
Thanks.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-14 03:20:13 -07:00
k8s-merge-robot 7e2b523dce Merge pull request #27260 from nikhiljindal/dnsProvider
Automatic merge from submit-queue

Updating federation up scripts to work in non e2e setup

Ref: https://github.com/kubernetes/kubernetes.github.io/pull/656

Updating the federation up scripts so that they work as per steps in https://github.com/kubernetes/kubernetes.github.io/pull/656.

Changes are:
* Updating the default namespace to be "federation" instead of "federation-e2e"
* Updated the kubeconfig context to be named "federation-cluster" instead of "federated-context"
* Fixing federation-up so that FEDERATION_IMAGE_TAG is set even when federation-up is run without running `e2e.go --up`. e2e-up.sh sets it here: 6a388d4a0d/hack/e2e-internal/e2e-up.sh (L44).
* Adding a "missingkey=zero" option to template parser. Without this, the parser adds `"<no value>"` at the place of an env var that is not set. With this change, it instead replaces it with the corresponding zero value (for ex "" for strings). This is required for the FEDERATION_DNS_PROVIDER_CONFIG env var.

cc @kubernetes/sig-cluster-federation @colhom @mml
2016-06-14 02:13:44 -07:00
mfanjie 8e26283965 add federation-name and zone-name flags to e2e test 2016-06-14 15:40:07 +08:00
mfanjie dd78dd8e2b 1. ensure dns record when ingress ip is assigned after ready address creation
2. ensure dns record removal when service being removed
2016-06-14 15:36:37 +08:00
mfanjie 72a0806103 only update dns records when ready address available for endpoints 2016-06-14 15:36:37 +08:00
mfanjie 318f37ce0f add federation-name and zone-name as controller manager flags 2016-06-14 15:36:37 +08:00
mfanjie 29cc7c009c add dns provider initialzation 2016-06-14 15:36:37 +08:00
nikhiljindal e0bdb32bd7 export FEDERATION_NAME 2016-06-13 19:01:43 -07:00
nikhiljindal 9b2b763ab0 Fixing references to federated-context and federation-e2e 2016-06-13 16:43:55 -07:00
nikhiljindal 18425172e5 Updating federation up scripts to work in non e2e setup 2016-06-13 15:20:31 -07:00
k8s-merge-robot 10255f8aec Merge pull request #26951 from madhusudancs/fed-detect-project-registry-base
Automatic merge from submit-queue

Detect the project in which the federation of clusters are being created and point the federation docker registry to that project.

Only the last commit here needs review.

Depends on #26950.

cc @colhom @kubernetes/sig-cluster-federation

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-13 06:00:04 -07:00
Madhusudan.C.S c7a4401359 Default to GCR as the image registry if the provider is GCE or GKE. 2016-06-13 02:08:59 -07:00
k8s-merge-robot adb06748f7 Merge pull request #27158 from nikhiljindal/dnsProvider
Automatic merge from submit-queue

federation: Adding dnsprovider flags to federation-controller-manager
2016-06-10 23:28:41 -07:00
k8s-merge-robot 3cc43eb0d2 Merge pull request #27028 from mfanjie/fix_cluster_sync_loop
Automatic merge from submit-queue

federation service controller: fixing a bug so that existing services are created in newly registered clusters

A defect on federation service controller.
Steps to recreate:
1. boot federation control plane
2. create a service and then register a new cluster

Root cause:
the right sequence should be  
```
servicesToUpdate = s.serviceCache.allServices()
```
then
```
s.updateAllServicesToCluster(servicesToUpdate, newCluster) 
```
then
```
servicesToUpdate = s.updateDNSRecords(servicesToUpdate, newClusters)
```
Now the first two lines' sequence is on the contrary, so when updateDNSRecords return no error, the service will be removed from  servicesToUpdate, and updateAllServicesToCluster get nothing to update.

This PR make the call sequence correct.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-10 22:12:16 -07:00
Madhusudan.C.S 498168b4da Set FEDERATION_PUSH_REPO_BASE only when it isn't set. 2016-06-10 00:22:27 -07:00
Madhusudan.C.S c9b1232a17 Detect the project in which the federation of clusters are being created and point the federation docker registry to that project. 2016-06-10 00:22:27 -07:00
nikhiljindal 3f3a2c14d1 Adding the dnsprovider flags to federation-controller-manager 2016-06-09 20:26:46 -07:00
k8s-merge-robot 6a388d4a0d Merge pull request #27072 from colhom/federation-e2e-docs
Automatic merge from submit-queue

Updating e2e docs with instructions on running federation tests

Last two commits are for review. Depends on #26951

\cc @madhusudancs @quinton-hoole @nikhiljindal 
 
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-09 19:14:11 -07:00
k8s-merge-robot 9ae6a008c9 Merge pull request #26952 from madhusudancs/fed-apiserver-admissioncontrol-todo
Automatic merge from submit-queue

Add a TODO to enable admission control in federation apiserver when the support is added.

Only the last commit here needs review.

Depends on #26951.

cc @kubernetes/sig-cluster-federation

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-09 18:32:46 -07:00
k8s-merge-robot 005011227e Merge pull request #26904 from madhusudancs/federation-apiserver-protocol
Automatic merge from submit-queue

Prefix scheme/protocol to federation API server URL.

cc @kubernetes/sig-cluster-federation 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-09 18:32:42 -07:00
Colin Hom 5f7c7ad195 document federation e2e cli flow 2016-06-09 15:11:52 -07:00
mfanjie 640d7dc7d1 fix clusterSyncLoop to always update services from latest cache 2016-06-08 15:54:22 +08:00
Quinton Hoole c578678820 Merge pull request #26914 from nikhiljindal/FedAPIServerSecret
Updating federation up script to create secrets with federation-apiserver and k8s apiservers kubeconfigs
2016-06-07 22:29:39 -07:00
nikhiljindal 9443bf0f9c Adding secrets for kubernetes clusters as well 2016-06-07 17:30:15 -07:00
nikhiljindal b4da46974c Updating federation up script to create a secret with federation-apiserver kubeconfig 2016-06-07 14:21:04 -07:00
Madhusudan.C.S 227e836ca5 Add a TODO to enable admission control in federation apiserver when the support is added. 2016-06-07 12:18:45 -07:00
Madhusudan.C.S 7355b3f1ca Prefix scheme/protocol to federation API server URL. 2016-06-06 11:56:27 -07:00
mfanjie 6dde087f69 change clientset of service controller to versioned one 2016-06-06 17:04:26 +08:00
mfanjie c2dbce68f1 extract public function for build cluster config so that other controller can reuse 2016-06-06 10:36:35 +08:00
k8s-merge-robot 15b382be82 Merge pull request #26819 from nikhiljindal/FedAPIServerSecret
Automatic merge from submit-queue

federation: Updating federation-controller-manager to use secret to get federation-apiserver's kubeconfig

Fixing the credentials problem: https://github.com/kubernetes/kubernetes/issues/26762#issuecomment-223690990.

Admin will create a secret with the name "federation-apiserver-secret" in the k8s cluster hosting the federation control plane. This secret will contain the kubeconfig to access federation-apiserver.
federation-controller-manager will use this secret to contact the federation-apiserver.
This flow is same as the one used by all federation-controllers to contact k8s apiservers that are part of the federation.

cc @kubernetes/sig-cluster-federation @lavalamp @erictune @colhom
2016-06-03 20:39:00 -07:00
Quinton Hoole 5b421842be Added AWS Route53 libraries to godeps. 2016-06-03 15:55:30 -07:00
Quinton Hoole 7c14d767c5 AWS Route53 dnsprovider 2016-06-03 15:51:54 -07:00
nikhiljindal 98c9fbb529 Updating federation-controller-manager to use secret to get federation-apiserver's kubeconfig 2016-06-03 15:16:45 -07:00
k8s-merge-robot 1288106608 Merge pull request #26676 from nikhiljindal/admissionControl
Automatic merge from submit-queue

federation: Update the list of supported admission controls

Ref https://github.com/kubernetes/kubernetes/pull/26298#issuecomment-221697124

In 1.3, we are going to support only AlwaysAdmit and AlwaysDeny admission controls.
Updating the documentation accordingly.

@kubernetes/sig-cluster-federation
2016-06-02 06:05:15 -07:00
k8s-merge-robot 3b908a538d Merge pull request #26605 from nikhiljindal/clusterControllerE2eTest
Automatic merge from submit-queue

federation: Adding federation controller manager to federation e2es

Adding federation controller manager to federation e2es.
Havent been able to verify that this works: https://github.com/kubernetes/kubernetes/pull/25125#issuecomment-222860475

Followed the same patter as federation-apiserver and made the changes at same places, so hopefully should work :)
2016-06-02 03:36:47 -07:00
nikhiljindal d2ea7a29ab Add federation controller manager to federation e2es 2016-06-02 00:17:11 -07:00
k8s-merge-robot cf234ab67d Merge pull request #26251 from caesarxuchao/add-serializer
Automatic merge from submit-queue

Add direct serializer

Fix #25589. Implemented a direct codec that doesn't do conversion, but sets the group, version and kind before serialization as Clayton suggested [here](https://github.com/kubernetes/kubernetes/issues/25589#issuecomment-219168009).

First commit is cherry-picked from #24826.

@kubernetes/sig-api-machinery
2016-06-01 23:31:47 -07:00
nikhiljindal fe3cba94bf Update the list of supported admission controls 2016-06-01 18:51:09 -07:00
Quinton Hoole 65e1fecab5 Integrate federated service DNS record management 2016-06-01 16:24:14 -07:00
nikhiljindal 8e3e5a8b85 load secretRef only if it is present 2016-05-31 18:17:42 -07:00
Chao Xu f32f3966d6 add DirectCodec; use it in release_1_3 clientset 2016-05-31 10:14:24 -07:00
k8s-merge-robot 1c7aa9c8e2 Merge pull request #26325 from quinton-hoole/2016-05-25-federation-cluster-status-zone-update
Automatic merge from submit-queue

Add federation cluster status zone update

Hi Nikhil

Here's the cluster zone update stuff we discussed today.

What's remaining:

1. Rebase against #26308 (as soon as it merges) to expose the zones and region fields of cluster status.
2. Get hold of a cluster client via which to query nodes in the cluster. Currently we only have a DiscoveryClient, which doesn't know how to list nodes.

Any advice on the latter much appreciated.  Specifically how do I get a cluster client from a discovery client?

Q
2016-05-29 00:40:09 -07:00
Quinton Hoole eff728a46d Merge pull request #26034 from mfanjie/federation-service-controller
Federation service controller
2016-05-28 11:25:25 -07:00
Quinton Hoole 85a0de3300 Use secrets to configure kube clients in federation cluster controller, and cache kube clients. 2016-05-28 11:19:13 -07:00
Quinton Hoole 20c75956fd Add federation cluster status zone and region update. 2016-05-28 11:15:23 -07:00
mfanjie 6133db345f add federation service controller 2016-05-29 00:25:07 +08:00
k8s-merge-robot 3b2b647409 Merge pull request #25983 from smarterclayton/cumulative
Automatic merge from submit-queue

Make UnsafeConversion fast by inlining copies

Not ready yet (need to add a copy to "safe" conversion and add mutation tests to roundtrip api/serialization_test).

Cuts another 10% off decode and encode.
2016-05-28 09:02:53 -07:00
Clayton Coleman 2faf49c75c
Generated fields for inlining 2016-05-28 08:53:22 -04:00
Quinton Hoole 0af78dcce7 Google Cloud DNS dnsprovider rewrite/refactor for unit tests. Successfully Tested against both real backend and stubbed backend. 2016-05-27 15:22:43 -07:00
Quinton Hoole 8fb3c81ac3 Add zones and region to federation cluster API object status. 2016-05-27 12:24:44 -07:00
Alex Robinson 4db3cc7e5e Merge pull request #26396 from colhom/fix-federation-build
Fix docker load error in federation image push
2016-05-27 11:44:32 -07:00
k8s-merge-robot 4047ca1d97 Merge pull request #26132 from nikhiljindal/newmaster
Automatic merge from submit-queue

federation: replacing string credentials field by secretRef

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

Replaced the string Credentials field in ClusterSpec by secretRef as discussed in https://github.com/kubernetes/kubernetes/issues/25761.
Also updated the clusterController to use this new secretRef field while creating a client to talk to a k8s cluster.

cc @lavalamp @kubernetes/sig-cluster-federation
2016-05-27 08:31:58 -07:00
Eric Paris cd700ee3eb Merge pull request #26313 from nikhiljindal/fedServerDoc
federation: Adding a tool to generate docs for federation apiserver and controller manager
2016-05-26 23:09:51 -04:00
Colin Hom f9e32118dc Fix docker load error in federation image push 2016-05-26 19:44:09 -07:00
k8s-merge-robot 2127a40596 Merge pull request #26142 from nikhiljindal/registerDeepCopyGeneratedFuncs
Automatic merge from submit-queue

federation: Adding deep copy funcs for v1 objects in federation apiserver

Trying to fix https://github.com/kubernetes/kubernetes/issues/26111
2016-05-26 19:17:54 -07:00
Colin Hom a092fd2dd4 Federation build and e2e test integration
Federation components are now buildable and e2e-testable via e2e.go.
2016-05-25 15:07:27 -07:00
nikhiljindal f98bda0b47 Adding a tool to generate federation docs 2016-05-25 15:04:20 -07:00
k8s-merge-robot f5b5d2bc26 Merge pull request #26196 from nikhiljindal/renameFedAPIServer
Automatic merge from submit-queue

Renaming federated-apiserver to federation-apiserver

Its not a "federated" apiserver. Its an apiserver for federation.

The corresponding controller manager is also called federation-controller-manager.

If we are going to rename, it should be done in 1.3 before people write scripts referencing the binary name.
2016-05-24 15:21:11 -07:00
nikhiljindal 8edb2d87cc Adding missing defaulting, deep copies and conversion funcs for v1 resources in federation 2016-05-24 15:16:26 -07:00
nikhiljindal 991eb753a2 Renaming federated-apiserver to federation-apiserver 2016-05-24 11:49:39 -07:00
nikhiljindal dca310aa88 Updating tests 2016-05-24 00:27:39 -07:00
nikhiljindal 9b604242c6 Updating the federation cluster controller to use secretRef to contact the server 2016-05-23 21:50:00 -07:00
nikhiljindal 236eb42664 Updating generated code 2016-05-23 21:50:00 -07:00
nikhiljindal 57ea89a512 Replacing string Credentials by SecretRef in API 2016-05-23 21:49:59 -07:00
Jordan Liggitt 29252acd1a Change rest storage Update interface to retrieve updated object
Add OldObject to admission attributes

Update resthandler Patch/Update admission plumbing
2016-05-23 21:09:26 -04:00
Daniel Smith 5448400b1c Merge pull request #25243 from smarterclayton/explore_quantity
Provide an int64 version of Quantity that is much faster
2016-05-19 16:56:48 -07:00
k8s-merge-robot d89d45a861 Merge pull request #25266 from smarterclayton/common_storage
Automatic merge from submit-queue

kube-apiserver options should be decoupled from impls

A few months ago we refactored options to keep it independent of the
implementations, so that it could be used in CLI tools to validate
config or to generate config, without pulling in the full dependency
tree of the master.  This change restores that by separating
server_run_options.go back to its own package.

Also, options structs should never contain non-serializable types, which
storagebackend.Config was doing with runtime.Codec. Split the codec out.

Fix a typo on the name of the etcd2.go storage backend.

Finally, move DefaultStorageMediaType to server_run_options.

@nikhiljindal as per my comment in #24454, @liggitt because you and I
discussed this last time
2016-05-19 06:13:38 -07:00
Clayton Coleman 5e4308f91d
Update use of Quantity in other classes 2016-05-19 08:41:43 -04:00
k8s-merge-robot 4f09f51486 Merge pull request #24800 from thockin/validation_pt8-3
Automatic merge from submit-queue

Make name validators return string slices

Part of the larger validation PR, broken out for easier review and merge.  Builds on previous PRs in the series.
2016-05-19 02:15:27 -07:00
k8s-merge-robot 3a5d53d467 Merge pull request #23430 from huangyuqi/uber-cluster-manager
Automatic merge from submit-queue

Implement the cluster-controller of kubernetes federation

This PR is the cluster-controller of kubernetes federation.
This controller of federation phase 1 just collect the status of federated clusters.
2016-05-18 10:07:27 -07:00
Clayton Coleman 633683c08d
kube-apiserver options should be decoupled from impls
A few months ago we refactored options to keep it independent of the
implementations, so that it could be used in CLI tools to validate
config or to generate config, without pulling in the full dependency
tree of the master.  This change restores that by separating
server_run_options.go back to its own package.

Also, options structs should never contain non-serializable types, which
storagebackend.Config was doing with runtime.Codec. Split the codec out.

Fix a typo on the name of the etcd2.go storage backend.

Finally, move DefaultStorageMediaType to server_run_options.
2016-05-18 10:39:21 -04:00
Tim Hockin 152c86ab06 Make name validators return string slices 2016-05-18 00:48:01 -07:00
jianhuiz cf0c1fee44 register service object only 2016-05-16 15:27:42 -07:00
jianhuiz 101b479299 add service api object without proxy 2016-05-16 15:27:42 -07:00
huangyuqi 21fe26bd07 remove the rs&subrs logic from cluster controller 2016-05-16 16:48:27 +08:00
k8s-merge-robot 67eaa02bd1 Merge pull request #25453 from nikhiljindal/fedServerAuth
Automatic merge from submit-queue

Moving federation-apiserver to use genericapiserver.ServerRunOptions and deleting federation-apiserver options

The remaining params were related to authz and authn and one parameter for WatchCacheSize.
Have moved them to genericapiserver.ServerRunOptions and now federation-apiserver can just use genericapiserver.ServerRunOptions()


cc @jianhuiz @kubernetes/sig-cluster-federation
2016-05-14 03:24:34 -07:00
k8s-merge-robot 0165fd2f6f Merge pull request #25443 from nikhiljindal/tryingClientGen
Automatic merge from submit-queue

Adding Services to federation clientset

Commits:
1. Regenerate the client without any changes to client-gen
2. Update clientgen to add a parameter to specify generating client only for Services v1 object.
3. Regenerate federation_internalclientset
4. Regenerate federation_release_1_3


Second commit is the most important one. Other 3 commits are auto generated by running client-gen.
I have added a command line argument to client-gen that takes in a list of group/version/resource. If a group version is part of this list, then only the resources in this list are included in the client. For other group versions, the existing check of genclient=true in types.go is used.

Other alternatives considered were:
* Update genclient in types.go to mention the clientset name in which it should be included instead of just saying genclient=true (so Services will say genclient=core,federation while all other v1 resources will say genclient=core). This requires a code change in types.go to change a client set.
* Create another types.go which will only include Services and use that to generate federation clientset. This will lead to duplicate Service definition.


cc @caesarxuchao @lavalamp @jianhuiz @mfanjie @kubernetes/sig-cluster-federation 

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/25443)
<!-- Reviewable:end -->
2016-05-14 00:20:28 -07:00
huangyuqi 649b2c6e20 implement cluster controller 2016-05-14 11:24:00 +08:00
huangyuqi 227a17f317 duplicate the controller manager from kubernetes 2016-05-14 11:24:00 +08:00
nikhiljindal b1fdd4180b Regenerating the federation client with updated client gen 2016-05-13 14:12:58 -07:00
Matt Liggett 2bc46d5085 It's 2016, yo. 2016-05-13 12:41:40 -07:00
k8s-merge-robot 87d11300f0 Merge pull request #25447 from nikhiljindal/verifyFedClientGen
Automatic merge from submit-queue

Updating hack/update-codegen to keep federation_clientset updated

Right now, there is no check for this and hence federation_clientset becomes stale over time.
Updating hack/update-codegen to keep federation_clientset updated.

hack/verify-codegen.sh ensures that it is updated.


cc @caesarxuchao @lavalamp @jianhuiz @kubernetes/sig-cluster-federation
2016-05-12 00:29:28 -07:00
nikhiljindal 97d346b587 Deleting unused federated-apiserver options 2016-05-11 23:42:55 -07:00
nikhiljindal 5dffe4a969 Moving federation apiserver to use genericapiserver.ServerRunOptions 2016-05-11 23:42:55 -07:00
saadali 666da0ccdc Run codegen and codecgen 2016-05-11 17:15:55 -07:00
saadali b83af3d481 Change "speter.net/go/exp/math/dec/inf" dependency
to "https://gopkg.in/inf.v0"
2016-05-11 17:01:28 -07:00
nikhiljindal 90897efcf6 Running hack/update-codegen.sh so that hack/verify-codegen.sh passes 2016-05-10 17:20:52 -07:00
jianhuiz 4e6e51dc26 copy ServerAddressByClientCIDR to federation types 2016-05-10 10:34:00 -07:00
nikhiljindal 2ffa3b4586 Moving StorageFactory building logic to genericapiserver 2016-05-10 00:57:11 -07:00
Clayton Coleman 7104be87cb
Regenerate conversions without reflection defaulting 2016-05-07 11:55:31 -04:00
k8s-merge-robot 4a7ec6034f Merge pull request #23928 from caesarxuchao/cascading-deletion-API-changes
Automatic merge from submit-queue

API changes for Cascading deletion 

This PR includes the necessary API changes to implement cascading deletion with finalizers as proposed is in #23656. Comments are welcome.

@lavalamp @derekwaynecarr @bgrant0607 @rata @hongchaodeng
2016-05-05 19:46:40 -07:00
Clayton Coleman e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
k8s-merge-robot 085b172395 Merge pull request #24887 from nikhiljindal/runOptions
Automatic merge from submit-queue

Deleting duplicate code from federated-apiserver.Run()

This removes most of duplicate code from federated-apiserver.Run().
The code remaining is related to storage or authz and authn.
https://github.com/kubernetes/kubernetes/pull/24787 refactors the storage related code.
I am still figuring out authz and authn.

cc @jianhuiz
2016-05-05 06:50:56 -07:00
Chao Xu 4562a26d34 generated changes 2016-05-04 21:54:55 -07:00
Wojciech Tyczynski 303742ce12 Merge pull request #24723 from smarterclayton/strip_noop_imports
Protobuf generation should strip side-effect imports
2016-05-04 11:16:45 +02:00
nikhiljindal 16c0e0a21c Deleting duplicate code from federated-apiserver 2016-05-03 14:04:09 -07:00
Clayton Coleman 99430cf5de
Strip side-effect imports from generated protobuf 2016-05-02 18:12:20 -04:00
jianhuiz e5bb7559b5 change port of tests for federated-apiserver to avoid conflict 2016-05-02 11:25:45 -07:00
k8s-merge-robot 8fba6de835 Merge pull request #24117 from XiaoningDing/federation-client
Automatic merge from submit-queue

Federation client for cluster

generate v1alpha1 and unversioned client for federation/clusters

#23653, requires #23847, #23998

@nikhiljindal @quinton-hoole @caesarxuchao
2016-05-02 01:41:08 -07:00
jianhuiz 09fcfed10a add import_known_version.go for federation clientset 2016-04-28 16:29:04 -07:00
jianhuiz d169fa6864 generate v1alpha and unversioned clientset for federation/clusters 2016-04-28 16:27:22 -07:00
Hongchao Deng c0071a1595 add flags to enable etcd3 2016-04-28 09:48:16 +08:00
jianhuiz fdfe42ea44 move install of version handler to genericapiserver 2016-04-27 10:21:08 -07:00
jianhuiz 3bdd4130cd add protobuf generation 2016-04-26 02:08:10 -07:00
jianhuiz 384f801cb0 replace cluster phase with conditions 2016-04-26 02:06:47 -07:00
jianhuiz b195732a59 register federation/clusters to federated-apiserver 2016-04-26 02:06:47 -07:00
jianhuiz 1c1ad1ad3f add cluster registry 2016-04-26 02:06:47 -07:00
jianhuiz fcb241d05c add api group 'federation' and 'cluster' object 2016-04-26 02:05:51 -07:00
nikhiljindal beebca1bb9 Stop depending on pkg/master in federated-apiserver 2016-04-22 11:47:05 -07:00
nikhiljindal f9f1e21e08 Moving master.SSHTunneler to genericapiserver 2016-04-22 11:47:05 -07:00
nikhiljindal c3b124d550 call genericapiserver directly instead of going via master in federated-apiserver 2016-04-21 12:00:19 -07:00
deads2k 6670b73b18 make storage enablement, serialization, and location orthogonal 2016-04-21 08:18:55 -04:00
nikhiljindal 58ead776b3 Removing ServiceAccount auth options from federated apiserver 2016-04-18 17:22:15 -07:00
nikhiljindal 831c8d7594 Remove federated apiserver's dependency on kubernetes api objects 2016-04-18 17:22:15 -07:00
goltermann a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
jianhuiz ca72bbabe1 update references of kube-apiserver to federated-apiserver 2016-03-30 10:18:23 -07:00
jianhuiz d1e47a8811 duplicate /cmd/kube-apiserver to /federation/cmd/federated-apiserver 2016-03-30 10:18:23 -07:00