Commit Graph

1870 Commits (c10cc3decdd25717eaca5fccfd7cfebb3e09e5ec)

Author SHA1 Message Date
Kubernetes Submit Queue 4c7e1590ee Merge pull request #40760 from mikedanese/gce
Automatic merge from submit-queue (batch tested with PRs 40760, 46706, 46783, 46742, 46751)

enable kubelet csr bootstrap in GCE/GKE

@jcbsmpsn @pipejakob 

Fixes https://github.com/kubernetes/kubernetes/issues/31168

```release-note
Enable kubelet csr bootstrap in GCE/GKE
```
2017-06-03 18:30:38 -07:00
Kubernetes Submit Queue dbd1503b65 Merge pull request #45924 from janetkuo/daemonset-history
Automatic merge from submit-queue

Implement Daemonset history

~Depends on #45867 (the 1st commit, ignore it when reviewing)~ (already merged)

Ref https://github.com/kubernetes/community/pull/527/ and https://github.com/kubernetes/community/pull/594

@kubernetes/sig-apps-api-reviews @kubernetes/sig-apps-pr-reviews @erictune @kow3ns @lukaszo @kargakis 

---

TODOs:
- [x] API changes
  - [x] (maybe) Remove rollback subresource if we decide to do client-side rollback 
- [x] deployment controller 
  - [x] controller revision
    - [x] owner ref (claim & adoption)
    - [x] history reconstruct (put revision number, hash collision avoidance)
    - [x] de-dup history and relabel pods
    - [x] compare ds template with history 
  - [x] hash labels (put it in controller revision, pods, and maybe deployment)
  - [x] clean up old history 
  - [x] Rename status.uniquifier when we reach consensus in #44774 
- [x] e2e tests 
- [x] unit tests 
  - [x] daemoncontroller_test.go 
  - [x] update_test.go 
  - [x] ~(maybe) storage_test.go // if we do server side rollback~

kubectl part is in #46144

--- 

**Release note**:

```release-note
```
2017-06-03 16:52:38 -07:00
Kubernetes Submit Queue 07f85565a2 Merge pull request #36721 from smarterclayton/initializers
Automatic merge from submit-queue

Add initializer support to admission and uninitialized filtering to rest storage

Initializers are the opposite of finalizers - they allow API clients to react to object creation and populate fields prior to other clients seeing them.

High level description:

1. Add `metadata.initializers` field to all objects
2. By default, filter objects with > 0 initializers from LIST and WATCH to preserve legacy client behavior (known as partially-initialized objects)
3. Add an admission controller that populates .initializer values per type, and denies mutation of initializers except by certain privilege levels (you must have the `initialize` verb on a resource)
4. Allow partially-initialized objects to be viewed via LIST and WATCH for initializer types
5. When creating objects, the object is "held" by the server until the initializers list is empty
6. Allow some creators to bypass initialization (set initializers to `[]`), or to have the result returned immediately when the object is created.

The code here should be backwards compatible for all clients because they do not see partially initialized objects unless they GET the resource directly. The watch cache makes checking for partially initialized objects cheap. Some reflectors may need to change to ask for partially-initialized objects.

```release-note
Kubernetes resources, when the `Initializers` admission controller is enabled, can be initialized (defaulting or other additive functions) by other agents in the system prior to those resources being visible to other clients.  An initialized resource is not visible to clients unless they request (for get, list, or watch) to see uninitialized resources with the `?includeUninitialized=true` query parameter.  Once the initializers have completed the resource is then visible.  Clients must have the the ability to perform the `initialize` action on a resource in order to modify it prior to initialization being completed.
```
2017-06-03 07:16:52 -07:00
Janet Kuo d02f40a5e7 Implement DaemonSet history logic in controller
1. Create controllerrevisions (history) and label pods with template
   hash for both RollingUpdate and OnDelete update strategy
2. Clean up old, non-live history based on revisionHistoryLimit
3. Remove duplicate controllerrevisions (the ones with the same template)
   and relabel their pods
4. Update RBAC to allow DaemonSet controller to manage
   controllerrevisions
5. In DaemonSet controller unit tests, create new pods with hash labels
2017-06-03 00:44:23 -07:00
Kubernetes Submit Queue b8c9ee8abb Merge pull request #46456 from jingxu97/May/allocatable
Automatic merge from submit-queue

Add local storage (scratch space) allocatable support

