Commit Graph

569 Commits (2832efabd7ece2749871eff7bb100554ff8f74f4)

Author SHA1 Message Date
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
Marcin Wielgus 3216336923 Set annotation name in federated replica set controller 2016-08-23 11:48:25 +02:00
Marcin Wielgus 1f5605763f ObjectMeta equivalence in federated controller handlers + update in fed secrets 2016-08-23 11:45:01 +02:00
Kubernetes Submit Queue 13305ef0ff Merge pull request #31139 from nikhiljindal/namespaceAdmissionControl
Automatic merge from submit-queue

federation: Adding support for namespace admission controls in federation-apiserver

Now that we have namespaces in federation apiserver, we can support namespace admission controls.

There are 3 of these:
namespace/autoprovision, namespace/exists and namespace/lifecycle.
namespace/autoprovision, namespace/exists should be deprecated in kubernetes(https://github.com/kubernetes/kubernetes/issues/31195). Adding support for namespace/lifecycle to federation-apiserver.
As in kube-apiserver, enabling namespace/lifecycle by default.


```release-note
Action required: If you have a running federation control plane, you will have to ensure that for all federation resources, the corresponding namespace exists in federation control plane.

federation-apiserver now supports NamespaceLifecycle admission control, which is enabled by default. Set the --admission-control flag on the server to change that.
```

cc @kubernetes/sig-cluster-federation @quinton-hoole
2016-08-23 00:19:08 -07:00
jianhuiz 494129b089 add generated files 2016-08-22 23:00:23 -07:00
nikhiljindal db7af6c0d7 Fixing/updating e2e tests 2016-08-22 21:49:34 -07:00
jianhuiz 7be20b0dac add ClusterName field to ObjectMeta 2016-08-22 21:09:57 -07:00
nikhiljindal 18a8597a4e Enabling namespace admission controls 2016-08-22 17:28:03 -07:00
Quinton Hoole 97d6494c41 Add Federated Ingress Controller. 2016-08-22 12:59:54 -07:00
jianhuiz 257bda7e1c review fix 2016-08-22 09:27:31 -07:00
jianhuiz 7598d43db0 use palnner v2 and pod analyzer 2016-08-22 09:27:31 -07:00
jianhuiz a491580597 add federation replicaset controller 2016-08-22 09:27:30 -07:00
Kubernetes Submit Queue 069929bbfd Merge pull request #31076 from mwielgus/object-meta
Automatic merge from submit-queue

Object meta fixes in federation controllers

This PR adds helper functions for handling object meta structs and applies them to the existing controllers.

cc: @quinton-hoole @jianhuiz @kubernetes/sig-cluster-federation
2016-08-21 13:19:55 -07:00
Marcin Wielgus 9b00a6654c Comments and extra tests for federated ObjectMeta utils 2016-08-21 21:14:07 +02:00
Kubernetes Submit Queue 7979801e54 Merge pull request #28860 from ericchiang/separate-apiserver-authz-options
Automatic merge from submit-queue

pkg/genericapiserver/options: don't import pkg/apiserver

Refactor the authorization options for the API server so
pkg/apiserver isn't directly imported by the options package.

Closes #28544

cc @smarterclayton

@madhusudancs, @nikhiljindal I've updated `federation/cmd/federation-apiserver/app/server.go` to include the RBAC options with this change. I don't know if this was intentionally left out in the first place but would like your feedback.
2016-08-21 09:49:14 -07:00
Marcin Wielgus b0ec300ce8 Apply object meta functions to controllers 2016-08-21 13:02:55 +02:00
Marcin Wielgus 66df63f618 Object meta helper functions for federated controller 2016-08-21 13:02:19 +02:00
Kubernetes Submit Queue ada58f5ff2 Merge pull request #30823 from nikhiljindal/swaggerDocs
Automatic merge from submit-queue

Adding a script to fetch swagger spec from federation apiserver

First step for https://github.com/kubernetes/kubernetes/issues/30541.
Next step is to generate docs like http://kubernetes.io/docs/api-reference/v1/definitions/ from this swagger spec.

cc @kubernetes/sig-cluster-federation @kubernetes/sig-api-machinery
2016-08-20 18:09:58 -07:00
Kubernetes Submit Queue eaa2b6f528 Merge pull request #31042 from jianhuiz/federation-informer-kube-client
Automatic merge from submit-queue

Federation informer use kube clientset for target

This is to use kubernetes clientset as the federation informer target clientset as it's used to talking the k8s cluster.

#29939 #30669 #30207
@mwielgus @quinton-hoole @kshafiee @deepak-vij
2016-08-20 08:06:08 -07:00
nikhiljindal 56a2458d29 Adding cert and basic auth files for federation-apiserver 2016-08-20 02:17:39 -07:00
Kubernetes Submit Queue 5caf74c517 Merge pull request #30529 from hongchaodeng/r1
Automatic merge from submit-queue

change all PredicateFunc to use SelectionPredicate

What?
- This PR changes all PredicateFunc in registry to return SelectionPredicate instead of Matcher interface.

Why?
- We want to pass SelectionPredicate to storage layer. Matcher interface did not expose enough information for indexing.
2016-08-20 00:24:40 -07:00
jianhuiz 47f317eeb3 update federation controllers to use kube clientset 2016-08-19 15:51:41 -07:00
Kubernetes Submit Queue 9bc8240f1a Merge pull request #31028 from mwielgus/secret-fix
Automatic merge from submit-queue

Handle secret namespace and data properly in federated secret controller

This PR fixes what was missed in #30669 review. It uses both namespace and secret name for keying and propagates secret data to underlying clusters.

cc: @quinton-hoole @kshafiee @kubernetes/sig-cluster-federation
2016-08-19 15:47:11 -07:00
Kubernetes Submit Queue 5fb525a309 Merge pull request #30956 from nikhiljindal/clusterName
Automatic merge from submit-queue

federation: updating cluster name validation to allow DNS labels only

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

Summarizing the discussion from that PR:
* Right now, we allow name of the Cluster resource in federation/v1beta1 group version to be a subdomain (group of DNS labels separated by dots). This prevents us from using the cluster name in our dns search paths, since there is a restriction of 6 domain labels there.
* Restricting cluster name to DNS label will give us the flexibility to be able to do that in the future, if we want to. Though we do not have a concrete use case right now, the possibility is attractive.
* There is not a strong argument in favor of allowing subdomains as cluster names right now. If in future, there is one then we can get more permissive but its better to start with a stricter model.

Note that we are breaking a beta API, but it should be fine since we do not expect anyone to be using subdomain as cluster name. Have added release-note-action-required label


```release-note
Action required: federation-only: Please update your cluster name to be a valid DNS label.
Updating federation.v1beta1.Cluster API to disallow subdomains as valid cluster names. Only DNS labels are allowed as valid cluster names now.
```
2016-08-19 15:46:34 -07:00
jianhuiz 65cb176572 use kube clientset to access k8s clusters 2016-08-19 15:00:15 -07:00
Marcin Wielgus 0ec28ac86e Handle secret namespace and data properly in federated secret controller 2016-08-19 23:02:40 +02:00
kshafiee febe9adcf0 Federated secret controller 2016-08-19 17:02:30 +00:00
Kubernetes Submit Queue b6d4462f01 Merge pull request #30983 from mwielgus/planer2
Automatic merge from submit-queue

Support for preexisting replicas and estimated capacity in federated replicaset controller

With this PR the planer will be able to:
* Keep already existing replicas in their current clusters if rebalance = false and min/max boundaries are met.

* Limit the number of replicas in a cluster to the level that was measured by the count of running and unschedulable pods. And provide an estimate how much more pods would be nice to put in a cluster so that if they are scheduled we will be closer to the desired layout or to schedule the desired number of replicas at all.

cc: @quinton-hoole @jianhuiz @wojtek-t @kubernetes/sig-cluster-federation
2016-08-19 08:28:03 -07:00
Marcin Wielgus 8dfdc5b612 Support for preexisting replicas and estimated capacity in federated replica set planner 2016-08-19 16:14:21 +02:00
Marcin Wielgus 03fd876d25 Federated replica set pod analyser 2016-08-19 14:38:40 +02:00
Kubernetes Submit Queue c5e3b79f32 Merge pull request #30634 from timothysc/etcd3_shouldbe_intergration_tests
Automatic merge from submit-queue

Move UTs that block on apiserver to integration tests. 

In validating etcd.v3client we had uncovered that a change in the behavior of the client https://github.com/coreos/etcd/issues/6162 , caused a number of unit tests to fail.  These test failures were due to the fact that the unit tests were trying to standup a apiserver even though there was no etcd backend stood up.  

This PR simply shuffles those tests to integration tests, which is where they should be. 

/cc @kubernetes/sig-scalability @wojtek-t @hongchaodeng @xiang90
2016-08-18 18:39:13 -07:00
nikhiljindal 473c1d5653 Update cluster name validation to allow only DNS labels 2016-08-18 18:19:19 -07:00
nikhiljindal d76cdc7482 Adding a script to fetch swagger spec from federation apiserver 2016-08-18 17:19:21 -07:00
Kubernetes Submit Queue 83ded2858c Merge pull request #28568 from xiangpengzhao/check_ensureDnsRecords_return_value
Automatic merge from submit-queue

Check return value when calling ensureDnsRecords

When [lockedUpdateDNSRecords](https://github.com/xiangpengzhao/kubernetes/blob/check_ensureDnsRecords_return_value/federation/pkg/federation-controller/service/servicecontroller.go#L723) calls `ensureDnsRecords`, it should check the return value. If it returns error, the `ensuredCount ` should not increment.
2016-08-18 16:25:09 -07:00
Eric Chiang b4eaf625a0 pkg/genericapiserver/options: don't import pkg/apiserver
Refactor the authorization options for the API server so
pkg/apiserver isn't directly imported by the options package.
2016-08-18 13:01:50 -07:00
Timothy St. Clair d6606a6aa9 etcd3 validation showed that several unit tests that depend on apiserver being fully
stood up should be integration tests, not unit tests.
2016-08-18 14:12:24 -05:00
Kubernetes Submit Queue b15c2d67e6 Merge pull request #30872 from mwielgus/fed-informer-deadlock
Automatic merge from submit-queue

Fix deadlock possibility in federated informer

On cluster add subinformer locks and tries to add cluster to federated informer. When someone checks if everything is in sync federated informer is locked and then subinformer is inspected what apparently requires a lock. With really bad timing this can create a deadlock.

This PR ensures that there is always at most 1 lock taken in federated informer.

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

Fixes: #30855
2016-08-18 08:31:26 -07:00
Marcin Wielgus 420bab477e Federated namespace controller - stop reconcilation if not in sync 2016-08-18 14:48:38 +02:00
Marcin Wielgus 681d153050 Fix deadlock possibility in federated informer 2016-08-18 14:37:38 +02:00
Marcin Wielgus 23ca79bd53 Remove Set/GetClusterName hack from federated libs: 2016-08-18 08:04:46 +02:00
Marcin Wielgus c75cefa296 FederatedInformer returns clusterName + obj pair when needed 2016-08-18 07:48:21 +02:00
Kubernetes Submit Queue 3a938dac07 Merge pull request #30207 from mwielgus/namespace-controller
Automatic merge from submit-queue

Federated namespace controller

Implemented based on federation common libs.

Depends on #30126.

cc: @quinton-hoole @wojtek-t @kubernetes/sig-cluster-federation
2016-08-17 09:19:45 -07:00
Timothy St. Clair 730fc70107 Update etcd default ports for v3, and validate tests 2016-08-17 07:49:19 -05:00
Kubernetes Submit Queue 60579ee628 Merge pull request #30433 from madhusudancs/fed-dns-provider-test-A-CNAME-fix
Automatic merge from submit-queue

Update dnsprovider multi-type support test to test for an A-record and an AAAA-record.

Having an A-record and a CNAME-record in the tests led to a confusion
that dns providers support such configurations. This change avoids
that confusion by putting only compatible records for the same domain
name in the tests.

cc @kubernetes/sig-cluster-federation
2016-08-16 23:38:14 -07:00
Kubernetes Submit Queue fc7a7f5f7d Merge pull request #30655 from nikhiljindal/fedSwagger
Automatic merge from submit-queue

Fixing the error in registering /v1 api

Temporary fix for https://github.com/kubernetes/kubernetes/issues/30635.

Am working on a proper fix, but its much bigger.
Would be good to unblock devs in the meantime.

cc @lavalamp @kubernetes/sig-api-machinery
2016-08-16 20:28:59 -07:00
Madhusudan.C.S b4ea59e65a Update dnsprovider multi-type support test to test for an A-record and an AAAA-record.
Having an A-record and a CNAME-record in the tests led to a confusion
that dns providers support such configurations. This change avoids
that confusion by putting only compatible records for the same domain
name in the tests.
2016-08-16 14:38:16 -07:00
Marcin Wielgus c1cbe4771b Use backoff from util/flowcontroll in federated namespace controller and other minor fixes 2016-08-16 21:51:24 +02:00
Marcin Wielgus 378a49613f Enable federated namespace controller 2016-08-16 21:05:50 +02:00
Marcin Wielgus b2c192bcc9 Federated Namespace Controller test 2016-08-16 21:05:50 +02:00
Marcin Wielgus e428ffe879 Federated namespace controller 2016-08-16 21:05:50 +02:00
Kubernetes Submit Queue ce302c0c55 Merge pull request #30509 from mwielgus/set-client
Automatic merge from submit-queue

SetClientFactory in FederatedInformer

For unit tests.

cc: @quinton-hoole @wojtek-t @kubernetes/sig-cluster-federation
2016-08-16 11:10:58 -07:00
nikhiljindal 217d2f57e9 Fixing the error in registering /v1 api 2016-08-15 21:11:32 -07:00
Kubernetes Submit Queue 69419a145a Merge pull request #29802 from jfrazelle/fix-go-vet-errors
Automatic merge from submit-queue

fix go vet errors

<!--
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.
-->

```release-note
```

This fixes the `go vet` errors brought about by go 1.7 testing re (#28742).

The are all pretty trivial and mostly related to literal composites.

also related to #16086
2016-08-15 13:10:08 -07:00
Kubernetes Submit Queue ef16cb78a7 Merge pull request #30564 from nikhiljindal/eventsE2e
Automatic merge from submit-queue

Adding events to federation clientset and adding an e2e

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

events was added to federation-apiserver in https://github.com/kubernetes/kubernetes/pull/30421

cc @kubernetes/sig-cluster-federation @mfanjie
2016-08-15 12:18:18 -07:00
Hongchao Deng 75fe25e717 generic.Matcher -> *generic.SelectionPredicate 2016-08-13 21:52:11 -07:00
Hongchao Deng d4afb781c3 change all PredicateFunc to use SelectionPredicate 2016-08-13 10:11:35 -07:00
Kubernetes Submit Queue e39d7f71e6 Merge pull request #30251 from hongchaodeng/r2
Automatic merge from submit-queue

Move new etcd storage (low level storage) into cacher

In an effort for #29888, we are pushing forward this:

What?
- It changes creating etcd storage.Interface impl into creating config
- In creating cacher storage (StorageWithCacher), it passes config created above and new etcd storage inside.

Why?
- We want to expose the information of (etcd) kv client to cacher. Cacher storage uses this information to talk to remote storage.
2016-08-13 10:09:49 -07:00
Kubernetes Submit Queue df1abb40ec Merge pull request #30246 from liggitt/certificates
Automatic merge from submit-queue

Set user info in CertificateSigningRequest.Spec on create

Fixes #30239
2016-08-12 23:03:18 -07:00
Hongchao Deng d0938094d9 move new etcd storage into cacher 2016-08-12 18:40:20 -07:00
Kubernetes Submit Queue b7ccc15b0a Merge pull request #30559 from mwielgus/informer-quick-fix
Automatic merge from submit-queue

Fix in default client factory in federated informer

This wasn't catched by junit tests because we mock the factory.
2016-08-12 18:38:48 -07:00
Kubernetes Submit Queue 2b34988712 Merge pull request #29515 from madhusudancs/fed-makefile
Automatic merge from submit-queue

A build and deploy script to manage cluster federation lifecycle and a Makefile wrapper to drive that process.

Also includes a sample config file to describe clusters.

The build script implements the following things:
1. Generates the required configs.
2. Builds the hyperkube binary and the corresponding docker image.
3. Pushes the image to a specified repository.
4. Pulls the federation installer docker images.
5. Builds the Kubernetes clusters described the config.json file.
6. Pushes the federation components to one of the Kubernetes clusters
   built in the previous step.
7. Also turns down the federation components and the Kubernetes
   clusters.

**NOTE**: Installer images are right now being pulled from my public repository of docker images. I am working on pushing them to our release repository.

```release-note
Cluster Federation components can now be built and deployed using the make command. Please see federation/README.md for details.
```

cc @kubernetes/sig-cluster-federation @colhom 

Fixes: Issue #26655
2016-08-12 18:02:46 -07:00
nikhiljindal 2619d0440d Adding events to federation clientset and adding an e2e 2016-08-12 17:47:49 -07:00
Marcin Wielgus 9c794c4296 Fix in default client factory in federated informer 2016-08-13 02:12:35 +02:00
nikhiljindal 1d76884336 Adding events to federation apiserver 2016-08-12 10:48:19 -07:00
Marcin Wielgus 8dbe762e6f SetClientFactory in FederatedInformer 2016-08-12 17:34:01 +02:00
Daniel Smith 77f5813194 update generated files, including the client 2016-08-11 17:06:55 -07:00
Daniel Smith f1fd638962 fix register.go files up + add test import 2016-08-11 17:06:54 -07:00
Marcin Wielgus 8b53924a97 Federation - common libs - get clientset for cluster 2016-08-11 16:21:34 +02:00
Madhusudan.C.S f3c82af6b6 Switch tab indentation to two spaces. 2016-08-10 23:52:42 -07:00
Madhusudan.C.S fd03b9c43e Add a TODO to re-evaluate jq dependency. 2016-08-10 23:47:29 -07:00
Madhusudan.C.S 7f20effd92 Ensure the provider is supported and exit otherwise. 2016-08-10 23:32:00 -07:00
Madhusudan.C.S 1c8b418383 Docs munger and flags verification fixes. 2016-08-10 23:31:57 -07:00
Madhusudan.C.S 40642fdd28 Add detect-project capability. 2016-08-10 23:24:40 -07:00
Madhusudan.C.S 616eab0296 Add a README.md file for cluster federation. 2016-08-10 23:24:40 -07:00
Madhusudan.C.S 32c181daeb Add a function to ensure that required credential files exist. 2016-08-10 23:24:40 -07:00
Madhusudan.C.S dbdc91fc79 Recompute KUBE_VERSION after rebuild in the dev environment. 2016-08-10 23:24:39 -07:00
Madhusudan.C.S 2efdc24b7f Build both kubectl and hypekube together, one is required for the other. 2016-08-10 23:24:39 -07:00
Madhusudan.C.S a78d2851d9 Installer images are supposed to be public, so we can directly pull without gcloud prefix. 2016-08-10 23:24:39 -07:00
Madhusudan.C.S a527204a60 Add some status logging. 2016-08-10 23:24:38 -07:00
Madhusudan.C.S c4d4aff0d3 Implement a build and deploy script to turn up/down federation.
Also, wrap the script around a Makefile. And also provide a sample
config file to describe clusters.

The build script implements the following things:
1. Generates the required configs.
2. Builds the hyperkube binary and the corresponding docker image.
3. Pushes the image to a specified repository.
4. Pulls the federation installer docker images.
5. Builds the Kubernetes clusters described the config.json file.
6. Pushes the federation components to one of the Kubernetes clusters
   built in the previous step.
7. Also turns down the federation components and the Kubernetes
   clusters.
2016-08-10 23:24:38 -07:00
Jess Frazelle 7e9d82129e
fix go vet errors
Signed-off-by: Jess Frazelle <jessfraz@google.com>

fix composites

Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 16:45:41 -07:00
Kubernetes Submit Queue 1d4e0ea3c1 Merge pull request #30341 from sttts/sttts-simplify-deepcopy-canonical-element
Automatic merge from submit-queue

Simplify canonical element term in deepcopy

Replace the old functional canonical element term in deepcopy registration with direct struct instantiation.

The old way was an artifact of non-uniform pointer/non-pointer types in the signature of deepcopy function. Since we changed that to always be a pointer, we can simplify the code.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30341)
<!-- Reviewable:end -->
2016-08-10 16:34:07 -07:00
Marcin Wielgus 9f01136df4 Federation - common libs - small changes in delaying deliverer 2016-08-10 17:05:15 +02:00
Marcin Wielgus c435647dd7 Minor fixes in federated controller libraries 2016-08-10 14:25:26 +02:00
Kubernetes Submit Queue ab68ce9676 Merge pull request #30353 from mwielgus/handlers-fed
Automatic merge from submit-queue

Federation - common libs - a set of handy handlers for informers

A common scenario for using informer handlers would be to put the object key in a queue
for global reconciliation.

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30353)
<!-- Reviewable:end -->
2016-08-10 04:45:04 -07:00
Marcin Wielgus 99ba03f423 Federation - common libs - a set of handy handlers for informers 2016-08-10 12:18:35 +02:00
bindata-mockuser 6cce4534f8 Update generated code 2016-08-10 09:12:40 +02:00
Kubernetes Submit Queue 8da4d96839 Merge pull request #30112 from nikhiljindal/federationIngressAPI
Automatic merge from submit-queue

Adding ingress resource to federation apiserver

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

cc @kubernetes/sig-cluster-federation

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30112)
<!-- Reviewable:end -->
2016-08-10 00:08:41 -07:00
Kubernetes Submit Queue 3e006ea298 Merge pull request #29817 from xiangpengzhao/opt-print-info
Automatic merge from submit-queue

