Commit Graph

1639 Commits (8d7ba2bea2ffab83115a56dc9cc67dc8ab067a2c)

Author SHA1 Message Date
deads2k 8a12000402 move client/record 2017-01-31 19:14:13 -05:00
Matthew Wong caefe1a9ed Add bootstrap cluster role for external pv provisioners 2017-01-31 11:13:54 -05:00
Kevin 36dcb57407 forgiveness library changes 2017-01-31 21:39:17 +08:00
Kubernetes Submit Queue abbb3fa72f Merge pull request #38601 from yarntime/fix_typo_needed
Automatic merge from submit-queue (batch tested with PRs 40405, 38601, 40083, 40730)

fix typo

**What this PR does / why we need it**:
    fix typo.

**Release note**:

```NONE
```
2017-01-31 04:44:41 -08:00
Kubernetes Submit Queue 40d8e2adff Merge pull request #40579 from liggitt/rbac-v1beta1
Automatic merge from submit-queue (batch tested with PRs 40392, 39242, 40579, 40628, 40713)

Update rbac role data to v1beta1
2017-01-31 01:16:53 -08:00
Seth Jennings 071c66a011 fix nil deref in exec admission 2017-01-30 13:51:00 -06:00
Kubernetes Submit Queue 3dbbd0bdf4 Merge pull request #40606 from deads2k/client-17-sync
Automatic merge from submit-queue (batch tested with PRs 34543, 40606)

sync client-go and move util/workqueue

The vision of client-go is that it provides enough utilities to build a reasonable controller.  It has been copying `util/workqueue`.  This makes it authoritative.

@liggitt I'm getting really close to making client-go authoritative ptal.

approved based on https://github.com/kubernetes/kubernetes/issues/40363
2017-01-30 08:19:10 -08:00
Kubernetes Submit Queue 83791b0ee4 Merge pull request #34543 from ivan4th/dont-require-failure-domains-for-pod-affinity-checker
Automatic merge from submit-queue

Don't require failureDomains in PodAffinityChecker

`failureDomains` are only used for `PreferredDuringScheduling` pod
anti-affinity, which is ignored by `PodAffinityChecker`.
This unnecessary requirement was making it hard to move
`PodAffinityChecker` to `GeneralPredicates` because that would require
passing `--failure-domains` to both `kubelet` and `kube-controller-manager`.
2017-01-30 08:18:32 -08:00
deads2k 2c1c0f3f72 move workqueue to client-go 2017-01-30 09:08:21 -05:00
Kubernetes Submit Queue 2cb17cc677 Merge pull request #40426 from sttts/sttts-more-cutoffs-3
Automatic merge from submit-queue

genericapiserver: cut off more dependencies – episode 3

Compare commit subjects.

This is the first step to get `apiserver_test.go` and `watch_test.go` in `pkg/genericapiserver/endpoints` cutoff from k8s.io/kubernetes dependencies.

After this we have to sync client-go and then "episode 4" can go in.

approved based on #40363
2017-01-30 05:57:49 -08:00
Dr. Stefan Schimanski 44ea6b3f30 Update generated files 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski 79adb99a13 pkg/api: move Semantic equality to k8s.io/apimachinery/pkg/api/equality 2017-01-29 21:41:45 +01:00
Dr. Stefan Schimanski bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
Dr. Stefan Schimanski a12c661773 pkg/util: move trace.go to k8s.io/apiserver/pkg/util/trace 2017-01-29 21:41:44 +01:00
Jordan Liggitt 07f14ebc6f
Update authn/authz owners and reviewers 2017-01-27 08:55:44 -05:00
Jordan Liggitt a65e042b06
Update rbac role data to v1beta1 2017-01-26 23:53:27 -05:00
Kubernetes Submit Queue 7213816258 Merge pull request #39999 from tanshanshan/unit-test-scheduler1
Automatic merge from submit-queue (batch tested with PRs 40543, 39999)

Improve code coverage for scheduler/algorithm/priorities

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

Improve code coverage for scheduler/algorithm/priorities from #39559 

This is my first unit test  for kubernetes , thanks for your review.

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-26 18:07:28 -08:00
deads2k 9488e2ba30 move testing/core to client-go 2017-01-26 13:54:40 -05:00
deads2k 76ce7bcbd8 stop hardcoding api registry and codecs in webhook 2017-01-26 08:37:06 -05:00
Kubernetes Submit Queue bb323d8dea Merge pull request #40188 from jayunit100/NewSchedulerFromInterface
Automatic merge from submit-queue (batch tested with PRs 39538, 40188, 40357, 38214, 40195)