This PR adds the support for allocatable local storage (scratch space).
This feature is only for root file system which is shared by kubernetes
componenets, users' containers and/or images. User could use
--kube-reserved flag to reserve the storage for kube system components.
If the allocatable storage for user's pods is used up, some pods will be
evicted to free the storage resource.

This feature is part of local storage capacity isolation and described in the proposal https://github.com/kubernetes/community/pull/306

**Release note**:

```release-note
This feature exposes local storage capacity for the primary partitions, and supports & enforces storage reservation in Node Allocatable 
```
2017-06-03 00:24:29 -07:00
Kubernetes Submit Queue e837c3bbc2 Merge pull request #46388 from lavalamp/whitlockjc-generic-webhook-admission
Automatic merge from submit-queue (batch tested with PRs 46239, 46627, 46346, 46388, 46524)

Dynamic webhook admission control plugin

Unit tests pass.

Needs plumbing:
* [ ] service resolver (depends on @wfender PR)
* [x] client cert (depends on ????)
* [ ] hook source (depends on @caesarxuchao PR)

Also at least one thing will need to be renamed after Chao's PR merges.

```release-note
Allow remote admission controllers to be dynamically added and removed by administrators.  External admission controllers make an HTTP POST containing details of the requested action which the service can approve or reject.
```
2017-06-02 23:37:42 -07:00
Kubernetes Submit Queue 348bf1e032 Merge pull request #46627 from deads2k/api-12-labels
Automatic merge from submit-queue (batch tested with PRs 46239, 46627, 46346, 46388, 46524)

move labels to components which own the APIs

During the apimachinery split in 1.6, we accidentally moved several label APIs into apimachinery.  They don't belong there, since the individual APIs are not general machinery concerns, but instead are the concern of particular components: most commonly the kubelet.  This pull moves the labels into their owning components and out of API machinery.

@kubernetes/sig-api-machinery-misc @kubernetes/api-reviewers @kubernetes/api-approvers 
@derekwaynecarr  since most of these are related to the kubelet
2017-06-02 23:37:38 -07:00
Kubernetes Submit Queue ea5183262a Merge pull request #45331 from k82cn/k8s_39559_node_cache
Automatic merge from submit-queue

Added unit test for node operation in schedulercache.

Added unit test for node operation in schedulercache.

The code coverage is 62.4% (did not add cases for get/set and util.go which is used by algorithms.)