Separate long comment into lines



<!-- Reviewable:start -->
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29817)
<!-- Reviewable:end -->
2016-08-09 20:14:14 -07:00
Kubernetes Submit Queue f53a35fb76 Merge pull request #29147 from caesarxuchao/cut-client-repo-staging
Automatic merge from submit-queue

Cut the client repo, staging it in the main repo

Tracking issue: #28559
ref: https://github.com/kubernetes/kubernetes/pull/25978#issuecomment-232710174

This PR implements the plan a few of us came up with last week for cutting client into its own repo:
1. creating "_staging" (name is tentative) directory in the main repo, using a script to copy the client and its dependencies to this directory
2. periodically publishing the contents of this staging client to k8s.io/client-go repo
3. converting k8s components in the main repo to use the staged client. They should import the staged client as if the client were vendored. (i.e., the import line should be `import "k8s.io/client-go/<pacakge name>`). This requirement is to ease step 4.
4. In the future, removing the staging area, and vendoring the real client-go repo.

The advantage of having the staging area is that we can continuously run integration/e2e tests with the latest client repo and the latest main repo, without waiting for the client repo to be vendored back into the main repo. This staging area will exist until our test matrix is vendoring both the client and the server.

In the above plan, the tricky part is step 3. This PR achieves it by creating a symlink under ./vendor, pointing to the staging area, so packages in the main repo can refer to the client repo as if it's vendored. To prevent the godep tool from messing up the staging area, we export the staged client to GOPATH in hack/godep-save.sh so godep will think the client packages are local and won't attempt to manage ./vendor/k8s.io/client-go.

