Commit Graph

1389 Commits (954a86d701a53276881c86ee85275a406d0dea99)

Author SHA1 Message Date
Kubernetes Submit Queue 4829dcf7c8 Merge pull request #37667 from bruceauyeung/k8s-branch-eliminate-duplicated-codes-in-estimateContainer-method
Automatic merge from submit-queue

eliminate duplicated codes in estimateContainer method

**What this PR does / why we need it**:
there are two code snippets about when to estimate resource for cpu and mem are duplicated, i extracted them into method `getEstimationIfNeeded` method

Signed-off-by: bruceauyeung <ouyang.qinhua@zte.com.cn>
2017-01-13 15:18:52 -08:00
Kubernetes Submit Queue 983a47d876 Merge pull request #39109 from derekwaynecarr/admission-version-config
Automatic merge from submit-queue (batch tested with PRs 39807, 37505, 39844, 39525, 39109)

Admission control support for versioned configuration files

**What this PR does / why we need it**:
Today, the `--admission-control-config-file=` argument takes an opaque file that is shared across all admission controllers to provide configuration.  This file is not well-versioned and it's shared across multiple plug-ins.  Some plugins take file based configuration (`ImagePolicyWebhook`) and others abuse flags to provide configuration because we lacked a good example (`InitialResources`).  This PR defines a versioned configuration format that we can use moving forward to provide configuration input to admission controllers that is well-versioned, and does not require the addition of new flags.

The sample configuration file would look as follows:

```
apiVersion: componentconfig/v1alpha1
kind: AdmissionConfiguration
plugins:
- name: "ImagePolicyWebhook"
  path: "image-policy-webhook.json"
```

The general behavior is each plugin that requires additional configuration is enumerated by name.  An alternate file location is provided for its specific configuration, or the configuration can be embedded as a raw extension via the configuration section.

**Special notes for your reviewer**:
A follow-on PR will be needed to make `ImagePolicyWebhook` to use versioned configuration.  This PR maintains backwards compatibility by ignoring configuration it cannot understand and therefore treating the file as opaque.  I plan to make use of this PR to complete https://github.com/kubernetes/kubernetes/pull/36765 which attempts to allow more configuration parameters to the `ResourceQuota` admission plugin.
2017-01-13 13:40:47 -08:00
Kubernetes Submit Queue 6b5d82b512 Merge pull request #37505 from k82cn/use_controller_inf
Automatic merge from submit-queue (batch tested with PRs 39807, 37505, 39844, 39525, 39109)

Made cache.Controller to be interface.

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

#37504
2017-01-13 13:40:41 -08:00
Kubernetes Submit Queue 212234ab3f Merge pull request #39807 from deads2k/client-02-client-go
Automatic merge from submit-queue

run staging client-go update

Chasing to see what real problems we have in staging-client-go.

@sttts you get similar results?
2017-01-13 13:21:19 -08:00
Kubernetes Submit Queue a6fa5c2bfd Merge pull request #39814 from deads2k/api-58-multi-register
Automatic merge from submit-queue

replace global registry in apimachinery with global registry in k8s.io/kubernetes

We'd like to remove all globals, but our immediate problem is that a shared registry between k8s.io/kubernetes and k8s.io/client-go doesn't work.  Since client-go makes a copy, we can actually keep a global registry with other globals in pkg/api for now.

@kubernetes/sig-api-machinery-misc @lavalamp @smarterclayton @sttts
2017-01-13 12:37:02 -08:00
deads2k 633e9d98fc use apimachinery packages instead of client-go packages 2017-01-13 14:04:54 -05:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
Klaus Ma 25fe1e0d82 Made cache.Controller to be interface. 2017-01-13 13:33:23 +08:00
Kubernetes Submit Queue 082ce00eca Merge pull request #39478 from rrati/pod-affinity-api-fields
Automatic merge from submit-queue (batch tested with PRs 39803, 39698, 39537, 39478)

[scheduling] Moved pod affinity and anti-affinity from annotations to api fields #25319

