Commit Graph

1083 Commits (37dab8017346dfd9c813e2501cc34eebf17c6527)

Author SHA1 Message Date
Kubernetes Submit Queue 64777d37b6 Merge pull request #33268 from deads2k/client-14-rc-svc-lister
Automatic merge from submit-queue

simplify RC 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-23 23:37:15 -07:00
Kubernetes Submit Queue 33eabe675b Merge pull request #33332 from ericchiang/oidc-allow-string-as-group-claim
Automatic merge from submit-queue

oidc authenticator: allow string value as groups claim

Allow the group claim to be a single string instead of an array of
strings. This means the following claim

    {
      "role": "admin"
    }

Will be mapped to the groups

    ["admin"]

cc @kubernetes/sig-auth @mlbiam

closes #33290
2016-09-23 12:41:27 -07:00
deads2k 500959b70c fix RC lister 2016-09-23 08:12:03 -04: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
Kubernetes Submit Queue 1ef86aa8ab Merge pull request #32906 from caesarxuchao/staging-1.5
Automatic merge from submit-queue

Staging 1.5 client

Created the 1.5 folder and remove the 1.4 folder in the staging area in the master branch.

Content of kubernetes/client-go/1.4 will be pulled from the kubernetes/kubernetes 1.4 branch (https://github.com/kubernetes/contrib/pull/1719)
2016-09-22 19:55:01 -07:00
Eric Chiang 065ddab5d1 oidc authenticator: allow string value as groups claim
Allow the group claim to be a single string instead of an array of
strings. This means the following claim

    {
      "role": "admin"
    }

Will be mapped to the groups

   ["admin"]
2016-09-22 14:23:56 -07:00
Daniel Smith db3e549bd1 more usages of go2idl 2016-09-22 13:42:46 -07:00
Kubernetes Submit Queue 4ab5a76338 Merge pull request #33103 from deads2k/controller-03-kill-non-generatedclient
Automatic merge from submit-queue

switch controller manager to generated clients

Switches the controller manager to generated clients.

@ncdc ptal
2016-09-22 11:37:01 -07:00
deads2k 483af28944 fix up service lister 2016-09-22 09:12:37 -04:00
Kubernetes Submit Queue 5af04d1dd1 Merge pull request #32876 from errordeveloper/more-cert-utils
Automatic merge from submit-queue

Refactor cert utils into one pkg, add funcs from bootkube for kubeadm to use

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

We have ended-up with rather incomplete and fragmented collection of utils for handling certificates. It may be worse to consider using `cfssl` for doing all of these things, but for now there is some functionality that we need in `kubeadm` that we can borrow from bootkube. It makes sense to move the utils from bookube into core, as discussed in #31221.

**Special notes for your reviewer**: I've taken the opportunity to review names of existing funcs and tried to make some improvements in that area (with help from @peterbourgon).

**Release note**:

```release-note
NONE
```
2016-09-22 01:29:46 -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
Chao Xu a4e62297d6 fix tests 2016-09-21 14:44:39 -07: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 d17c6b903a Merge pull request #33086 from ivan4th/fix-possible-panic-in-pod-affinity-checker
Automatic merge from submit-queue

Fix possible panic in PodAffinityChecker

In `PodAffinityChecker.getMatchingAntiAffinityTerms()` `affinity.PodAntiAffinity` can be `nil` in this place. This problem occurs e.g. when `nil` is passed as `meta` to `PodAffinityChecker.InterPodAffinityMatches()`.

Stumbled upon it while working on #31136 (someone PTAL at that PR too, I've submitted it a month ago and seemingly no one noticed it), kube-controller-manager was crashing there.
2016-09-21 00:24:44 -07:00
Jordan Liggitt 2b569eeea0
compensate for raft/cache delay in namespace admission 2016-09-21 00:27:27 -04:00
deads2k b83a317003 switch controller manager to generated clientset 2016-09-20 12:53:47 -04: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
Ivan Shvedunov f758cb418d Fix possible panic in PodAffinityChecker 2016-09-20 15:53:13 +03:00
deads2k 16fbb47189 fix up service lister 2016-09-20 08:24:33 -04:00
deads2k 185a7adf84 fix RC lister 2016-09-20 08:24:32 -04:00
deads2k a2a6423574 separate RESTStorage by API group 2016-09-20 08:00:50 -04:00
deads2k 7d1f13d3e0 add GenericAPIServer posthooks for initialization 2016-09-19 14:58:27 -04:00
Ilya Dmitrichenko 386fae4592
Refactor utils that deal with certs
- merge `pkg/util/{crypto,certificates}`
- add funcs from `github.com/kubernetes-incubator/bootkube/pkg/tlsutil`
- ensure naming of funcs is fairly consistent
2016-09-19 09:03:42 +01:00
Kubernetes Submit Queue 4b5c74eed8 Merge pull request #31859 from resouer/fix-nits
Automatic merge from submit-queue

Fix minor nits in test cases

Found a group of nits when doing #30844, fixed them in a this PR since 30844 requires a long time to review.
2016-09-18 06:27:12 -07:00
deads2k 1943d256d2 make rbac authorizer use rule comparison, not covers 2016-09-16 15:53:42 -04:00
Kubernetes Submit Queue 8c48469213 Merge pull request #32353 from smarterclayton/stable_sort
Automatic merge from submit-queue

Doc page for scheduler is not stable (for man pages)

Need to sort maps that are included in help output
2016-09-16 05:44:33 -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
Kubernetes Submit Queue 8c83671789 Merge pull request #32643 from smarterclayton/scheduler_retry
Automatic merge from submit-queue

Exit scheduler retry loop correctly

The error was being eaten and shadowed, which means we would never exit
this loop. This might lead to a goroutine in the scheduler being used
forever without exiting at maximum backoff.

Switched to use the real client to make later refactors easier.

@wojtek-t this may lead to scheduler informer exhaustion - not that familiar with retries
2016-09-15 05:16:16 -07:00
Kubernetes Submit Queue dbdaf2c22b Merge pull request #32597 from liggitt/webhook-re-refactor
Automatic merge from submit-queue

Revert "Revert "Allow webhook authenticator to use TokenReviewsInterface""

Reverts https://github.com/kubernetes/kubernetes/pull/32591 (commit 0a02c8275d)
Readds https://github.com/kubernetes/kubernetes/pull/32547

Holding until GKE webhook authenticator is updated by @cjcullen
2016-09-15 03:56:10 -07:00
Kubernetes Submit Queue 4135988880 Merge pull request #32589 from ericchiang/add-ericchiang-to-owners
Automatic merge from submit-queue

plugin/pkg: add ericchiang to owners for OpenID Connect plugins

On the CoreOS side I'm taking over these components.

@erictune has suggested `pkg/registry/{cluster}role{binding}s/OWNERS` as well but I'd feel more comfortable as a reviewer for those specific parts of RBAC for a couple more cycles since @liggitt and @deads2k have had way more experience in the registry code.

Beyond that the only existing OWNERS files for auth are `pkg/auth/OWNERS` and `plugin/pkg/auth/OWNERS` both of which include @liggitt and @erictune. There's also nothing in the `plugin/pkg/client` path. I'm a little unclear on the implications for future PRs that are assigned to me (e.g. webhook or RBAC reviews).

cc @kubernetes/sig-auth
2016-09-14 13:10:33 -07:00
Kubernetes Submit Queue fc466743a8 Merge pull request #32592 from dims/update-google-cloud-api-imports
Automatic merge from submit-queue

Update Google Cloud API client import paths
2016-09-14 08:39:49 -07:00
Clayton Coleman 4d79030b8d
Exit scheduler retry loop correctly
The error was being eaten and shadowed, which means we would never exit
this loop. This might lead to a goroutine in the scheduler being used
forever without exiting at maximum backoff.

Switched to use the real client to make later refactors easier.
2016-09-14 00:34:14 -04: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
Jordan Liggitt 52c3081f6f
Revert "Revert "Allow webhook authenticator to use TokenReviewsInterface""
This reverts commit 0a02c8275d.
2016-09-13 16:23:17 -04:00
Joe Finney 0a02c8275d Revert "Allow webhook authenticator to use TokenReviewsInterface"
This reverts commit e9914f2c4a.
2016-09-13 11:48:43 -07:00
Eric Chiang 26830b8db9 plugin/pkg: add ericchiang to owners for OpenID Connect plugins 2016-09-13 11:14:16 -07:00
Kubernetes Submit Queue 7ba9660487 Merge pull request #32547 from liggitt/webhook-refactor
Automatic merge from submit-queue

Allow webhook authenticator to use TokenReviewsInterface

Refactors the authentication webhook to be able to be fed a kubeconfig file or a TokenReviewsInterface 

Fixes a bug with webhooks not retrying on 429/500 errors

Related to https://github.com/kubernetes/kubernetes/pull/32518#discussion_r78450170
2016-09-13 10:28:34 -07:00
Wojciech Tyczynski ea943d825e Migrate a bunch of priority functions to map-reduce framework 2016-09-13 13:20:29 +02:00
Kubernetes Submit Queue 8f2f836e4e Merge pull request #32106 from jellonek/fd_leaks
Automatic merge from submit-queue

Ensure that we are closing files.

**What this PR does / why we need it**: In several places we are leaking file descriptors. This could be problematic on systems with low ulimits for them.

**Release note**:
```release-note
```
2016-09-12 23:43:38 -07:00
Jordan Liggitt e9914f2c4a
Allow webhook authenticator to use TokenReviewsInterface 2016-09-13 00:42:02 -04:00
Kubernetes Submit Queue 0b5e024789 Merge pull request #32471 from wojtek-t/use_controller_ref_for_avoid_priority
Automatic merge from submit-queue

Use "controller ref" in NodePreferAvoidPriority 

Ref #28590

@caesarxuchao - FYI
2016-09-12 05:20:20 -07:00
Kubernetes Submit Queue ae839ffc44 Merge pull request #31543 from deads2k/rbac-06-change-role-ref
Automatic merge from submit-queue

Change rbac roleref to reflect the information we want

@liggitt @ericchiang This is a version of https://github.com/kubernetes/kubernetes/pull/31359 which updates the `RoleRef` to be (I think) the type that we want, with a group, resource, and name.

This is **not** backwards compatible with any existing data.  I'm ok with doing this since rbac was considered alpha, but its something to consider.

If we want this instead, I'll close the previous pull (or update it with this content).
2016-09-12 02:01:49 -07:00
Piotr Skamruk dc3674c8d0 Ensure that we are closing files. 2016-09-12 09:33:24 +02:00
Wojciech Tyczynski c8c938c3e0 AvoidPriority using ControllerRef 2016-09-12 08:45:02 +02:00
Kubernetes Submit Queue dd46d19d4d Merge pull request #32186 from zhouhaibing089/typo-fix
Automatic merge from submit-queue

the image policy webhook missing field log

simple and naive fix. :) cc @ecordell
2016-09-11 08:19:25 -07:00
Kubernetes Submit Queue cfe53d14fd Merge pull request #30733 from asalkeld/compat-test
Automatic merge from submit-queue

Update scheduler config file compatibility tests

**What this PR does / why we need it**:
Added missing compatibility tests for scheduler config file options.

**Which issue this PR fixes** 
fixes #30099

**Special notes for your reviewer**:
I came up with the options based on the contents of default.go in each branch.

**Release note**:
```release-note
NONE
```
2016-09-10 03:48:49 -07:00
Kubernetes Submit Queue 9d06efb2d1 Merge pull request #31606 from wojtek-t/scheuler_map_reduce
Automatic merge from submit-queue

POC: MapReduce-like scheduler priority functions

Ref #24246
2016-09-09 14:24:05 -07:00
deads2k 8c788233e7 change rbac roleref type 2016-09-09 09:55:51 -04:00
Clayton Coleman adc3761bfc
Doc page for scheduler is not stable (for man pages)
Need to sort maps
2016-09-09 01:09:36 -04:00