This is a POC. We'll rearrange the directory layout of the client before merge.

@thockin @lavalamp @bgrant0607 @kubernetes/sig-api-machinery

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29147)
<!-- Reviewable:end -->
2016-08-09 17:12:14 -07:00
Kubernetes Submit Queue bd421c9618 Merge pull request #29399 from timothysc/etcd3_scripts
Automatic merge from submit-queue

Update etcd 2.2 references to use 3.0.x

This update an assortment of etcd 2.2.X references to 3.0.4 in the code base.  

/cc @hongchaodeng 

xref: https://github.com/kubernetes/kubernetes/issues/22448

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29399)
<!-- Reviewable:end -->
2016-08-09 11:54:06 -07:00
Timothy St. Clair 24993b0343 Update generated files due to dependency shift.
Also minor bug fix in federation api.
2016-08-09 10:41:09 -05:00
Kubernetes Submit Queue 489b204b07 Merge pull request #30126 from mwielgus/federated_updater
Automatic merge from submit-queue

Federation - common libs - FedratedUpdater

A helper for executing multiple add/update/del operations on federation clusters. Contains a workaround against missing #28921.

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

Fixes: #29869 #30030
Ref: #29347

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30126)
<!-- Reviewable:end -->
2016-08-09 07:28:26 -07:00
Marcin Wielgus d836fd523f Federation - common libs - fedrated updater 2016-08-09 15:39:16 +02:00
Kubernetes Submit Queue da53a24763 Merge pull request #29993 from mksalawa/remove_etcd_default_in_genericapiserver
Automatic merge from submit-queue

