Commit Graph

1061 Commits (47e45739436ea9023a5961f5ccf8cbacf5706c92)

Author SHA1 Message Date
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
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
Angus Salkeld 27f1f854ba Update scheduler config file compatibility tests
Co-Authored-By: Jordan Liggitt <jliggitt@redhat.com>
2016-09-09 09:31:46 +10:00
zhouhaibing089 e6b671ab64 the image policy webhook missing field log 2016-09-07 16:11:24 +08:00
deads2k cd5b6cc491 move StorageClass to its own group 2016-09-06 08:41:17 -04:00
Kubernetes Submit Queue dc8f384e3f Merge pull request #31627 from deads2k/quota-copy
Automatic merge from submit-queue

make deep copy of quota objects before mutations

The code currently makes shallow copies which ensures that we aren't accidentally reslicing anything in weird ways, but the usage maps are pointers, so they end up being shared.

This makes a couple copies when we know we're going to mutate to avoid changing shared maps.
2016-09-01 10:09:01 -07:00
Harry Zhang 608e7ce0d4 Fix minor nits in test cases 2016-09-01 05:21:17 -04:00
Wojciech Tyczynski 33c710adf0 MapReduce-like scheduler priority functions 2016-08-31 15:16:10 +02:00
Kubernetes Submit Queue be859b144d Merge pull request #30808 from smarterclayton/no_defaults
Automatic merge from submit-queue

ClientConfig should not default to http://localhost:8080

This changes clientcmd to skip the default cluster, but preserves the
behavior in kubectl. This prevents the possibility of an administrator
misconfiguration in kubelet or other server component from allowing a
third party who can bind to 8080 on that host from potentially
impersonating an API server and gaining root access.

@mikedanese @deads2k this removes the defaulting of http://localhost:8080 for server from everything except kubectl.



```release-note
Kubernetes server components using `kubeconfig` files no longer default to `http://localhost:8080`.  Administrators must specify a server value in their kubeconfig files.
```
2016-08-30 11:33:39 -07:00
Clayton Coleman 06cbb29e9e
ClientConfig should not default to http://localhost:8080
This changes clientcmd to skip the default cluster, but preserves the
behavior in kubectl. This prevents the possibility of an administrator
misconfiguration in kubelet or other server component from allowing a
third party who can bind to 8080 on that host from potentially
impersonating an API server and gaining root access.
2016-08-30 10:43:24 -04:00
deads2k 4317173d3f add names for workqueues to gather controller latency/depth metrics 2016-08-30 09:51:50 -04:00
deads2k f4380f6919 make deep copy of quota objects before mutations 2016-08-29 13:55:13 -04:00
Daniel Smith a291846cd1 Revert "Remove deprecated Namespace admission plug-ins" 2016-08-28 10:20:44 -07:00
derekwaynecarr c727fdc81f Remove deprecated namespace admission controllers 2016-08-26 11:14:55 -04:00
Piotr Szczesniak 2fb43eb68c Renamed influxdb to influxdata in Godeps 2016-08-26 14:07:51 +02:00
Kubernetes Submit Queue 785e9f24c5 Merge pull request #31122 from deads2k/add-quota-test
Automatic merge from submit-queue

add quota test for creating update requests

Adding a kube test for https://github.com/kubernetes/kubernetes/pull/30907 as requested in https://github.com/kubernetes/kubernetes/pull/30907#issuecomment-241139913 .
2016-08-25 08:21:50 -07:00
Kubernetes Submit Queue 4ddfc4849a Merge pull request #27180 from sttts/sysctl-implementation
Automatic merge from submit-queue

Add sysctl support

Implementation of proposal https://github.com/kubernetes/kubernetes/pull/26057, feature  https://github.com/kubernetes/features/issues/34

TODO:
- [x] change types.go
- [x] implement docker and rkt support
- [x] add e2e tests
- [x] decide whether we want apiserver validation
- ~~[ ] add documentation~~: api docs exist. Existing PodSecurityContext docs is very light and links back to the api docs anyway: 6684555ed9/docs/user-guide/security-context.md
- [x] change PodSecurityPolicy in types.go
- [x] write admission controller support for PodSecurityPolicy
- [x] write e2e test for PodSecurityPolicy
- [x] make sure we are compatible in the sense of https://github.com/kubernetes/kubernetes/blob/master/docs/devel/api_changes.md
- [x] test e2e with rkt: it only works with kubenet, not with no-op network plugin. The later has no sysctl support.
- ~~[ ] add RunC implementation~~ (~~if that is already in kube,~~ it isn't)
- [x] update whitelist
- [x] switch PSC fields to annotations
- [x] switch PSP fields to annotations
- [x] decide about `--experimental-whitelist-sysctl` flag to be additive or absolute
- [x] decide whether to add a sysctl node whitelist annotation

### Release notes:

```release-note
The pod annotation `security.alpha.kubernetes.io/sysctls` now allows customization of namespaced and well isolated kernel parameters (sysctls), starting with `kernel.shm_rmid_forced`, `net.ipv4.ip_local_port_range`, `net.ipv4.tcp_max_syn_backlog` and `net.ipv4.tcp_syncookies` for Kubernetes 1.4.