Converted pod affinity and anti-affinity from annotations to api fields

Related: #25319
Related: #34508

**Release note**:
```Pod affinity and anti-affinity has moved from annotations to api fields in the pod spec.  Pod affinity or anti-affinity that is defined in the annotations will be ignored.```
2017-01-12 15:06:33 -08:00
Kubernetes Submit Queue b932c82739 Merge pull request #39803 from jayunit100/sched_cleanup_config_1
Automatic merge from submit-queue (batch tested with PRs 39803, 39698, 39537, 39478)

Use controller interface for everything in config factory

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

We want to replace controller structs with interfaces 
- per the TODO in `ControllerInterface`
- Specifically this will make the decoupling from Config and reuse of the scheduler's subcomponents cleaner.
2017-01-12 15:06:27 -08:00
Derek Carr 420906bbb8 Add support for versioned configuration in admission 2017-01-12 16:47:36 -05:00
Robert Rati 6a3ad93d6c [scheduling] Moved pod affinity and anti-affinity from annotations to api
fields. #25319
2017-01-12 14:54:29 -05:00
jayunit100 272b5dd1b2 Use controller interface for everything in config factory 2017-01-12 09:32:07 -05:00
NickrenREN a12dea14e0 fix redundant alias clientset 2017-01-12 10:21:05 +08:00
Kubernetes Submit Queue 8d4cc53175 Merge pull request #39483 from deads2k/generic-15-deps-02-for-real
Automatic merge from submit-queue

move no k8s.io/kubernetes dep packages for genericapiserver

Move the next set of no-dep packages for genericapiserver.  Feel the ratchet click!

```
k8s.io/kubernetes/pkg/auth/authenticator/bearertoken -> k8s.io/apiserver/pkg/authentication/request/bearertoken
k8s.io/kubernetes/pkg/auth/authorizer/union -> k8s.io/apiserver/pkg/authorization/union
k8s.io/kubernetes/pkg/auth/group -> k8s.io/apiserver/pkg/authentication/group
k8s.io/kubernetes/pkg/httplog -> k8s.io/apiserver/pkg/httplog
k8s.io/kubernetes/pkg/ssh -> k8s.io/apiserver/pkg/ssh
k8s.io/kubernetes/pkg/storage/etcd/metrics -> k8s.io/apiserver/pkg/storage/etcd/metrics
k8s.io/kubernetes/pkg/util/cache -> k8s.io/apiserver/pkg/util/cache
k8s.io/kubernetes/plugin/pkg/auth/authenticator/request/anonymous -> k8s.io/apiserver/pkg/authentication/request/anonymous
k8s.io/kubernetes/plugin/pkg/auth/authenticator/request/union -> k8s.io/apiserver/pkg/authentication/request/union
k8s.io/kubernetes/plugin/pkg/auth/authenticator/request/x509 -> k8s.io/apiserver/pkg/authentication/request/x509
k8s.io/kubernetes/plugin/pkg/auth/authenticator/token/tokenfile -> k8s.io/apiserver/pkg/authentication/token/tokenfile
```

@sttts
2017-01-11 15:16:13 -08:00
deads2k c4fae4e690 mechanical repercussions 2017-01-11 15:20:36 -05:00
deads2k 5280c8d3ac moves of genericapiserver packages without dependencies 2017-01-11 15:06:38 -05:00
Dr. Stefan Schimanski 4a1d507756 Update bazel 2017-01-11 18:53:24 +01:00
Dr. Stefan Schimanski cf60bec396 Split out server side code from pkg/apis/rbac/validation 2017-01-11 18:31:58 +01:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Kubernetes Submit Queue ba611194f7 Merge pull request #39718 from foxish/remove-statefulset-special-case
Automatic merge from submit-queue (batch tested with PRs 39230, 39718)

Remove special case for StatefulSets in scheduler

**What this PR does / why we need it**: Removes special case for StatefulSet in scheduler code
/ref: https://github.com/kubernetes/kubernetes/issues/39687