Remove default etcd validation in generic apiserver

Moving verification of `--etcd-servers` to the concrete apiserver instead of checking during defaulting in generic apiserver.

The context for this change is that heapster (will be another apiserver) doesn't need to have etcd underneath.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29993)
<!-- Reviewable:end -->
2016-08-09 06:01:48 -07:00
mksalawa a806351cc3 Extract etcd options from genericapiserver. 2016-08-09 13:35:53 +02:00
Kubernetes Submit Queue 15ad9be67f Merge pull request #30249 from hongchaodeng/fix
Automatic merge from submit-queue

make reousrce prefix assignment consistent

Make reousrce prefix assignment consistent with other registries

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30249)
<!-- Reviewable:end -->
2016-08-09 03:40:29 -07:00
Wojciech Tyczynski 8a8cd06ea4 Configurable cache sizes of cachers 2016-08-09 09:41:48 +02:00
Hongchao Deng 5bf2efc581 make reousrce prefix consistent with other registries 2016-08-08 22:19:39 -07:00
Jordan Liggitt 4db004972a
Plumb context to strategy methods 2016-08-08 22:33:25 -04:00
Kubernetes Submit Queue 48c0612805 Merge pull request #29866 from xiangpengzhao/err-to-nil
Automatic merge from submit-queue

Return nil directly when err is nil.

When err is nil, return nil directly instead of `err` to avoid confusion.
2016-08-08 12:23:32 -07:00
Marcin Wielgus fcbb0eef2d Federation common libs - deliverAfer for delaying deliverer 2016-08-08 16:30:10 +02:00
xiangpengzhao 0623f7bcf8 Return nil directly when err is nil. 2016-08-08 04:20:44 -04:00
Chao Xu a771578a1c move pkg/util/ files to their own package to reduce client-go dependencies 2016-08-05 23:32:02 -07:00
Kubernetes Submit Queue 2537f66f0e Merge pull request #29230 from luxas/goimport
Automatic merge from submit-queue

Run goimport for the whole repo

While removing GOMAXPROC and running goimports, I noticed quite a lot of other files also needed a goimport format. Didn't commit `*.generated.go`, `*.deepcopy.go` or files in `vendor`

This is more for testing if it builds.
The only strange thing here is the gopkg.in/gcfg.v1 => github.com/scalingdata/gcfg replace.
cc @jfrazelle @thockin
2016-08-05 16:22:01 -07:00
nikhiljindal af692e3714 Updating the generated client to include ingress 2016-08-05 16:04:34 -07:00
nikhiljindal 89a75e2a85 Adding ingress to federation apiserver 2016-08-05 12:05:21 -07:00
Kubernetes Submit Queue 5f3cc4a941 Merge pull request #30130 from mwielgus/cluster-lifecycle
Automatic merge from submit-queue

Federation - common libs - cluster lifecycle handlers in FederatedInformer

Adds cluster lifecycle handlers to FederatedInformer to execute some actions when a cluster becomes available or unavailable.

ref: #29347

cc: @nikhiljindal @wojtek-t @kubernetes/sig-cluster-federation
2016-08-05 06:53:43 -07:00
Marcin Wielgus fc263877a5 Federation - common libs - cluster lifecycle handlers in FederatedInformer 2016-08-05 15:09:02 +02:00
Kubernetes Submit Queue 1cd07a276c Merge pull request #29138 from kshafiee/pr-27789
Automatic merge from submit-queue

federation: Adding secret API

Adding secret API to federation-apiserver and updating the federation client to include secrets
2016-08-04 18:11:23 -07:00
Kubernetes Submit Queue 7921a9ce67 Merge pull request #25816 from soltysh/scheduledjob_kubectl
Automatic merge from submit-queue

ScheduledJob kubectl

@erictune the last part (kubectl) of the ScheduledJob, as usual builds on top of previous PRs, so only last 2 commits matter (the kubectl one and storage leftovers).

```release-note
* Introducing ScheduledJobs as described in [the proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/scheduledjob.md) as part of `batch/v2alpha1` version (experimental feature).
```
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-04 17:36:07 -07:00
Kubernetes Submit Queue ac266ae85b Merge pull request #29939 from mwielgus/federated_informer
Automatic merge from submit-queue