Decoupling scheduler creation from creation of scheduler.Config struc…

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

Adds functionality to the scheduler to initialize from an Configurator interface, rather then via a Config struct.

**Which issue this PR fixes** 

Reduces coupling to `scheduler.Config` data structure format so that we can proliferate more interface driven composition of scheduler components.
2017-01-25 17:47:12 -08:00
Kubernetes Submit Queue e9819106e0 Merge pull request #40467 from liggitt/serviceaccount-owners
Automatic merge from submit-queue

Add serviceaccount owners files

Poor @derekwaynecarr is the sole approver/reviewer for the entire admission package.

This adds OWNERS files for service account controller and admission packages
2017-01-25 15:07:59 -08:00
Jordan Liggitt ecb632abc4
Add serviceaccount owners files 2017-01-25 15:42:15 -05:00
Eric Chiang 2bdaac5594 plugin/pkg/admission/serviceaccount: prefer first referenced secret
When a pod uses a service account that references multiple secrets,
prefer the secrets in the order they're listed.

Without this change, the added test fails:

    --- FAIL: TestMultipleReferencedSecrets (0.00s)
            admission_test.go:832: expected first referenced secret to be mounted, got "token2"
2017-01-25 10:42:39 -08:00
Kubernetes Submit Queue 5c5ce3baee Merge pull request #40362 from deads2k/client-14-move-pkgs
Automatic merge from submit-queue

move client/cache and client/discovery to client-go

mechanical changes to move those packages.  Had to create a `k8s.io/kubernetes/pkg/client/tests` package for tests that were blacklisted from client-go.  We can rewrite these tests later and move them, but for now they'll still run at least.

@caesarxuchao @sttts
2017-01-25 08:17:15 -08:00
jayunit100 8439f81f2d NewSchedulerFromInterface implementation 2017-01-25 10:21:27 -05:00
Kubernetes Submit Queue 6873d2a5d2 Merge pull request #39081 from ChenLingPeng/no-schedule-deleting-pod
Automatic merge from submit-queue

Skip schedule deleting pod

Since binding a deleting pod will always return fail, we should skip that kind of pod early
2017-01-25 06:06:47 -08:00
deads2k b0b156b381 make tools/cache authoritative 2017-01-25 08:29:45 -05:00
Dr. Stefan Schimanski 2b8e938128 Update generated files 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 82826ec273 pkg/util/flag: move to k8s.io/apiserver 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski a6b2ebb50c pkg/flag: make feature gate extensible and split between generic and kube 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 56d60cfae6 pkg/util: move flags from pkg/util/config to pkg/util/flags 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 4beba154b4 genericapiserver: move authz webhook plugins into k8s.io/apiserver 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 4077e0bba7 genericapiserver: move authn plugins into k8s.io/apiserver 2017-01-24 20:56:03 +01:00
deads2k 5a8f075197 move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
forrestchen e2a465ae68 skip schedule deleting pod
Signed-off-by: forrestchen <forrestchen@tencent.com>

skip schedule deleting pod

Signed-off-by: forrestchen <forrestchen@tencent.com>
2017-01-24 10:13:54 +08:00
tanshanshan fb36d9a546 add unit test for scheduler 2017-01-24 09:31:08 +08:00
Clayton Coleman 9009c1ac14
generated: informer,client 2017-01-23 17:52:47 -05:00
Clayton Coleman 469df12038
refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
Antoine Pelisse 62af7dd33d OWNERS: Update latest OWNERS files
These files have been created lately, so we don't have much information
about them anyway, so let's just:
- Remove assignees and make them approvers
- Copy approves as reviewers
2017-01-23 10:05:48 -08:00
deads2k 335ef747d6 mechanical 2017-01-23 10:03:55 -05:00
deads2k 1ce0637b27 move listers out of cache to reduce import tree 2017-01-20 15:01:38 -05:00
Kubernetes Submit Queue 22a405055d Merge pull request #40170 from deads2k/client-10-restclient
Automatic merge from submit-queue (batch tested with PRs 36693, 40154, 40170, 39033)

make client-go authoritative for pkg/client/restclient

Moves client/restclient to client-go and a util/certs, util/testing as transitives.
2017-01-20 09:18:52 -08:00
Kubernetes Submit Queue b2e134a724 Merge pull request #36693 from ConnorDoyle/oir-cleanup
Automatic merge from submit-queue (batch tested with PRs 36693, 40154, 40170, 39033)

Minor hygiene in scheduler.

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