The pod annotation  `security.alpha.kubernetes.io/unsafeSysctls` allows customization of namespaced sysctls where isolation is unclear. Unsafe sysctls must be enabled at-your-own-risk on the kubelet with the `--experimental-allowed-unsafe-sysctls` flag. Future versions will improve on resource isolation and more sysctls will be considered safe.
```
2016-08-25 06:21:24 -07:00
Dr. Stefan Schimanski ed36baed20 Add sysctl PodSecurityPolicy support 2016-08-25 13:22:01 +02:00
Kubernetes Submit Queue d12b3429fe Merge pull request #30676 from m1093782566/improve-pod-log-output-format
Automatic merge from submit-queue

[Scheduler] Improve pod log output debuggability

Address issue is #30675

The result of my expirments shows that both `glog.Infof("%v", pod)` and `glog.Infof("%+v", pod)` can't output useful information of a pod, it can only output `kind:"" apiVersion:""`. 

`%#v` can output the whole content of pod, but it seems too much!

So, my opinion is output pod info use the format of `%v` to print`pod.Namespace/pod.Name` instead of the pod **object** in both [here](https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/scheduler/scheduler.go#L96) and [here](https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/scheduler/scheduler.go#L100).

@wojtek-t
2016-08-25 04:05:24 -07:00
Kubernetes Submit Queue ef2718620c Merge pull request #30900 from jsafrane/pvc-admission
Automatic merge from submit-queue

Add admission controller for default storage class.

The admission controller adds a default class to PVCs that do not require any
specific class. This way, users (=PVC authors) do not need to care about
storage classes, administrator can configure a default one and all these PVCs
that do not care about class will get the default one.

The marker of default class is annotation "volume.beta.kubernetes.io/storage-class", which must be set to "true" to work. All other values (or missing annotation) makes the class non-default.

Based on @thockin's code, added tests and made it not to reject a PVC when no class is marked as default.
. 
@kubernetes/sig-storage
2016-08-24 03:32:46 -07:00
Kubernetes Submit Queue 0b5547f462 Merge pull request #30183 from timstclair/aa-psp
Automatic merge from submit-queue

AppArmor PodSecurityPolicy support

Implements the AppArmor PodSecurityPolicy support based on the alpha API proposed [here](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/apparmor.md#pod-security-policy)

This implementation deviates from the original proposal in one way: it adds a separate option for specifying a default profile:
```
apparmor.security.alpha.kubernetes.io/defaultProfileName
```
This has several advantages over the original proposal:

- The default is explicit, rather than implicit on the ordering
- The default can be specified without constraining the allowed profiles
- The allowed profiles can be restricted without specifying a default (requires every pod to explicitly set a profile)

The E2E cluster does not currently enable the PodSecurityPolicy, so I will submit E2E tests in a separate PR.

/cc @dchen1107 @pweil- @sttts @jfrazelle @Amey-D
2016-08-23 03:06:05 -07:00
Matt Liggett c86b84ccc0 Add /eviction subresource.
This is for #12611.
2016-08-22 16:38:00 -07:00
deads2k 9913ebf079 add quota test for creating update requests 2016-08-22 10:36:41 -04:00
Jan Safranek 5f6efefc40 [squash] Rename and move to storageclass/ 2016-08-22 14:11:01 +02:00