Federation - common libs - FederatedInformer

Fixes #29383

Will add more tests after the first pass of the review.

ref: #29347

cc: @nikhiljindal @wojtek-t
2016-08-03 13:43:37 -07:00
Marcin Wielgus 040203b40a Federation - common libs - FederatedInformer 2016-08-03 17:53:05 +02:00
Maciej Szulik e6c327048e Forced using batch/v2alpha1 for storing ScheduledJob 2016-08-03 17:25:37 +02:00
Kubernetes Submit Queue 503f5afe1a Merge pull request #29858 from xiangpengzhao/delete-useless-code
Automatic merge from submit-queue

Delete useless code

The correct code is `cluster, ok := obj.(*v1beta1.Cluster)`, so the above `cluster := obj.(*v1beta1.Cluster)` is useless.
2016-08-02 23:36:31 -07:00
kshafiee 262ae3d021 Adding secrets to federation-apiserver & clientset, adding e2e tests 2016-08-03 02:43:48 +00:00
Lucas Käldström c88a07ce1a Run goimports 2016-08-02 15:12:39 +03:00
Madhusudan.C.S 31f5525f43 Revert "[Federation] Downsize the release binary distribution." 2016-08-01 23:54:09 -07:00
k8s-merge-robot 37d3d390df Merge pull request #29632 from madhusudancs/fed-bin-downsize
Automatic merge from submit-queue

[Federation] Downsize the release binary distribution.

There are two things that this PR implements:

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-01 22:55:46 -07:00
Madhusudan.C.S b5bea93954 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.
2016-08-01 11:45:21 -07:00
Madhusudan.C.S 5a3a84968b [Federation] Do not build separate binaries for federation control plane components, hyperkube should be sufficient. 2016-08-01 11:45:21 -07:00
xiangpengzhao 14adb38018 Delete useless code 2016-08-01 13:00:46 -04:00
xiangpengzhao 4ccd90d741 Log error in each loop it appears and fix wrong count of missed cluster. 2016-08-01 06:39:12 -04:00
xiangpengzhao dfd12276df Keep track of missed and unensured counts 2016-08-01 05:21:40 -04:00
xiangpengzhao d4fa23feb8 Check return value when calling ensureDnsRecords 2016-08-01 05:21:40 -04:00
Harry Zhang c495397cae Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
xiangpengzhao 6c9907b042 Separate long comment into lines. 2016-07-29 22:27:24 -04:00
k8s-merge-robot 7e3246d415 Merge pull request #29788 from xiangpengzhao/fix-clientRetryCount
Automatic merge from submit-queue

Keep retry times the same for each place where trying to ensure DNS Records