Minor cleanups in scheduler, related to PR #31652.

- Unified lazy opaque resource caching.
- Deleted a commented-out line of code.

**Release note**:
```release-note
N/A
```
2017-01-20 09:18:49 -08:00
deads2k 9c6a522882 mechanical results of client auth plugin 2017-01-20 08:05:18 -05:00
deads2k 2f51cc4ce4 move client auth plugins 2017-01-20 08:04:53 -05:00
deads2k ee6752ef20 find and replace 2017-01-20 08:04:53 -05:00
deads2k c587b8a21e re-run client-gen 2017-01-20 08:02:36 -05:00
Garrett Rodrigues ad1e5e98c2 Updated top level owners file to match new format 2017-01-19 11:29:16 -08:00
Kubernetes Submit Queue e9d4e4341c Merge pull request #40087 from deads2k/generic-24-move-fields
Automatic merge from submit-queue

move pkg/fields to apimachinery

Purely mechanical move of `pkg/fields` to apimachinery.  

Discussed with @lavalamp on slack.  Moving this an `labels` to apimachinery.

@liggitt any concerns?  I think the idea of field selection should become generic and this ends up shared between client and server, so this is a more logical location.
2017-01-19 08:48:17 -08:00
Kubernetes Submit Queue 05c2a0825e Merge pull request #38871 from k82cn/k8s_25318
Automatic merge from submit-queue

Made multi-scheduler graduated to Beta and then v1.

fixes #25318
2017-01-19 07:58:51 -08:00
deads2k 11e8068d3f move pkg/fields to apimachinery 2017-01-19 09:50:16 -05:00
Kubernetes Submit Queue ac857a5ade Merge pull request #40106 from deads2k/client-09-switch
Automatic merge from submit-queue

make client-go more authoritative

Builds on https://github.com/kubernetes/kubernetes/pull/40103

This moves a few more support package to client-go for origination.  
 1. restclient/watch - nodep
 1. util/flowcontrol - used interface
 1. util/integer, util/clock - used in controllers and in support of util/flowcontrol
2017-01-19 06:34:49 -08:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
deads2k cdb2934bbc remove kubernetes copy of clientcmd types 2017-01-19 07:39:19 -05:00
Klaus Ma c8c4b81963 Made multi-scheduler graduated to Beta and then v1. 2017-01-19 20:16:01 +08:00
Dr. Stefan Schimanski 3d9449a353 genericapiserver: fix imports 2017-01-19 13:06:47 +01:00
Kubernetes Submit Queue 9dd96e3120 Merge pull request #39904 from jayunit100/scheduler_factory_iface_2
Automatic merge from submit-queue (batch tested with PRs 39898, 39904)

[scheduler] interface for config

**What this PR fixes**

This PR converts the Scheduler configuration factory into an interface, so that
- the scheduler_perf and scheduler integration tests dont rely on the struct for their implementation
- the exported functionality of the factory (i.e. what it needs to provide to create a scheduler configuration) is completely explicit, rather then completely coupled to a struct.
- makes some parts of the factory immutable, again to minimize possible coupling.  

This makes it easier to make a custom factory in instances where we might specifically want to import scheduler logic without actually reusing the entire scheduler codebase.
2017-01-18 14:31:09 -08:00
Kubernetes Submit Queue b9f02bd2ff Merge pull request #39568 from k82cn/cc_sig_pred
Automatic merge from submit-queue (batch tested with PRs 36467, 36528, 39568, 40094, 39042)

Improve code coverage for algorithm/predicates.

Improve code coverage for algorithm/predicates for #39559 .

Improved coverage from 71.3% to 81.9%.