[combined-coverage.html.gz](https://github.com/kubernetes/kubernetes/files/975427/combined-coverage.html.gz)
2017-06-02 20:42:19 -07:00
Kubernetes Submit Queue 284132ee88 Merge pull request #45251 from gyliu513/taint-typo
Automatic merge from submit-queue (batch tested with PRs 41563, 45251, 46265, 46462, 46721)

Toleration should be `notReady:NoExecute` in defaulttolerationseconds…

… test.



**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-06-02 19:53:38 -07:00
Clayton Coleman 536a1bcd3b
Allow initialization when no authorizer present
Running without an authorizer is a valid configuration.
2017-06-02 22:09:04 -04:00
Clayton Coleman 331eea67d8
Allow initialization of resources
Add support for creating resources that are not immediately visible to
naive clients, but must first be initialized by one or more privileged
cluster agents. These controllers can mark the object as initialized,
allowing others to see them.

Permission to override initialization defaults or modify an initializing
object is limited per resource to a virtual subresource "RESOURCE/initialize"
via RBAC.

Initialization is currently alpha.
2017-06-02 22:09:03 -04:00
Jing Xu 943fc53bf7 Add predicates check for local storage request
This PR adds the check for local storage request when admitting pods. If
the local storage request exceeds the available resource, pod will be
rejected.
2017-06-01 15:57:50 -07:00
Jing Xu dd67e96c01 Add local storage (scratch space) allocatable support
This PR adds the support for allocatable local storage (scratch space).
This feature is only for root file system which is shared by kubernetes
componenets, users' containers and/or images. User could use
--kube-reserved flag to reserve the storage for kube system components.
If the allocatable storage for user's pods is used up, some pods will be
evicted to free the storage resource.
2017-06-01 15:57:50 -07:00
Mike Danese f533bf729f allow sarapprover to create subject access reviews 2017-06-01 09:43:11 -07:00
n-marton a6a9fc12a9 Added node to persistent-volume-binder clusterrole 2017-06-01 13:07:52 +02:00
Daniel Smith c46e231fc7 generated changes 2017-05-31 16:38:47 -07:00
Daniel Smith d6e1140b5d Implement dynamic admission webhooks
Also fix a bug in rest client
2017-05-31 16:38:46 -07:00
Quintin Lee a38c2b4ce1 Add annotation for image policy webhook fail open. 2017-05-31 14:57:28 -07:00
Jeremy Whitlock f4403d262e add generated sources for webhook admission plugin 2017-05-31 11:41:11 -07:00
Jeremy Whitlock b26c19bc61 add generic webhook admission controller
As part of https://github.com/kubernetes/community/pull/132, thsi commit
adds a generic webhook admission controller.  This plugin allows for a
completely declarative approach for filtering/matching admission requests
and for matching admission requests, calls out to an external webhook for
handling admission requests.
2017-05-31 11:41:11 -07:00
deads2k 954eb3ceb9 move labels to components which own the APIs 2017-05-31 10:32:06 -04:00
Klaus Ma fd2575e43e Added unit test for node operation in schedulercache. 2017-05-31 21:26:04 +08:00
Kubernetes Submit Queue 0aad9d30e3 Merge pull request #44897 from msau42/local-storage-plugin
Automatic merge from submit-queue (batch tested with PRs 46076, 43879, 44897, 46556, 46654)

Local storage plugin

**What this PR does / why we need it**:
Volume plugin implementation for local persistent volumes.  Scheduler predicate will direct already-bound PVCs to the node that the local PV is at.  PVC binding still happens independently.

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

**Release note**:

```
Alpha feature: Local volume plugin allows local directories to be created and consumed as a Persistent Volume.  These volumes have node affinity and pods will only be scheduled to the node that the volume is at.
```
2017-05-30 23:20:02 -07:00
Jordan Liggitt fc8e915a4b
Add Node authorization mode based on graph of node-related objects 2017-05-30 16:53:03 -04:00
Jordan Liggitt fed30040c9
Make NodeRestriction admission require identifiable nodes 2017-05-30 15:15:23 -04:00
Jordan Liggitt d278a80a67
Separate system:node rules 2017-05-30 15:14:09 -04:00
Kubernetes Submit Queue 61693bf676 Merge pull request #46489 from xilabao/de-duplication-of-verb
Automatic merge from submit-queue (batch tested with PRs 46489, 46281, 46463, 46114, 43946)

De-duplication of verb in policy.go

**What this PR does / why we need it**:
https://github.com/kubernetes/kubernetes/blob/master/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go#L224 contains `get` verb. 

**Which issue this PR fixes**:

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-05-30 11:58:59 -07:00
Kubernetes Submit Queue 657c01c695 Merge pull request #44159 from wanghaoran1988/fix_43845
Automatic merge from submit-queue

Move hardPodAffinitySymmetricWeight to scheduler policy config

**What this PR does / why we need it**:
Move hardPodAffinitySymmetricWeight to scheduler policy config
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #43845 

**Special notes for your reviewer**:
If you like this, will add test later
**Release note**:
```
Move hardPodAffinitySymmetricWeight from KubeSchedulerConfiguration to scheduler Policy config
```
2017-05-30 10:15:48 -07:00
Kubernetes Submit Queue cb201802a1 Merge pull request #46459 from p0lyn0mial/move_admission_lifecycle_to_genericapi
Automatic merge from submit-queue (batch tested with PRs 46552, 46608, 46390, 46605, 46459)

Move admission lifecycle to genericapi

**What this PR does / why we need it**:  ends the whole sequence of moving some admission plugins to generic api.


**Release note**:

```release-note
NONE
```
2017-05-30 08:42:02 -07:00
Guangya Liu 9ae3107aab Highlight nodeSelector when checking nodeSelector for Pod. 2017-05-30 20:30:40 +08:00
p0lyn0mial 77eb2f3950 register all generic admission plugins when AdmissionOptions are created.
lifecycle plugin: make use of the libraries under k8s.io/client-go/pkg/api and k8s.io/client-go/kubernetes
for the client libraries instead of k8s.io/kubernetes/client/*

move registration to AdmissionOptions
2017-05-29 22:08:59 +02:00
Guangya Liu 33519192f2 Toleration should be `notReady:NoExecute` in defaulttolerationseconds test. 2017-05-28 11:31:12 +08:00
Klaus Ma 68a34c1baf Added k82cn as kube-scheduler approver. 2017-05-26 22:26:20 +08:00
Haoran Wang 31d2f452d2 move hardPodAffinitySymmetricWeight to scheduler policy config 2017-05-26 14:04:37 +08:00
xilabao 35acfdea89 De-duplication of verb 2017-05-26 13:16:38 +08:00
p0lyn0mial 1a5da9afc8 move namespace lifecycle plugin to apiserver 2017-05-25 20:32:43 +02:00
Timothy St. Clair 1fb55a567d Update RBAC policy for configmap locked leader leasing. 2017-05-24 16:32:12 -05:00
Kubernetes Submit Queue c1c7365e7c Merge pull request #46147 from nicksardo/gce-cluster-id
Automatic merge from submit-queue (batch tested with PRs 45891, 46147)

Watching ClusterId from within GCE cloud provider

**What this PR does / why we need it**:
Adds the ability for the GCE cloud provider to watch a config map for `clusterId` and `providerId`.

WIP - still needs more testing

cc @MrHohn @csbell @madhusudancs @thockin @bowei @nikhiljindal 

**Release note**:
```release-note
NONE
```
2017-05-24 00:42:58 -07:00
Kubernetes Submit Queue 95a6f108bd Merge pull request #46289 from p0lyn0mial/admission_plugins_remove_init_blocks
Automatic merge from submit-queue

remove init blocks from all admission plugins

**What this PR does / why we need it**:
removes init blocks from all admission plugins

**Release note**:

```release-note
NONE
```
2017-05-23 17:00:59 -07:00
Nick Sardo 729303f0de Watching ClusterId from within GCE cloud provider 2017-05-23 14:11:24 -07:00
p0lyn0mial c5019bf696 remove init blocks from all admission plugins 2017-05-23 22:00:32 +02:00
Kubernetes Submit Queue f8815c96e0 Merge pull request #46285 from yastij/scheduling-delete-todo
Automatic merge from submit-queue

removing generic_scheduler todo after discussion (#46027)

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

**Which issue this PR fixes** #46027 

**Special notes for your reviewer**: just a quick clean cc @wojtek-t 

**Release note**:
```release-note
```
2017-05-23 12:43:15 -07:00
Kubernetes Submit Queue 8e07e61a43 Merge pull request #46223 from smarterclayton/scheduler_max
Automatic merge from submit-queue (batch tested with PRs 45766, 46223)

Scheduler should use a shared informer, and fix broken watch behavior for cached watches

Can be used either from a true shared informer or a local shared
informer created just for the scheduler.

Fixes a bug in the cache watcher where we were returning the "current" object from a watch event, not the historic event.  This means that we broke behavior when introducing the watch cache.  This may have API implications for filtering watch consumers - but on the other hand, it prevents clients filtering from seeing objects outside of their watch correctly, which can lead to other subtle bugs.

```release-note
The behavior of some watch calls to the server when filtering on fields was incorrect.  If watching objects with a filter, when an update was made that no longer matched the filter a DELETE event was correctly sent.  However, the object that was returned by that delete was not the (correct) version before the update, but instead, the newer version.  That meant the new object was not matched by the filter.  This was a regression from behavior between cached watches on the server side and uncached watches, and thus broke downstream API clients.
```
2017-05-23 07:42:00 -07:00
Yassine TIJANI a348a4e881 removing this todo after discussion (#46027) 2017-05-23 13:34:14 +02:00
Kubernetes Submit Queue cc6e51c6e8 Merge pull request #45427 from ncdc/gc-shared-informers
Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062)

Use shared informers in gc controller if possible

Modify the garbage collector controller to try to use shared informers for resources, if possible, to reduce the number of unique reflectors listing and watching the same thing.

cc @kubernetes/sig-api-machinery-pr-reviews @caesarxuchao @deads2k @liggitt @sttts @smarterclayton @timothysc @soltysh @kargakis @kubernetes/rh-cluster-infra @derekwaynecarr @wojtek-t @gmarek
2017-05-22 20:58:03 -07:00
Michelle Au 61de4870de Scheduler predicate for already bound PVs with node affinity 2017-05-22 14:46:03 -07:00
Michelle Au dd46c7f88e Local volume plugin 2017-05-22 14:44:51 -07:00
Kubernetes Submit Queue 91adb3eacf Merge pull request #44906 from k82cn/moved_qos_to_v1helper
Automatic merge from submit-queue

Moved qos to api.helpers.

**What this PR does / why we need it**:
The `GetPodQoS` is also used by other components, e.g. kube-scheduler and it's not bound to kubelet; moved it to api helpers so client-go.

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

**Release note**:

```release-note-none
```
2017-05-22 13:30:06 -07:00
Clayton Coleman 8cd95c78c4
Scheduler should use a shared informer
Can be used either from a true shared informer or a local shared
informer created just for the scheduler.
2017-05-22 13:50:14 -04:00
Kubernetes Submit Queue 027c31e7dc Merge pull request #46048 from jayunit100/metrics-definitions
Automatic merge from submit-queue

Disambiguate schedule, assume, and bind in functions as well as in

Addresses my comments in #45972  about how these metrics need to be disambiguated.

- separates schedule, assume, and bind.
- renames variables like `dest` to be explicit.
- removes the logging statement to occur outside of the timed portion of the metric measurement.

Generally makes `sheduleOne` a happy function to read :)
2017-05-22 10:39:00 -07:00
Andy Goldstein 2480f2ceb6 Use shared informers in gc controller if possible 2017-05-22 12:51:37 -04:00
Wojciech Tyczynski d5227a3b2a Update bazel 2017-05-22 09:57:03 +02:00
Wojciech Tyczynski 8de8446840 Revert "Scheduler should use shared informer for pods"
This reverts commit 479f01d340.
2017-05-22 09:03:35 +02:00
Clayton Coleman ad720cc651
generated: bazel 2017-05-20 21:58:38 -04:00
Clayton Coleman 479f01d340
Scheduler should use shared informer for pods
Previously, the scheduler created two separate list watchers. This
changes the scheduler to be able to leverage a shared informer, whether
passed in externally or spawned using the new in place method. This
removes the last use of a "special" informer in the codebase.

Allows someone wrapping the scheduler to use a shared informer if they
have more information avaliable.
2017-05-20 14:19:49 -04:00
Clayton Coleman 3e095d12b4
Refactor move of client-go/util/clock to apimachinery 2017-05-20 14:19:48 -04:00
Clayton Coleman bb8c00583a
Update consumers of LRUExpireCache 2017-05-20 14:19:47 -04:00
Klaus Ma 83b7f77ee2 Moved qos to api.helpers. 2017-05-20 07:17:57 -04:00
Kubernetes Submit Queue 4f55f49035 Merge pull request #46042 from derekwaynecarr/quota-admission-registry
Automatic merge from submit-queue (batch tested with PRs 45346, 45903, 45958, 46042, 45975)

ResourceQuota admission control injects registry

**What this PR does / why we need it**:
The `ResourceQuota` admission controller works with a registry that maps a GroupKind to an Evaluator.  The registry used in the existing plug-in is not injectable, which makes usage of the ResourceQuota plug-in in other API server contexts difficult.  This PR updates the code to support late injection of the registry via a plug-in initializer.
2017-05-19 22:29:34 -07:00
Kubernetes Submit Queue 46a38b0e2f Merge pull request #45958 from k82cn/k8s_45925
Automatic merge from submit-queue (batch tested with PRs 45346, 45903, 45958, 46042, 45975)

Ignored mirror pods in PodPreset admission plugin

**What this PR does / why we need it**:
Ignored mirror pods in PodPreset admission plugin.

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

**Release note**:

```release-note
Ignored mirror pods in PodPreset admission plugin.
```
2017-05-19 22:29:33 -07:00
Kubernetes Submit Queue 65f5bff1df Merge pull request #46104 from liggitt/node-admission
Automatic merge from submit-queue (batch tested with PRs 46028, 46104)

Use name from node object on create

GetName() isn't populated in admission attributes on create unless the rest storage is a NamedCreator (which only specific subresources are today)

Fixes #46085
2017-05-19 10:58:07 -07:00
Jordan Liggitt a26897362b
Use name from node object on create 2017-05-19 10:37:14 -04:00
Kubernetes Submit Queue 03ccb4f084 Merge pull request #46051 from p0lyn0mial/admission_plugins_register_method
Automatic merge from submit-queue (batch tested with PRs 45313, 46051)

Change all the existing admission init blocks to call a Register function

**What this PR does / why we need it**:
this is a two stage refactor when done there will be no init block in admission plugins.
Instead all plugins expose Register function which accept admission.Plugins instance.
The registration to global plugin registry happens inside Register function

**Release note**:

```
NONE
```
2017-05-19 06:39:02 -07:00
jayunit100 ecb962e658 Separate aschedule, bind, and assume operations to make the metrics (and other things) easier to reason about. 2017-05-19 08:28:57 -04:00
Derek Carr a71bea312a ResourceQuota admission control injects registry 2017-05-18 23:17:13 -04:00
Jordan Liggitt 6fd36792f1
Add NodeRestriction admission plugin 2017-05-18 16:43:42 -04:00
p0lyn0mial 3f8d6e9210 Change all the existing admission init blocks to call a Register function
this is a two stage refactor when done there will be no init block in admission plugins.
Instead all plugins expose Register function which accept admission.Plugins instance.
The registration to global plugin registry happens inside Register func.
2017-05-18 22:25:01 +02:00
Klaus Ma 9862cdb4c5 Ignored mirror pods in PodPreset admission controller. 2017-05-17 21:43:17 +08:00
Christoph Blecker 4361a9146e
Update generated files 2017-05-17 00:59:52 -07:00
Kubernetes Submit Queue 7f92d35f1c Merge pull request #45739 from timothysc/cm_lock
Automatic merge from submit-queue (batch tested with PRs 45374, 44537, 45739, 44474, 45888)

Allow kcm and scheduler to lock on ConfigMaps.

**What this PR does / why we need it**:
Plumbs through the ability to lock on ConfigMaps through the kcm and scheduler.  

**Which issue this PR fixes** 
Fixes: #44857
Addresses issues with: #45415

**Special notes for your reviewer**:

**Release note**:

```
Add leader-election-resource-lock support to kcm and scheduler to allow for locking on ConfigMaps as well as Endpoints(default) 
```
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews @jamiehannaford @bsalamat @mikedanese
2017-05-16 18:10:57 -07:00
Kubernetes Submit Queue 7cd32aba17 Merge pull request #45775 from liggitt/mirror-pod-validation
Automatic merge from submit-queue (batch tested with PRs 44337, 45775, 45832, 45574, 45758)

Tighten validation of mirror pod annotations

Tightens validation for pods with a mirror pod annotation:
1. spec.nodeName must be set
2. makes the mirror pod annotation immutable
3. starts validating pod-specific annotations during pod status update

None of these changes affect usage of the mirror pod annotation by kubelets, which only set it on pod creation (verified this is true back to 1.5.x)

the second commit updates the pod validation tests to look for specific error messages (best reviewed ignoring whitespace changes)

This is the validation portion of https://github.com/kubernetes/community/blob/master/contributors/design-proposals/kubelet-authorizer.md and https://github.com/kubernetes/features/issues/279

```release-note
Mirror pods must now indicate the nodeName they are bound to on creation. The mirror pod annotation is now treated as immutable and cannot be added to an existing pod, removed from a pod, or modified.
```
2017-05-15 18:39:13 -07:00
Kubernetes Submit Queue 5563951887 Merge pull request #45830 from timothysc/sched_reviewers
Automatic merge from submit-queue

Update scheduler reviewers

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

Update Scheduler OWNERS to more accurately reflect reality.  

**Special notes for your reviewer**:

Are there others to add here?  

**Release note**:

```
NONE
```

/cc @kubernetes/sig-scheduling-pr-reviews
2017-05-15 15:58:05 -07:00
Kubernetes Submit Queue 3cede38922 Merge pull request #45591 from JonPulsifer/webhook-typo
Automatic merge from submit-queue (batch tested with PRs 41331, 45591, 45600, 45176, 45658)

Fixing typo in ImagePolicyWebhook admission.go

**What this PR does / why we need it**:
Noticed a typo in kubectl events when working with the ImagePolicyWebhook admission controller 

**Special notes for your reviewer**:
first time contributor
2017-05-15 13:25:44 -07:00
Timothy St. Clair 765281f5f1 Update scheduler reviewers 2017-05-15 12:48:22 -05:00
Derek Carr c20a33c5bd OwnerReferencesPermissionEnforcement ignores pods/status 2017-05-15 12:21:23 -04:00
Timothy St. Clair 1173c84ad9 Update to plumb through configurable locking on different resource types. 2017-05-15 10:01:46 -05:00
Jordan Liggitt cd3a1187a1
Require nodeName for mirror pods, make mirror pod annotation immutable 2017-05-13 22:34:41 -04:00
Jonathan Pulsifer fd7a32d670
imagepolicy admission.go: typo fix 2017-05-10 09:08:14 -04:00
Klaus Ma c78faec4ff Initialize scheduler cache with assigned non-terminated pods before scheduling. 2017-05-10 01:50:38 +08:00
Kubernetes Submit Queue d13c42d339 Merge pull request #45472 from k82cn/rm_unused_func
Automatic merge from submit-queue (batch tested with PRs 41903, 45311, 45474, 45472, 45501)

Removed old scheduler constructor.

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

**Release note**:

```release-note-none
```
2017-05-08 15:46:41 -07:00
Kubernetes Submit Queue a3cf8b95da Merge pull request #45122 from ravisantoshgudimetla/priority_overflow#24720
Automatic merge from submit-queue (batch tested with PRs 44727, 45409, 44968, 45122, 45493)

Total priority overflow check

**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 #24720

**Special notes for your reviewer**:
@adohe. I have borrowed some parts of your code in the closed PR and created this one.

**Release note**:

```release-note
This fixes the overflow for priorityconfig-  valid range {1, 9223372036854775806}.
```
2017-05-08 14:54:40 -07:00
Klaus Ma 63d194b626 Removed old scheduler constructor. 2017-05-08 11:09:25 -04:00
ravisantoshgudimetla 7ae3136f5d Total priority buffer overflow check 2017-05-07 16:42:32 -04:00
Jamie Hannaford 9440a68744 Use dedicated Unix User and Group ID types 2017-05-05 14:07:38 +02:00
Chao Xu 47b410f58b Remove redundent GetObjectKind() defined on top-level types
TypeMeta is embedded in all these types and TypeMeta has GetObjectKind()
method to implement the runtime.Object interface.
2017-05-04 10:31:58 -07:00
Kubernetes Submit Queue 30cbdc01e5 Merge pull request #45152 from k82cn/ut_4_45098
Automatic merge from submit-queue (batch tested with PRs 45100, 45152, 42513, 44796, 45222)

Added InterPodAffinity unit test case with Namespace.

**What this PR does / why we need it**:
Added InterPodAffinity unit test case with Namespace: unit test case for #45098

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

**Release note**:

```release-note-none
```
2017-05-02 10:35:07 -07:00
Kubernetes Submit Queue 05fafe1525 Merge pull request #45091 from k82cn/update_weight_check
Automatic merge from submit-queue

Align Extender's validation with prioritizers.

**What this PR does / why we need it**:
Align Extender's validation with prioritizers.

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

**Release note**:

```release-note-none
```
2017-04-30 14:49:50 -07:00
Klaus Ma 91bd30dde2 Added InterPodAffinity unit test case with Namespace. 2017-04-30 12:18:03 +08:00
Kubernetes Submit Queue ef4b4acf1e Merge pull request #45098 from wojtek-t/fix_scheduler_pod_affinity
Automatic merge from submit-queue

Fixes and minor cleanups to pod (anti)affinity predicate
2017-04-28 23:24:09 -07:00
Kubernetes Submit Queue dc5744b6a1 Merge pull request #45112 from liggitt/quote-log-message
Automatic merge from submit-queue

Quote groups in deny log message

Helps distinguish cases where an external authenticator is incorrectly combining multiple groups into one.

Before:
> RBAC DENY: user "bob" groups [system:masters view system:authenticated] cannot "list" resource "pods" cluster-wide

After:
> RBAC DENY: user "bob" groups ["system:masters view" "system:authenticated"] cannot "list" resource "pods" cluster-wide
2017-04-28 19:18:22 -07:00
Kubernetes Submit Queue 88ad8b9cb9 Merge pull request #41985 from ericchiang/bootstrap-token-auth-logging
Automatic merge from submit-queue (batch tested with PRs 41530, 44814, 43620, 41985)

kube-apiserver: improve bootstrap token authentication error messages

This was requested by @jbeda as a follow up to https://github.com/kubernetes/kubernetes/pull/41281.

cc @jbeda @luxas @kubernetes/sig-auth-pr-reviews
2017-04-28 10:03:41 -07:00
Kubernetes Submit Queue 58aebcd61b Merge pull request #44814 from weizhanxu/controllerRef_no_Need_Check_nil_again
Automatic merge from submit-queue (batch tested with PRs 41530, 44814, 43620, 41985)

no need check is nil, because has checked before

**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-04-28 10:03:35 -07:00
Jordan Liggitt e87bce1f8a
Quote groups in deny log message 2017-04-28 12:40:38 -04:00
Kubernetes Submit Queue 021f542f24 Merge pull request #42432 from shaynewang/test_types
Automatic merge from submit-queue

Improved code coverage for plugin/pkg/scheduler/algorithm

**What this PR does / why we need it**:
Part of #39559 , code coverage improved from 0% to 100%
**Special notes for your reviewer**:
Improved coverage for scheduler/algorithm to 100%
Test cover output:
```
make test WHAT=./plugin/pkg/scheduler/algorithm KUBE_COVER=y
Running tests for APIVersion: v1,apps/v1beta1,authentication.k8s.io/v1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1,authorization.k8s.io/v1beta1,autoscaling/v1,autoscaling/v2alpha1,batch/v1,batch/v2alpha1,certificates.k8s.io/v1beta1,extensions/v1beta1,imagepolicy.k8s.io/v1alpha1,policy/v1beta1,rbac.authorization.k8s.io/v1beta1,rbac.authorization.k8s.io/v1alpha1,storage.k8s.io/v1beta1,federation/v1beta1
+++ [0302 10:43:05] Saving coverage output in '/tmp/k8s_coverage/v1,apps/v1beta1,authentication.k8s.io/v1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1,authorization.k8s.io/v1beta1,autoscaling/v1,autoscaling/v2alpha1,batch/v1,batch/v2alpha1,certificates.k8s.io/v1beta1,extensions/v1beta1,imagepolicy.k8s.io/v1alpha1,policy/v1beta1,rbac.authorization.k8s.io/v1beta1,rbac.authorization.k8s.io/v1alpha1,storage.k8s.io/v1beta1,federation/v1beta1/20170302-104305'
skipped	k8s.io/kubernetes/cmd/libs/go2idl/generator
skipped	k8s.io/kubernetes/vendor/k8s.io/client-go/1.4/rest
ok  	k8s.io/kubernetes/plugin/pkg/scheduler/algorithm	0.061s	coverage: 100.0% of statements
+++ [0302 10:43:07] Combined coverage report: /tmp/k8s_coverage/v1,apps/v1beta1,authentication.k8s.io/v1,authentication.k8s.io/v1beta1,authorization.k8s.io/v1,authorization.k8s.io/v1beta1,autoscaling/v1,autoscaling/v2alpha1,batch/v1,batch/v2alpha1,certificates.k8s.io/v1beta1,extensions/v1beta1,imagepolicy.k8s.io/v1alpha1,policy/v1beta1,rbac.authorization.k8s.io/v1beta1,rbac.authorization.k8s.io/v1alpha1,storage.k8s.io/v1beta1,federation/v1beta1/20170302-104305/combined-coverage.html
```
2017-04-28 08:21:32 -07:00
Wojciech Tyczynski 15c492bb2e Fixes and minor cleanups to pod (anti)affinity predicate 2017-04-28 13:22:07 +02:00
Klaus Ma 64a7bdf641 Align Extender's validation with prioritizers. 2017-04-28 17:55:25 +08:00
Kubernetes Submit Queue b2d714a7ca Merge pull request #44888 from caesarxuchao/clean-deepcopy-init
Automatic merge from submit-queue

Prepare for move zz_generated_deepcopy.go to k8s.io/api

This is in preparation to move deep copies to with the types to the types repo (see https://github.com/kubernetes/gengo/pull/47#issuecomment-296855818). The init() function is referring the `SchemeBuilder` defined in the register.go in the same packge, so we need to revert the dependency.

This PR depends on https://github.com/kubernetes/gengo/pull/49, otherwise verification will fail.
2017-04-27 18:48:28 -07:00
Chao Xu d0b94538b9 make it possible to move SchemeBuilder with zz_generated.deepcopy.go 2017-04-27 16:57:29 -07:00
Kubernetes Submit Queue 14a557b1a2 Merge pull request #44346 from mikedanese/build-static
Automatic merge from submit-queue (batch tested with PRs 41106, 44346, 44929, 44979, 45027)

bazel: statically link dockerized components
2017-04-27 12:11:00 -07:00
Shayne Wang a5d86270d3 added coverage for scheduler/algorithm/types_test.go 2017-04-26 23:55:22 -07:00