**Special notes for your reviewer**:

**Release note**:

```release-note
Scheduler treats StatefulSet pods as belonging to a single equivalence class.
```
2017-01-11 00:23:11 -08:00
Anirudh dda3b01d01 Remove special case for StatefulSets in scheduler 2017-01-10 22:48:11 -08:00
Kubernetes Submit Queue 3f9f7471af Merge pull request #38989 from sjenning/set-qos-field
Automatic merge from submit-queue (batch tested with PRs 39684, 39577, 38989, 39534, 39702)

Set PodStatus QOSClass field

This PR continues the work for https://github.com/kubernetes/kubernetes/pull/37968

It converts all local usage of the `qos` package class types to the new API level types (first commit) and sets the pod status QOSClass field in the at pod creation time on the API server in `PrepareForCreate` and in the kubelet in the pod status update path (second commit).  This way the pod QOS class is set even if the pod isn't scheduled yet.

Fixes #33255

@ConnorDoyle @derekwaynecarr @vishh
2017-01-10 22:24:13 -08:00
Kubernetes Submit Queue 959687543a Merge pull request #39651 from liggitt/passwordfile-groups
Automatic merge from submit-queue (batch tested with PRs 39694, 39383, 39651, 39691, 39497)

Add support for groups to passwordfile

As we move deployment methods to using RBAC, it is useful to be able to place the admin user in the bootstrap kubeconfig files in a superuser group. The tokencsv file supports specifying group membership, but the basicauth file does not. This adds it for parity.