There are three places where ensureDnsRecords is retried. But they have different retry times. One place [(here)](https://github.com/xiangpengzhao/kubernetes/blob/master/federation/pkg/federation-controller/service/endpoint_helper.go#L107) is clientRetryCount but other two [(here](https://github.com/xiangpengzhao/kubernetes/blob/master/federation/pkg/federation-controller/service/endpoint_helper.go#L138) and [here)](https://github.com/xiangpengzhao/kubernetes/blob/master/federation/pkg/federation-controller/service/endpoint_helper.go#L161) are clientRetryCount + 1. Though this case doesn't have any influence, shouldn't we keep retry times the same each place?

also fix other nits:
use the same log level.
log the error in each loop.

cc @quinton-hoole
2016-07-29 13:33:14 -07:00
k8s-merge-robot 0693d47987 Merge pull request #29241 from jianhuiz/federation-apiserver-extensions-replicaset-client
Automatic merge from submit-queue

Generate federation apiserver extensions replicaset client

generate clientset for extensions/ReplicaSet of federation apiserver

@nikhiljindal @quinton-hoole, @deepak-vij
#24764
2016-07-29 11:40:12 -07:00
xiangpengzhao 60798e7c48 Keep retry times the same for each place where ensureDnsRecords is called. 2016-07-29 12:30:27 -04:00
k8s-merge-robot 2817674715 Merge pull request #29557 from deads2k/make-prefx-configurable
Automatic merge from submit-queue

make the resource prefix in etcd configurable for cohabitation

This looks big, its not as bad as it seems.

When you have different resources cohabiting, the resource name used for the etcd directory needs to be configurable.  HPA in two different groups worked fine before.  Now we're looking at something like RC<->RS.  They normally store into two different etcd directories.  This code allows them to be configured to store into the same location.

To maintain consistency across all resources, I allowed the `StorageFactory` to indicate which `ResourcePrefix` should be used inside `RESTOptions` which already contains storage information.

@lavalamp affects cohabitation.
@smarterclayton @mfojtik prereq for our rc<->rs and d<->dc story.
2016-07-28 03:01:28 -07:00
k8s-merge-robot 313272a22c Merge pull request #29508 from k82cn/add_whitspace
Automatic merge from submit-queue

Remove unnecessary empty line.
2016-07-27 19:52:47 -07:00
deads2k aa3db4d995 make the resource prefix in etcd configurable for cohabitation 2016-07-27 07:51:40 -04:00
k8s-merge-robot d038e22d87 Merge pull request #28062 from colhom/add-colhom-federation-owners
Automatic merge from submit-queue

Add colhom to federation OWNERS

Depends on #28042

\cc @quinton-hoole 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-25 17:33:24 -07:00
k8s-merge-robot e7db6687fc Merge pull request #29455 from mwielgus/frsc-scheduling
Automatic merge from submit-queue

Replica location planner for Federated ReplicaSet Controller

Requires #29385 to be merged.

cc: @quinton-hoole @wojtek-t
2016-07-25 16:16:11 -07:00
Klaus Ma 53b94e16d0 Remove unnecessary empty line. 2016-07-23 19:37:13 +08:00
Marcin Wielgus ed92579d2e Replica location planner for Federated ReplicaSet Controller 2016-07-23 02:04:33 +02:00
k8s-merge-robot eaf3d3f708 Merge pull request #28668 from justinsb/update_dns
Automatic merge from submit-queue

Expose Changesets (transactions) in dns provider

This makes the dnsprovider usable in more scenarios, and it also solves
some TODOs in the federation code.

WIP  - I'm going to test this to make sure this both works and is sufficient for use in my dns controller, but I wanted to put some code behind the talk in #28477.  cc @quinton-hoole 

Issue #28477
2016-07-22 16:25:22 -07:00
k8s-merge-robot 7626539683 Merge pull request #29385 from mwielgus/federated-rs-pref
Automatic merge from submit-queue

API types for FederatedReplicaSetPreferences

Currently only internal types just to unblock the work on scheduling part of Federated Replica Set Controller.
2016-07-22 15:35:13 -07:00
Marcin Wielgus 944e7f77b0 Internal types for FederatedReplicaSetPreferences 2016-07-22 23:35:38 +02:00
Justin Santa Barbara 756c17315b Fix route53 stub matching logic: match name & type 2016-07-22 15:09:04 -04:00
k8s-merge-robot df2cf16ddb Merge pull request #26709 from hodovska/master
Automatic merge from submit-queue

Allow shareable resources for admission control plugins.

Changes allow admission control plugins to share resources. This is done via new PluginInitialization structure. The structure can be extended for other resources, for now it is an shared informer for namespace plugins (NamespiceLifecycle, NamespaceAutoProvisioning, NamespaceExists).

If a plugins needs some kind of shared resource e.g. client, the client shall be added to PluginInitializer and Wants methods implemented to every plugin which will use it.
2016-07-22 11:07:05 -07:00
Justin Santa Barbara 6463a220ee Expose Changesets (transactions) in dns provider
This makes the dnsprovider usable in more scenarios, and it also solves
some TODOs in the federation code.
2016-07-22 08:43:20 -04:00
k8s-merge-robot f7409f3be2 Merge pull request #29368 from mwielgus/delaying_deliverer
Automatic merge from submit-queue

Delaying deliverer for Federated ReplicaSet

A helper struct to push data to a channel after a given delay. It runs on a single gouroutine and allows updates. An update cancels previous delivery if it was about to happen later than the new one. Otherwise the new update is discarded. 
All data require a string key that is used to identify the data (for updates and de-duplication).

cc: @quinton-hoole @wojtek-t
2016-07-22 01:13:57 -07:00
k8s-merge-robot 72a697a13d Merge pull request #28182 from quinton-hoole/2016-06-28-compare-rrsets-properly
Automatic merge from submit-queue

Federation: Use equivalent() instead of == to compare DNS ResourceRecordSets. Fixes #28135

Without this we sometimes incorrectly assume that DNS records hosted on cloud DNS servers need to be replaced when they don't need to be.  This results in unnecessary churn on DNS records.

cc: @nikhiljindal @madhusudancs @mfanjie FYI
2016-07-22 00:41:06 -07:00
jianhuiz e105833660 add generated federation clientsets for extensions/ReplicaSet 2016-07-21 14:00:35 -07:00
Madhusudan.C.S 31e09d326d Add "federation" API group to the known versions list of federation API clients. 2016-07-21 11:55:44 -07:00
Marcin Wielgus 85dd375cc8 Delaying deliverer for Federated ReplicaSet 2016-07-21 16:49:16 +02:00
Dominika Hodovska 037d116add Factory for SharedIndexInformers 2016-07-21 14:04:48 +02:00
Quinton Hoole 3dd1c0088e Use ResourceRecordSetsEquivalent() instead of == to compare rrsets. Fixes #28135 2016-07-20 15:49:19 -07:00
nikhiljindal 11ba8943fe Updating federation controllers to use release_1_4 clientset instead of release_1_3 clientset 2016-07-20 10:56:57 -07:00
Dominika Hodovska ba40a528e1 PluginInitializer as a new part of NewFromPlugins method 2016-07-20 12:53:52 +02:00
Dominika Hodovska fc0a3c6dcb Allow shareable resources for admission control plugins 2016-07-20 12:53:52 +02:00
k8s-merge-robot c305c39bcb Merge pull request #28938 from madhusudancs/fed14-kubeconfig-secret-name
Automatic merge from submit-queue

Change the name of the secret that delivers federation kubeconfig.

```release-note
Federation API server kubeconfig secret consumed by federation-controller-manager has a new name.

If you are upgrading your Cluster Federation components from v1.3.x, please run this command to migrate the federation-apiserver-secret to federation-apiserver-kubeconfig serect;

$ kubectl --namespace=federation get secret federation-apiserver-secret -o json | sed 's/federation-apiserver-secret/federation-apiserver-kubeconfig/g' | kubectl create -f -

You might also want to delete the old secret using this command:

$ kubectl delete secret --namespace=federation federation-apiserver-secret
```

The current name, federation-apiserver-secret, is very similar to the
other secret we have, federation-apiserver-secrets, that delivers
somewhat similar data but in a different format. This is extremely
confusing, particularly while debugging.

This change should soothe the pain.

cc @kubernetes/sig-cluster-federation
2016-07-19 23:50:15 -07:00
k8s-merge-robot 4d896cd3b2 Merge pull request #29008 from justinsb/pages_and_pages_of_hosted_zones
Automatic merge from submit-queue

dnsprovider: Use route53 page functions to avoid truncated results

The List<Type>Pages functions make it pretty easy to avoid result truncation;
switch to using them
2016-07-19 20:29:44 -07:00
k8s-merge-robot d34c3fa328 Merge pull request #24764 from XiaoningDing/federation-apiserver-extensions-replicaset
Automatic merge from submit-queue

Add extensions/replicaset to federation-apiserver

Add extensions/replicaset for federated scheduler (#24038) as all k8s api objects were removed in #23959

Please review only the very last one commit.

#19313 #23653 
@nikhiljindal @quinton-hoole, @deepak-vij, @XiaoningDing, @alfred-huangjian @mfanjie @huangyuqi @colhom
2016-07-19 15:51:54 -07:00
Madhusudan.C.S 3ac2ab39b8 Change the name of the secret that delivers federation kubeconfig.
The current name, federation-apiserver-secret, is very similar to the
other secret we have, federation-apiserver-secrets, that delivers
somewhat similar data but in a different format. This is extremely
confusing, particularly while debugging.

This change should soothe the pain.
2016-07-19 12:27:33 -07:00
Madhusudan.C.S 74cf837005 Fix a typo in my Github username [madhusudancs]. 2016-07-19 11:51:45 -07:00
jianhuiz bf3e1a5f97 register extensions/replicasets to federated-apiserver 2016-07-19 10:42:03 -07:00
k8s-merge-robot c25262b951 Merge pull request #26298 from nikhiljindal/createFedService
Automatic merge from submit-queue

federation: Adding namespaces API

Adding namespaces API to federation-apiserver and updating the federation client to include namespaces


--------------------------

Original description:

This adds the namespaces API to federation-apiserver.

The first commit is https://github.com/kubernetes/kubernetes/pull/26142.
2016-07-19 09:22:11 -07:00
k8s-merge-robot 4466531382 Merge pull request #29094 from luxas/gomaxproc
Automatic merge from submit-queue

Remove GOMAXPROCS() calls because they are unnecessary


Now we're setting GOMAXPROCS when every binary starts up, but we don't have to do that anymore, since we've upgraded to Go 1.6

Documentation for it:

> func GOMAXPROCS(n int) int

> GOMAXPROCS sets the maximum number of CPUs that can be executing simultaneously and returns the previous setting. If n < 1, it does not change the current setting. The number of logical CPUs on the local machine can be queried with NumCPU. This call will go away when the scheduler improves. 

A simple program to prove it's unnecessary:

```go
package main
import (
    "fmt"
    "runtime"
)
func main(){
    numCPUBefore := runtime.GOMAXPROCS(runtime.NumCPU())
    numCPUAfter := runtime.GOMAXPROCS(runtime.NumCPU())
    fmt.Println(numCPUBefore, numCPUAfter)
}
```

Output with Go 1.4.2: `1 4`
Output with Go 1.6.2: `4 4`

So I think we should remove calls to GOMAXPROCS now, and it should be pretty straightforward

@thockin @wojtek-t @gmarek @lavalamp @vishh
2016-07-19 08:11:24 -07:00
nikhiljindal 48658ad94d Adding namespace expansion files 2016-07-19 07:38:58 -07:00
nikhiljindal 7b664cff47 Updating the federation clientset to include namespaces 2016-07-19 07:38:58 -07:00
nikhiljindal a0f96fc973 Adding namespaces to federation-apiserver 2016-07-19 07:38:58 -07:00
k8s-merge-robot 9344f2ca89 Merge pull request #29123 from madhusudancs/fed-fix-post-dontcheckingconversiongen
Automatic merge from submit-queue

Register the federation core API conversion and default functions.

This was removed by mistake in 9eb42f (PR #25978). Reverting some
of those changes and adding the new mechanism to autogenerate
conversions for the new types that we might define in this API
group in the future.

cc @kubernetes/sig-cluster-federation 

@thockin @lavalamp please take a look at this once even if the PR merges before you get a chance to take a look.

@thockin particularly see the `federation/apis/core/v1/doc.go` file.

Fixes issue #28615
2016-07-19 05:42:39 -07:00
Lucas Käldström 88ea80b572 Remove GOMAXPROCS() calls because they are unnecessary 2016-07-19 11:08:21 +03:00
Madhusudan.C.S 0072766c41 Register the federation core API conversion and default functions.
This was removed by mistake in 9eb42f (PR #25978). Reverting some
of those changes and adding the new mechanism to autogenerate
conversions for the new types that we might define in this API
group in the future.
2016-07-18 15:10:41 -07:00
k8s-merge-robot fa174bcdaf Merge pull request #29042 from dims/fixup-imports
Automatic merge from submit-queue

Use Go canonical import paths

Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-18 07:23:38 -07:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
Tim Hockin 3384e03920 Commit generated files
There's been enough people broken by not committing generated code, that we
should undo that until we have a proper client that is `go get` compatible.

This is temporary.
2016-07-15 10:27:51 -07:00
Justin Santa Barbara c8ec72e33c dnsprovider: Use route53 page functions to avoid truncated results
The List<Type>Pages functions make it pretty easy to avoid result truncation;
switch to using them
2016-07-15 11:36:39 -04:00
Clayton Coleman 866e788aba
generate: New Stringers 2016-07-14 12:43:36 -04:00
k8s-merge-robot ae990defcf Merge pull request #26956 from joe2far/fix-typos
Automatic merge from submit-queue

Fixed several typos
2016-07-14 04:13:15 -07:00
k8s-merge-robot 6b6141f812 Merge pull request #28820 from caesarxuchao/patch-subresource
Automatic merge from submit-queue

[client-gen] Allow passing subresources in Patch method

Expand the Patch() method from:
```
Patch(name string, pt api.PatchType, data []byte)
```
to
```
Patch(name string, pt api.PatchType, data []byte, subresources ...string)
```

Continue on #27293. Fixes #26580.

cc @Random-Liu @lavalamp
2016-07-13 16:09:01 -07:00
joe2far 5ead89b5bb Fixed several typos 2016-07-13 15:06:24 +01:00
k8s-merge-robot 6035d88881 Merge pull request #27277 from wojtek-t/cacher_index
Automatic merge from submit-queue

Implement first version of indexing in cacher

This PR adds a first version of indexing in cacher.

It has a really significant impact on performance - __in empty 2000-node cluster, apiserver cpu usage drops by ~75%.__

Not for 1.3, but we need this soon after 1.3 is done.

@lavalamp @mqliang @davidopp @gmarek @kubernetes/sig-scalability
2016-07-13 02:45:23 -07:00
Wojciech Tyczynski 1d9bc58328 Extend Filter interface with Trigger() and use it for pods and nodes 2016-07-13 08:45:18 +02:00
Tim Hockin 9eb42ff108 Don't check in generated conversion code
Conversion is now generated by Makefile, on demand, rather than all at once.
Manually verified no net change in generated code.
2016-07-12 21:52:54 -07:00
Tim Hockin 58441e8775 Don't check in generated deep-copy code
This mostly takes the previously checked in files and removes them, and moves
the generation to be on-demand instead of manual.  Manually verified no change
in generated output.
2016-07-12 21:52:54 -07:00
Dr. Stefan Schimanski 629b25daf9 Run hack/update-all.sh 2016-07-12 20:36:48 +02:00
Chao Xu c2fb39102b generated changes 2016-07-12 11:09:28 -07:00
Tim Hockin 291b51ec50 Use file tags to generate conversions
This drives conversion generation from file tags like:
  // +conversion-gen=k8s.io/my/internal/version
.. rather than hardcoded lists of packages.

The only net change in generated code can be explained as correct.  Previously
it didn't know that conversion was available.
2016-07-07 22:09:08 -07:00
Tim Hockin dc10f10e48 Recreate the opt-in/opt-out logic for deepcopy
This is the last piece of Clayton's #26179 to be implemented with file tags.
All diffs are accounted for.  Followup will use this to streamline some
packages.

Also add some V(5) debugging - it was helpful in diagnosing various issues, it
may be helpful again.
2016-07-07 16:49:46 -07:00
Tim Hockin 28af54138d Use file tags to generate deep-copies
This drives most of the logic of deep-copy generation from tags like:
  // +deepcopy-gen=package
..rather than hardcoded lists of packages.  This will make it possible to
subsequently generate code ONLY for packages that need it *right now*, rather
than all of them always.

Also remove pkgs that really do not need deep-copies (no symbols used
anywhere).
2016-07-07 16:49:46 -07:00
Tim Hockin d88fc84bae Make multi-key tags more explicit
This is in prep to simplify tag logic.  Don't rely on processing commas as new
tag delimiters.  Put new tags on new lines.  This had zero effect on generated
code (as intended).
2016-07-07 16:49:46 -07:00
Tim Hockin 57c3196914 Add support for manually defined DeepCopy methods
In bringing back Clayton's PR piece-by-piece this was almost as easy to
implement as his version, and is much more like what I think we should be
doing.

Specifically, any time which defines a .DeepCopy() method will have that method
called preferentially.  Otherwise we generate our own functions for
deep-copying.  This affected exactly one type - resource.Quantity.  In applying
this heuristic, several places in the generated code were simplified.

To achieve this I had to convert types.Type.Methods from a slice to a map,
which seems correct anyway (to do by-name lookups).
2016-07-07 16:49:46 -07:00
Chao Xu a2980e56c9 stop update release_1_3 clientset; create release_1_4 2016-07-06 10:48:28 -07:00
Matt Liggett a8b1c2e903 Add printf formatting for rrset objects.
Without this you just get two pointers in the debug log.

Before:

I0627 21:48:44.136615       1 dns.go:215] Existing recordset {0xc820168830 0xc820691540} is not equal to needed recordset &{0xc820168848 0xc820686040}, removing existing and adding needed.

After:

I0627 22:26:46.221856       1 dns.go:215] Existing recordset                <(clouddns) "federated-service.e2e-tests-service-cuza5.federation.svc.us-central1-c.us-central1.kube.5yetis.net." type=CNAME rrdatas=["federated-service.e2e-tests-service-cuza5.federation.svc.us-central1.kube.5yetis.net."] ttl=180>
I0627 22:26:46.221885       1 dns.go:216] ... not equal to needed recordset <(clouddns) "federated-service.e2e-tests-service-cuza5.federation.svc.us-central1-c.us-central1.kube.5yetis.net." type=CNAME rrdatas=["federated-service.e2e-tests-service-cuza5.federation.svc.us-central1.kube.5yetis.net."] ttl=180>
I0627 22:26:46.221919       1 dns.go:217] ... removing existing and adding needed.
2016-06-30 16:40:44 -07:00
k8s-merge-robot 1d9b61493d Merge pull request #28261 from mml/fed-etcd-pv
Automatic merge from submit-queue

