Commit Graph

618 Commits (3971553298616fee6e477b84474d64b7360d7f3a)

Author SHA1 Message Date
deads2k 518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
Marcin Wielgus e033c5fe7b Use RaceFreeFakeWatcher in federation controllers helper and ingress controller 2016-10-07 15:37:57 +02:00
mbohlool eeccee6dce Generated federation opeapi spec 2016-10-06 13:13:15 -07:00
Marcin Wielgus d16fd00d2a DaemonSets in federated apiserver 2016-10-06 21:02:28 +02:00
Kubernetes Submit Queue 41f17bd9ac Merge pull request #34158 from quinton-hoole/2016-10-05-fix-ingress-bug-mac
Automatic merge from submit-queue

Add missing argument to log message in federated ingress controller.

Minor fix, to address this:

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

update deployment and replicaset listers

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

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

decouple workqueue metrics from prometheus

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

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

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

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

**Special notes for your reviewer**:

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

Set deserialization cache size based on target memory usage

**Special notes for your reviewer**:

This is the PR we talked about yesterday.

**Release note**:

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

stop plumbing options to start

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

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

pass loopback config to poststart hooks

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

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

Copy objects in federation test helper

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

Fixes: #33667

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

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

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

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

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

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

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

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

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

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

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

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

Update federation controllers to use release 1.5 clientset

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

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

Autoconvert cleanups

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

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

Copy auth plugin to client-go repo

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

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

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

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

Fix goroutine leak in federation service controller

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

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

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

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

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

```release-note
Fixes memory/goroutine leak in Federation Service controller.
```
2016-09-24 01:30:27 -07:00
Kubernetes Submit Queue 563d23960d Merge pull request #32581 from justinsb/dns_expose_provider_id
Automatic merge from submit-queue

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

simplify svc lister

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

remove storage related fields from genericapiserver

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

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

Correct versioned.Event output in Swagger

Fixes #24240

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

move registry packages for all API groups

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

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

fix planner loop ends before finishing replica assignments

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

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

Allow secure access to apiserver from Admission Controllers

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

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

simplify RC and SVC listers

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

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

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

Move generated openAPI specs out of genericapiserver and make it configurable

A follow up to #31468

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

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

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

Cleanup non-rest apiserver handlers

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

Switch ScheduledJob controller to use clientset

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

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

Adding a README for federation API ref docs

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

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

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

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

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

Fixing federation secret and replicaset e2e tests

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

cc @kubernetes/sig-cluster-federation 

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

Improvements on OpenAPI spec generation

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

Reference: #13414


**Release note**:

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

Generate 1 5 clientset

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

@nikhiljindal @lavalamp 

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

change infof to Errorf in endpoint_helper.go

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

Mount GCP credentials to federation deployment container for GKE clusters.

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

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

Typos and englishify federation

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

**Which issue this PR fixes** None

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

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
`NONE`
2016-09-11 21:34:35 -07:00
Madhusudan.C.S 230a1c789d Mount GCP credentials to federation deployment container for GKE clusters.
GKE clusters use GCP credentials and hence require them for
deploying federation components on to those clusters.
2016-09-09 14:36:45 -07:00
Jedrzej Nowak 6aaad93908 Typos and englishify federation 2016-09-09 09:53:24 +02:00
Chao Xu ff9da535d3 generated 1.5 release 2016-09-08 16:03:07 -07:00
Kubernetes Submit Queue e4909db6a3 Merge pull request #32144 from nikhiljindal/freshDebugNs
Automatic merge from submit-queue

Updating federation api ref docs

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

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

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

refactor genericapiserver new to combine initialization

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

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

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

Remove panic handling from federated test helper

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

WatcherDispatcher for federated controller tests

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

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

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

fix deliverer dealy constant usage

some delay constants were not correctly used

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

Adding namespaces/finalizer subresource to federation apiserver

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

cc @kubernetes/sig-cluster-federation @mwielgus 


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

Use hash in federated replica set planner

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

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

Sync event names in federated controller

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

Events for federated replica set controller

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

Generating API reference docs for federation apiserver

Fixes #30541 

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

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

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

Clean-up and fixes in federated replica set

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

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

Events for federated secrets controller

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

EventSink for federated controllers

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

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

Separate federation build.sh into development and deployment scripts.

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

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

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

cc @kubernetes/sig-cluster-federation @colhom 

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

Fix missing expansion files in clientset release 1.4

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

**What this PR does / why we need it**:
Fix missing expansion files in clientset release 1.4;
Update the client-gen tool to automatically update generated_expansion.go;
Update the readme to document the best practice of using client-gen.

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

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


**Special notes for your reviewer**:

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```

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

[Federation] Downsize the release binary distribution v2.

Second attempt of PR #29632.

There are two things that this PR does:

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

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

cc @kubernetes/sig-cluster-federation @colhom 

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

More scheduling debug in federated replica set

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

Proper phase/finalizer logic in federated namespace controller

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

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

return destroy func to clean up internal resources of storage

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

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

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

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

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

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

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

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

Federation controller tests refactoring - move common func to utils

cc: @quinton-hoole @kubernetes/sig-cluster-federation
2016-08-24 10:11:42 -07:00