I plan to update the generated password file to put the admin user in a group (similar to the way https://github.com/kubernetes/kubernetes/pull/39537 puts that user in a group in the token file)

```release-note
--basic-auth-file supports optionally specifying groups in the fourth column of the file
```
2017-01-10 21:25:15 -08:00
Kubernetes Submit Queue 49a0cf7f68 Merge pull request #39641 from liggitt/node-controller-status
Automatic merge from submit-queue (batch tested with PRs 38212, 38792, 39641, 36390, 39005)

Allow node-controller to update node status

ref: #39639 

* adds required permissions to node-controller
 * fixes typo in role name for pod-garbage-collector role
* adds event watching permissions to persistent volume controller
* adds event permissions to node proxier
2017-01-10 19:48:12 -08:00
Kubernetes Submit Queue add3a08a6d Merge pull request #39491 from jayunit100/sched_Histogram_error
Automatic merge from submit-queue (batch tested with PRs 34488, 39511, 39619, 38342, 39491)

Update FitError as a message component into the PodConditionUpdater.

Fixes #20064 , after a roundabout volley of ideas, we ended up digging into existing Conditions for this, rather then a first class API object.  This is just a quick sketch of the skeleton minimal implementation, it should pretty much "just work".  I'll test it more later today.


Release Note:
```
Histogram data of predicate failures is contained in pod conditions and thus available to users by kubectl commands.
```
2017-01-10 16:07:17 -08:00
Kubernetes Submit Queue 609e3e3890 Merge pull request #39619 from deads2k/fed-20-rename
Automatic merge from submit-queue (batch tested with PRs 34488, 39511, 39619, 38342, 39491)

rename kubernetes-discovery to kube-aggregator

Rename `kubernetes-discovery` to `kube-aggregator`.  Move and bulk rename.

@kubernetes/sig-api-machinery-misc
2017-01-10 16:07:14 -08:00
Kubernetes Submit Queue 17665a009f Merge pull request #38167 from ericchiang/oidc-client-auth-cache-provider
Automatic merge from submit-queue (batch tested with PRs 39648, 38167, 39591, 39415, 39612)

oidc client auth provider: cache OpenID Connect clients to prevent reinitialization

Still need to add tests.

closes #37876

cc @kubernetes/sig-auth @liggitt @jsloyer @mlbiam @philips
2017-01-10 13:33:10 -08:00
deads2k 453651cbfc rename kubernetes-discovery to kube-aggregator 2017-01-10 12:27:42 -05:00
Seth Jennings 4c30459e49 switch from local qos types to api types 2017-01-10 10:54:30 -06:00
Jordan Liggitt caca81b1b5
Add support for groups to passwordfile 2017-01-10 00:04:26 -05:00
Jordan Liggitt c6550af702
Allow proxier to write events 2017-01-09 23:36:09 -05:00
Jordan Liggitt 6d3b06125e
Allow the persistent volume binder to watch events 2017-01-09 23:36:09 -05:00
Jordan Liggitt c59c11eb0d
fix role for pod-garbage-collector 2017-01-09 23:36:09 -05:00
Jordan Liggitt bda95a59ad
Allow node-controller to update node status 2017-01-09 23:36:09 -05:00
deads2k 1df5b658f2 switch webhook to clientgo 2017-01-09 16:53:24 -05:00
jayunit100 9cdc4ae0ad Update FitError as a message component into the PodConditionUpdater. 2017-01-09 10:24:14 -05:00
Anirudh a8a65022b4 Update fixtures 2017-01-06 13:36:34 -08:00
Anirudh 2146f2f221 Allow disruption controller to read statefulsets 2017-01-06 13:03:44 -08:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Jeff Grafton f8288ed1f3 Create BUILD files in top-level subdirectories 2017-01-05 14:14:12 -08:00
deads2k 4d7fcae85a mechanicals 2017-01-05 11:14:27 -05:00
deads2k 1ebe759743 selectively move to client-go packages 2017-01-04 17:49:24 -05:00
Kubernetes Submit Queue 5ee52e8bce Merge pull request #39384 from deads2k/generic-01-start-staging
Automatic merge from submit-queue

Start moving genericapiserver to staging

This moves `pkg/auth/user` to `staging/k8s.io/genericapiserver/pkg/authentication/user`.  I'll open a separate pull into the upstream gengo to support using `import-boss` on vendored folders to support staging.

After we agree this is the correct approach and see everything build, I'll start moving other packages over which don't have k8s.io/kubernetes deps.

@kubernetes/sig-api-machinery-misc @lavalamp 
@sttts @caesarxuchao ptal
2017-01-04 12:06:34 -08:00
deads2k ca58ec0237 mechanical changes for move 2017-01-04 10:27:05 -05:00
Kubernetes Submit Queue bd100b3b80 Merge pull request #38084 from tanshanshan/fix-little1
Automatic merge from submit-queue

Fix comment and optimize code

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

Fix comment and optimize code.

Thanks.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-04 06:56:32 -08:00
Kubernetes Submit Queue 38d57e5a71 Merge pull request #39355 from kargakis/update-rc-manager
Automatic merge from submit-queue

Share rc cache from the rc manager

@kubernetes/sig-apps-misc @hodovska
2017-01-04 05:18:29 -08:00
tanshanshan d1fd1d3516 fix comment and so on 2017-01-04 17:16:11 +08:00
Kubernetes Submit Queue 016133cf7d Merge pull request #36087 from ericchiang/plugin-auth-oidc-verify-email
Automatic merge from submit-queue

oidc auth-n plugin: enforce email_verified claim

This change causes the OpenID Connect authenticator to start
enforcing the 'email_verified' claim.

https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims

If the OIDC authenticator uses the 'email' claim as a user's username
and the 'email_verified' is not set to `true`, reject that authentication attempt.

cc @erictune @kubernetes/sig-auth @mlbiam

```release-note
When using OIDC authentication and specifying --oidc-username-claim=email, an `"email_verified":true` claim must be returned from the identity provider.
```
2017-01-04 00:50:31 -08:00
Kubernetes Submit Queue 2bad7e6be1 Merge pull request #39219 from liggitt/swagger-discovery
Automatic merge from submit-queue

Include swaggerapi urls in system:discovery role

Used by client side API validation and for client schema generation
2017-01-04 00:09:41 -08:00