Commit Graph

492 Commits (09e42764483ecd1c1a71863518beba5b98241f71)

Author SHA1 Message Date
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