Create a PD volume when deploying the federation with federation-up.
2016-06-29 22:46:52 -07:00
Matt Liggett c2e8099a81 Create a PD volume when deploying the federation with federation-up.
Tested only on GCE, where it worked.

Fixes #28248.
2016-06-29 22:01:50 -07:00
k8s-merge-robot f2ddd60eb9 Merge pull request #26755 from david-mcmahon/fix-headers
Automatic merge from submit-queue

Remove "All rights reserved" from all the headers.

cc @thockin @zmerlynn @brendanburns
2016-06-29 18:46:07 -07:00
k8s-merge-robot d8d5ab29a5 Merge pull request #26756 from hongchaodeng/cli
Automatic merge from submit-queue

Change client default value of qps and burst to constant
2016-06-29 18:11:18 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot 7f3da674f7 Merge pull request #26680 from olegshaldybin/fake-clientset-registry
Automatic merge from submit-queue

Track object modifications in fake clientset

Fake clientset is used by unit tests extensively but it has some
shortcomings:

- no filtering on namespace and name: tests that want to test objects in
  multiple namespaces end up getting all objects from this clientset,
  as it doesn't perform any filtering based on name and namespace;

- updates and deletes don't modify the clientset state, so some tests
  can get unexpected results if they modify/delete objects using the
  clientset;