Coverage report: [combined-coverage.html.gz](https://github.com/kubernetes/kubernetes/files/691518/combined-coverage.html.gz)
2017-01-18 13:37:10 -08:00
jayunit100 a98d14d2c5 [scheduler] interface for configuration factory, configurator. 2017-01-18 15:06:16 -05:00
deads2k 68999bae22 add node problem detector role 2017-01-18 13:25:00 -05:00
Kubernetes Submit Queue 302d3ab1d7 Merge pull request #39625 from deads2k/rbac-36-beta
Automatic merge from submit-queue (batch tested with PRs 39625, 39842)

Add RBAC v1beta1

Add `rbac.authorization.k8s.io/v1beta1`.  This scrubs `v1alpha1` to remove cruft, then add `v1beta1`.  We'll update other bits of infrastructure to code to `v1beta1` as a separate step.

```release-note
The `attributeRestrictions` field has been removed from the PolicyRule type in the rbac.authorization.k8s.io/v1alpha1 API. The field was not used by the RBAC authorizer.
```

@kubernetes/sig-auth-misc @liggitt @erictune
2017-01-18 10:19:11 -08:00
deads2k d1fec7068f generated 2017-01-18 10:35:46 -05:00
Klaus Ma aea7b1faab Improve code coverage for algorithm/predicates. 2017-01-18 23:23:26 +08:00
deads2k 01b3b2b461 move admission to genericapiserver 2017-01-18 08:15:19 -05:00
Kubernetes Submit Queue c14fa94a4a Merge pull request #40042 from seh/add-ingress-to-rbac-roles
Automatic merge from submit-queue

Include "ingresses" resource in RBAC bootstrap roles

The bootstrap RBAC roles "admin", "edit", and "view" should all be able to apply their respective access verbs to the "ingresses" resource in order to facilitate both publishing Ingress resources (for
service administrators) and consuming them (for ingress controllers).

Note that I alphabetized the resources listed in the role definitions that I changed to make it easier to decide later where to insert new entries. The original order looked like it may have started out alphabetized, but lost its way. If I missed an intended order there, please advise.

I am uncertain whether this change deserves mention in a release note, given the RBAC feature's alpha state. Regardless, it's possible that a cluster administrator could have been happy with the previous set of permissions afforded by these roles, and would be surprised to discover that bound subjects can now control _Ingress_ resources. However, in order to be afflicted, that administrator would have had to have applied these role definitions again which, if I understand it, would be a deliberate act, as bootstrapping should only occur once in a given cluster.
2017-01-17 15:32:45 -08:00
Clayton Coleman bcde05753b
Correct import statements 2017-01-17 16:18:18 -05:00
Clayton Coleman 660095776a
generated: staging 2017-01-17 16:17:20 -05:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Clayton Coleman 36acd90aba
Move APIs and core code to use metav1.ObjectMeta 2017-01-17 16:17:18 -05:00
Kubernetes Submit Queue fc8e029f8f Merge pull request #40034 from liggitt/node-bootstrapper-role
Automatic merge from submit-queue

Add node TLS bootstrapping role

Adds a role describing permissions needed to complete the kubelet client bootstrap flow. Needed by kubeadm in https://github.com/kubernetes/kubernetes/pull/39846#discussion_r96491471
2017-01-17 12:44:24 -08:00
Steven E. Harris 0016f7f2fc Include "ingresses" in RBAC bootstrap roles
The bootstrap RBAC roles "admin", "edit", and "view" should all be
able to apply their respective access verbs to the "ingresses"
resource in order to facilitate both publishing Ingress resources (for
service administrators) and consuming them (for ingress controllers).
2017-01-17 15:37:19 -05:00
Jordan Liggitt d11f5a0a20
Add node TLS bootstrapping role 2017-01-17 14:31:34 -05:00
deads2k b2586830c3 add heapster role 2017-01-17 11:27:57 -05:00
Connor Doyle 94b9c0e20c Minor hygiene in scheduler.
- Unified lazy opaque resource caching.
- Deleted a commented-out line of code.
2017-01-17 07:00:07 -08:00
Kubernetes Submit Queue 0bd13332e9 Merge pull request #39447 from gyliu513/patch1
Automatic merge from submit-queue

Corrected a typo in scheduler factory.go.

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

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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-01-17 04:12:44 -08:00
Kubernetes Submit Queue b1506004cc Merge pull request #39601 from mqliang/upstream-tolerates-taints-bugfix
Automatic merge from submit-queue (batch tested with PRs 39945, 39601)

bugfix for PodToleratesNodeTaints

`PodToleratesNodeTaints`predicate func should return true if pod has no toleration annotations and node's taint effect is `PreferNoSchedule`
2017-01-17 04:08:47 -08:00
Dr. Stefan Schimanski 8fe0958ba0 Update bazel 2017-01-17 09:30:48 +01:00
Dr. Stefan Schimanski 5c88b7d05a Fix imports 2017-01-17 09:30:30 +01:00
Kubernetes Submit Queue 7b471136ba Merge pull request #39968 from timothysc/sched_owners
Automatic merge from submit-queue (batch tested with PRs 37680, 39968)

Update Owners for Scheduler

Update Owners file for scheduler component to spread the reviews around. 

/cc @davidopp  per previous sig-mtg.
2017-01-17 00:04:34 -08:00
Kubernetes Submit Queue e1900f704b Merge pull request #39993 from k82cn/pod_anti_affinity_issue
Automatic merge from submit-queue

Fixed pod anti-affinity bugs.

Broken by https://github.com/kubernetes/kubernetes/pull/39478/files#diff-fa4312d87a8e13262ade8a784ada4693R1036

/cc @timothysc @rrati
2017-01-16 23:12:47 -08:00
Klaus Ma c184fef6e6 Fixed pod anti-affinity bugs. 2017-01-17 13:28:54 +08:00
Timothy St. Clair 78574926df Update Owners for Scheduler 2017-01-16 19:30:17 -06:00
deads2k a3e71b2cef move name generation to generic api server storage helpers 2017-01-16 16:04:04 -05:00
Kubernetes Submit Queue 6cd0592a46 Merge pull request #39963 from deads2k/rbac-39-permissions
Automatic merge from submit-queue

add patch RS to deployment controller

Found in http://gcsweb.k8s.io/gcs/kubernetes-jenkins/logs/ci-kubernetes-e2e-gci-gce/2841/artifacts/bootstrap-e2e-master/, `RBAC DENY: user "system:serviceaccount:kube-system:deployment-controller" groups [system:serviceaccounts system:serviceaccounts:kube-system system:authenticated] cannot "patch" on "replicasets.extensions/" in namespace "e2e-tests-deployment-3rj5g"
`

@kubernetes/sig-auth-misc
2017-01-16 12:15:16 -08:00
Kubernetes Submit Queue 8ab0519160 Merge pull request #39961 from liggitt/patch-permissions
Automatic merge from submit-queue

Give replicaset controller patch permission on pods

Needed for AdoptPod/ReleasePod

Fixes denials seen in autoscaling test log:
`RBAC DENY: user "system:serviceaccount:kube-system:replicaset-controller" groups [system:serviceaccounts system:serviceaccounts:kube-system system:authenticated] cannot "patch" on "pods./"`
2017-01-16 11:23:40 -08:00
Kubernetes Submit Queue 6defc30337 Merge pull request #39882 from deads2k/api-59-errors
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

move api/errors to apimachinery

`pkg/api/errors` is a set of helpers around `meta/v1.Status` that help to create and interpret various apiserver errors.  Things like `.NewNotFound` and `IsNotFound` pairings.  This pull moves it into apimachinery for use by the clients and servers.

@smarterclayton @lavalamp First commit is the move plus minor fitting.  Second commit is straight replace and generation.
2017-01-16 10:37:42 -08:00
deads2k 56c0ae6456 add patch RS to deployment controller 2017-01-16 12:44:25 -05:00
Jordan Liggitt 4eee0b2b41
Give replicaset controller patch permission on pods
Needed for AdoptPod/ReleasePod
2017-01-16 12:32:37 -05:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Kubernetes Submit Queue 8fa23586cf Merge pull request #39918 from liggitt/e2e-examples-permissions
Automatic merge from submit-queue

Fix examples e2e permission check

Ref #39382
Follow-up from #39896

Permission check should be done within the e2e test namespace, not cluster-wide

Also improved RBAC audit logging to make the scope of the permission check clearer
2017-01-16 06:30:29 -08:00
Kubernetes Submit Queue eb9f953496 Merge pull request #39876 from deads2k/generic-20-deps-03
Automatic merge from submit-queue

move more things to apiserver

```
pkg/genericapiserver/api/handlers/negotiation/ -> apiserver/pkg/handlers/negotiation
pkg/genericapiserver/api/metrics -> apiserver/pkg/metrics
pkg/genericapiserver/api/request -> apiserver/pkg/request
pkg/util/wsstream -> apiserver/pkg/util/wsstream
plugin/pkg/auth/authenticator/request/headerrequest -> apiserver/pkg/authentication/request/headerrequest
plugin/pkg/webhook -> apiserver/pkg/webhook
```

and mechanicals.

`k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger` needs to be sorted out.
2017-01-16 04:14:37 -08:00
Jordan Liggitt 7f81e2e4ac
Improve RBAC denial audit logging 2017-01-14 17:31:58 -05:00
Kubernetes Submit Queue f21a0f03c3 Merge pull request #39905 from mikedanese/cert-rbac
Automatic merge from submit-queue

add rbac role for certificate-controller

@liggitt @jcbsmpsn @pipejakob
2017-01-14 07:46:11 -08:00
Mike Danese f3e97d522d add rbac role for certificate-controller 2017-01-13 17:40:24 -08:00
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
deads2k 31b6ba4e94 mechanicals 2017-01-13 16:33:09 -05:00
deads2k 81b073a5f5 move no k8s.io/kubernetes deps to apiserver 2017-01-13 16:26:58 -05: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
mqliang d473646855 bugfix for PodToleratesNodeTaints 2017-01-09 18:16:43 +08: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
Guangya Liu ec35e0447e Corrected a typo in scheduler factory.go. 2017-01-05 06:37:56 +08: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
xilabao 9b38eaf98e omit the reason if we don't have an error when using rbac 2017-01-04 11:41:43 +08:00
deads2k 2861509b6d refactored admission to avoid internal client references 2017-01-03 15:50:12 -05:00
Michail Kargakis e5b586b5b0 Share rc cache from the rc manager 2017-01-03 16:59:09 +01:00
Kubernetes Submit Queue 63eec9608d Merge pull request #39353 from sttts/sttts-requestcontextmapper-move
Automatic merge from submit-queue (batch tested with PRs 39075, 39350, 39353)

Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request

**Based on #39350**
2017-01-03 07:40:30 -08:00
Dr. Stefan Schimanski 87dd990bb7 Move pkg/api.{Context,RequestContextMapper} into pkg/genericapiserver/api/request 2017-01-03 14:57:33 +01:00
Kubernetes Submit Queue 2b7899ae46 Merge pull request #38503 from dshulyak/ttlassumed
Automatic merge from submit-queue

Ensure that assumed pod won't be expired until the end of binding

In case if api server is overloaded and will reply with 429 too many requests error, binding may take longer than ttl of scheduler cache for assumed pods 1199d42210/pkg/client/restclient/request.go (L787-L850) 

This problem was mitigated by using this fix e4d215d508 and increased rate limit for api server. But it is possible that it will occur again.
2017-01-03 04:15:06 -08:00
Dmitry Shulyak 530ee716e3 Count ttl for assumed pod when binding is finished
In such cases when api server is overloaded and returns a lot of
429 (too many requests) errors - binding may take a lot of time
to succeed due to retry policy implemented in rest client.
In such events cache ttl for assumed pods wasn't big enough.

In order to minimize probability of such errors ttl for assumed pods
will be counted from the time when binding for particular pod is finished
(either with error or success)

Change-Id: Ib0122f8a76dc57c82f2c7c52497aad1bdd8be411
2017-01-03 12:45:11 +02:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Kubernetes Submit Queue 69ddd8eb27 Merge pull request #39247 from wojtek-t/optimize_controller_manager_memory
Automatic merge from submit-queue

Avoid unnecessary memory allocations

Low-hanging fruits in saving memory allocations. During our 5000-node kubemark runs I've see this:

ControllerManager:
- 40.17% k8s.io/kubernetes/pkg/util/system.IsMasterNode
- 19.04% k8s.io/kubernetes/pkg/controller.(*PodControllerRefManager).Classify

Scheduler:
- 42.74% k8s.io/kubernetes/plugin/pkg/scheduler/algrorithm/predicates.(*MaxPDVolumeCountChecker).filterVolumes

This PR is eliminating all of those.
2016-12-28 00:02:59 -08:00
Wojciech Tyczynski ba07a36651 Avoid copying volumes in scheduler 2016-12-27 16:11:11 +01:00
Kubernetes Submit Queue 7b134995e5 Merge pull request #37513 from xiaolou86/podAffinity
Automatic merge from submit-queue

Optimize pod affinity when predicate

Optimize by returning as early as possible to avoid invoking priorityutil.PodMatchesTermsNamespaceAndSelector.
2016-12-27 06:46:54 -08:00
Jordan Liggitt a209040ac8
Include swaggerapi urls in system:discovery role 2016-12-24 12:36:38 -05:00
Eric Chiang 13e6318cb0 plugin/pkg/client/auth/oidc: update bazel 2016-12-22 14:19:15 -08:00
Eric Chiang 46518e937c rework oidc client auth provider
* Cache OpenID Connect clients to prevent reinitialization
* Don't retry requests in the http.RoundTripper.
  * Don't rely on the server not reading POST bodies.
  * Don't leak response body FDs.
  * Formerly ignored any throttling requests by the server.
* Determine if the id token's expired by inspecting it.
  * Similar to logic in golang.org/x/oauth2
* Synchronize around refreshing tokens and persisting the new config.
2016-12-22 14:19:15 -08:00
xilabao 2a77353164 extend err info when authorize failed 2016-12-22 14:47:56 +08:00
deads2k 17f600d671 rbac deny output for e2e tests 2016-12-21 13:51:50 -05:00
deads2k 8f1677b7c8 add service status detection to kubernetes-discovery 2016-12-19 14:56:20 -05:00
Kubernetes Submit Queue 9ba4a0effc Merge pull request #38908 from spxtr/wow
Automatic merge from submit-queue

Remove two zany unit tests.

These two tests aren't unit tests in the usual sense. We can consider switching them to run as verify checks, but I'm not convinced that they're even necessary.

They essentially work by searching their code for public functions with signatures that look like `FitPredicate`, then they shell out to grep to see that they're used somewhere in the source tree. This will never work in bazel.
2016-12-16 19:34:04 -08:00
Maciej Szulik 9f064c57ce Remove extensions/v1beta1 Job 2016-12-17 00:07:24 +01:00
Joe Finney b4c87a94a8 Remove two zany unit tests. 2016-12-16 14:49:05 -08:00
Robert Rati 91931c138e [scheduling] Moved node affinity from annotations to api fields. #35518 2016-12-16 11:42:43 -05:00
Mike Danese 8fdec87d19 bazel: fix some unit tests 2016-12-15 18:36:22 -08:00
deads2k 6ab6975983 update for controller RBAC roles 2016-12-15 09:18:48 -05:00
Kubernetes Submit Queue 59ad9a30ca Merge pull request #36060 from resouer/fix-service-affinity
Automatic merge from submit-queue

Add use case to service affinity

Also part of nits in refactoring predicates, I found the explanation of `serviceaffinity` in its comment is very hard to understand. So I added example instead here to help user/developer to digest it.
2016-12-15 04:10:08 -08:00
Kubernetes Submit Queue d8efc779ed Merge pull request #38154 from caesarxuchao/rename-release_1_5
Automatic merge from submit-queue (batch tested with PRs 38154, 38502)

Rename "release_1_5" clientset to just "clientset"

We used to keep multiple releases in the main repo. Now that [client-go](https://github.com/kubernetes/client-go) does the versioning, there is no need to keep releases in the main repo. This PR renames the "release_1_5" clientset to just "clientset", clientset development will be done in this directory.

@kubernetes/sig-api-machinery @deads2k 

```release-note
The main repository does not keep multiple releases of clientsets anymore. Please find previous releases at https://github.com/kubernetes/client-go
```
2016-12-14 14:21:51 -08:00
Chao Xu 03d8820edc rename /release_1_5 to /clientset 2016-12-14 12:39:48 -08:00
Kubernetes Submit Queue 9705bb728e Merge pull request #38747 from yarntime/fix_typo_registers
Automatic merge from submit-queue (batch tested with PRs 38648, 38747)

fix typo

**What this PR does / why we need it**:
    fix typo.

**Release note**:

```NONE
```
2016-12-14 03:49:47 -08:00
Harry Zhang a0e836a378 Add use case to service affinity 2016-12-14 16:59:35 +08:00
Kubernetes Submit Queue f8c5d2c47a Merge pull request #37090 from humblec/iscsi-nodiskconf
Automatic merge from submit-queue (batch tested with PRs 35436, 37090, 38700)

Make iscsi pv/pvc aware of nodiskconflict feature

Being iscsi a `RWO, ROX` volume we should conflict if more than one pod is using same iscsi LUN.  

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-13 12:36:34 -08:00
Humble Chirammal 28088159c3 Make iscsi pv claim aware of nodiskconflict feature.
Being ISCSI a RWO/ROX volumes it should inherit nodiskconflict feature.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-12-13 10:07:09 +05:30
Kubernetes Submit Queue 65238bc390 Merge pull request #38572 from hongchaodeng/sr
Automatic merge from submit-queue (batch tested with PRs 38315, 38624, 38572, 38544)

scheduler: refactor main entry Run()

The kube-scheduler/app.Run() is the main entry of scheduler program.
It's enormous.
This PR tries to clean it up. Should be more modular and readable.
2016-12-12 19:42:35 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Hongchao Deng bcd3aac291 bazel update 2016-12-12 13:23:17 -08:00
Hongchao Deng a565648761 scheduler: refactor main entry Run() 2016-12-12 13:23:17 -08:00
Kubernetes Submit Queue b5cf713bc7 Merge pull request #38108 from hodovska/1396877-pvc-limitrange-max
Automatic merge from submit-queue (batch tested with PRs 37846, 38619, 38108)

LimitRange: modified approach for PVC max storage request enforcing

Behavior was correct but with not correct error messages. This pull request creates separate approach for enforcing the max request for persistent volume claim.

Additional info:
https://github.com/kubernetes/kubernetes/blob/master/docs/design/admission_control_limit_range.md#enforcement-of-constraints

bugzilla : https://bugzilla.redhat.com/show_bug.cgi?id=1396877
2016-12-12 10:30:07 -08:00
deads2k 4aeb3f3ffe update pod RBAC roles to work against head 2016-12-12 08:55:47 -05:00
yarntime@163.com 2a3b67c20f fix typo 2016-12-12 14:10:25 +08:00
yarntime@163.com 80e37cc04a fix typo 2016-12-12 13:49:09 +08:00
Hongchao Deng 479f507532 scheduler test: fix test due to nil pod assumption 2016-12-11 20:46:38 -08:00
Hongchao Deng a2426bd48a generic_scheduler: Schedule() pod param should never be nil 2016-12-11 19:30:48 -08:00
LouZhengwei 5c65088c18 optimize pod affinity when predicate 2016-12-11 23:49:45 +08:00
Clayton Coleman c52d510a24
refactor: generated 2016-12-10 18:05:53 -05:00
Clayton Coleman 3c72ee2189
Change references to OwnerReference 2016-12-10 18:05:36 -05:00
Kubernetes Submit Queue e732ee70f4 Merge pull request #38406 from liggitt/remove-internal-json-annotations
Automatic merge from submit-queue

Remove json serialization annotations from internal types

fixes #3933

Internal types should never be serialized, and including json serialization tags on them makes it possible to accidentally do that without realizing it.

fixes in this PR:

* types
  * [x] remove json tags from internal types
  * [x] fix references from serialized types to internal ObjectMeta
* generation
  * [x] remove generated json codecs for internal types (they should never be used)
* kubectl
  * [x] fix `apply` to operate on versioned object
  * [x] fix sorting by field to operate on versioned object
  * [x] fix `--record` to build annotation patch using versioned object
* hpa
  * [x] fix unmarshaling to internal CustomMetricTargetList in validation
* thirdpartyresources
  * [x] fix encoding API responses using internal ObjectMeta
* tests
  * [x] fix tests to use versioned objects when checking encoded content
  * [x] fix tests passing internal objects to generic printers

follow ups (will open tracking issues or additional PRs):
- [ ] remove json tags from internal kubeconfig types (`kubectl config set` pathfinding needs to work against external type)
- [ ] HPA should version CustomMetricTargetList serialization in annotations
- [ ] revisit how TPR resthandlers encoding objects
- [ ] audit and add tests for printer use (human-readable printer requires internal versions, generic printers require external versions)
- [ ] add static analysis tests preventing new internal types from adding tags
- [ ] add static analysis tests requiring json tags on external types (and enforcing lower-case first letter)
- [ ] add more tests for `kubectl get` exercising known and unknown types with all output options
2016-12-10 14:00:17 -08:00
Eric Chiang 778812f63b 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 password
and the 'email_verified' holds the value false, reject that
authentication attempt.

If 'email_verified' is true or not present, continue as before.
2016-12-09 14:22:17 -08:00
Jordan Liggitt d5afb71cf4
Remove json serialization annotations from internal types 2016-12-09 16:26:03 -05:00
Derek Carr 459a7a05f1 Ability to quota storage by storage class 2016-12-09 13:26:59 -05:00
Wojciech Tyczynski aa7da5231f Update bazel files 2016-12-09 09:42:02 +01:00
Wojciech Tyczynski e8d1cba875 GetOptions in client calls 2016-12-09 09:42:01 +01:00
Jordan Liggitt 6819706adf
Pass addressable values to DeepCopy 2016-12-08 14:16:01 -05:00
Kubernetes Submit Queue f2f107124b Merge pull request #37691 from dshulyak/term_selector
Automatic merge from submit-queue (batch tested with PRs 38377, 36365, 36648, 37691, 38339)

Do not create selector and namespaces in a loop where possible

With 1000 nodes and 5000 pods (5 pods per node) with anti-affinity a lot of CPU wasted on creating LabelSelector and sets.String (map). 

With this change we are able to deploy that number of pods in ~25 minutes. Without - it takes 30 minutes to deploy 500 pods with anti-affinity configured.
2016-12-08 10:52:01 -08:00
Kubernetes Submit Queue ae1a7784af Merge pull request #38261 from tanshanshan/more-readable
Automatic merge from submit-queue (batch tested with PRs 37701, 36702, 37145, 37424, 38261)

replace err with nil when err is nil

<!--  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**:

When err is nil ,replace err with nil, that can make code more readable

Thanks.
**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
```
2016-12-08 04:39:26 -08:00