- it's possible to insert multiple objects with the same
  kind/name/namespace, this leads to confusing behavior, as retrieval is
  based on the insertion order, but anchors on the last added object as
  long as no more objects are added.

This change changes core.ObjectRetriever implementation to track object
adds, updates and deletes.

Some unit tests were depending on the previous (and somewhat incorrect)
behavior. These are fixed in the following few commits.
2016-06-29 06:04:33 -07:00
Hongchao Deng 55d3597456 change default value of QPS and burst to constant 2016-06-28 21:45:35 -07:00
nikhiljindal 7fcf8daf6b Moving federation/v1alpha1 to federation/v1beta1 2016-06-28 17:12:58 -07:00
nikhiljindal 88b10b1dc0 Removing unneeded fields from Cluster API object 2016-06-28 17:12:57 -07:00
Oleg Shaldybin d445d4082d Regenerate clientsets 2016-06-28 10:59:54 -07:00
Colin Hom 28b471a8d6 Add colhom to federation OWNERS 2016-06-27 13:16:43 -07:00
k8s-merge-robot 7d57beac62 Merge pull request #28042 from nikhiljindal/addOWNERS
Automatic merge from submit-queue

Adding OWNERS for federation

Adding OWNERS for the federation dir

cc @kubernetes/sig-cluster-federation
2016-06-27 13:09:38 -07:00
k8s-merge-robot 93037844c1 Merge pull request #27293 from caesarxuchao/add-patch-to-clientset
Automatic merge from submit-queue

[client-gen]Add Patch to clientset

* add the Patch() method to the clientset. 
* I have to rename the existing Patch() method of `Event` to PatchWithEventNamespace() to avoid overriding.
* some minor changes to the fake Patch action.

cc @Random-Liu since he asked for the method
@kubernetes/sig-api-machinery 

ref #26580 

```release-note
Add the Patch method to the generated clientset.
```
2016-06-25 19:15:11 -07:00
k8s-merge-robot 07d24e4557 Merge pull request #28004 from mikedanese/fix-nil
Automatic merge from submit-queue

return nil from NewClientConfig instead of empty struct

This is a go convention and fixes an nil pointer in kubelet when passing in bad command line options:

```
I0624 04:12:33.333246   25404 plugins.go:141] Loaded network plugin "kubenet"
E0624 04:12:33.333390   25404 runtime.go:58] Recovered from panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:52
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:40
/usr/local/go/src/runtime/asm_amd64.s:472
/usr/local/go/src/runtime/panic.go:443
/usr/local/go/src/runtime/panic.go:62
/usr/local/go/src/runtime/sigpanic_unix.go:24
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service.go:132
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/kubelet.go:254
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/cache/listwatch.go:80
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:262
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:204
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:86
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:87
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:49
```
cc @caesarxuchao @lavalamp
2016-06-24 15:15:08 -07:00
k8s-merge-robot 9b215a33b5 Merge pull request #28026 from quinton-hoole/2016-06-24-fix-nits-in-dns-deletion-logic-fix
Automatic merge from submit-queue

Address outstanding review comments in #27999.
2016-06-24 14:37:45 -07:00
nikhiljindal b1021db07e Adding OWNERS for federation 2016-06-24 13:47:39 -07:00
nikhiljindal 1204411209 Revert "Federation e2e supports aws"
This reverts commit 5bacc4830e.
2016-06-24 10:44:35 -07:00
Quinton Hoole 8d5d7e9013 Address outstanding review comments in #27999. 2016-06-24 08:35:12 -07:00
Mike Danese 3162197c23 autogenerated 2016-06-23 22:15:03 -07:00
Quinton Hoole 6b435a6415 Fixes #27989 2016-06-23 19:06:22 -07:00
k8s-merge-robot 890ac5fdfe Merge pull request #27791 from colhom/gke-aws-federation
Automatic merge from submit-queue

Federation e2e support for AWS

I've observed e2e test failures on the two local runs I did, but the framework seems to come up successfully. [logs](http://pastebin.com/tsJpKUc4). Ideas on this?

I'm in the process of validating GKE as well, and will modify the title if it succeeds.

\cc @nikhiljindal @quinton-hoole 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-23 13:34:25 -07:00
k8s-merge-robot c5afca10f4 Merge pull request #27748 from mfanjie/service-controller
Automatic merge from submit-queue

Federation: Improve the handling of service deletion in underlying clusters

fixes #27623 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-22 16:21:16 -07:00
k8s-merge-robot de1719ed87 Merge pull request #27831 from quinton-hoole/2016-06-21-fix-panic-in-dns-zone-creation
Automatic merge from submit-queue

Add unit test for zone addition to all dnsproviders.  Fixes #27785
2016-06-22 04:03:34 -07:00
nikhiljindal c59de79d5f Adding retries to fetching secret in controller manager 2016-06-22 00:57:53 -07:00
mfanjie 669bf0773f add kubernetes service back when it is deleted in kubernetes cluster 2016-06-22 10:46:31 +08:00
Quinton Hoole 37ce95e107 Add unit test for zone addition to all dnsproviders. Fixes #27785 2016-06-21 18:38:39 -07:00
Colin Hom 5bacc4830e Federation e2e supports aws 2016-06-21 18:22:46 -07:00
Matt Liggett 3733f64935 Add ssl certs to federation-controller-manager container.
Fixes #27684.

For now, I'm simply poking a hole to grab the system /etc/ssl/certs.  If
we decide we want something less dependent on the node filesystem, we
will need to decide how we pick a "distro" more sophisticated than
busybox for federation components running on k8s.  I'll open a followup
issue to discuss this.
2016-06-21 14:06:32 -07:00
k8s-merge-robot 9f06e0f1a6 Merge pull request #27665 from iamthemuffinman/master
Automatic merge from submit-queue

Fix spelling errors
2016-06-21 09:54:07 -07:00
k8s-merge-robot 4468e15fc7 Merge pull request #27695 from quinton-hoole/2016-06-17-create-federation-dns-zone-if-missing
Automatic merge from submit-queue

Create federation dns zone if missing

1. Added Zones.Add() method to generic dnsprovider interface, as well as Google and AWS implementations.
2. Automatically add the configured zone name to the dnsprovider if it does not already exist.
2016-06-21 07:45:13 -07:00
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