Commit Graph

1870 Commits (c10cc3decdd25717eaca5fccfd7cfebb3e09e5ec)

Author SHA1 Message Date
Kubernetes Submit Queue 2f1ea7efcf Merge pull request #47515 from zhangxiaoyu-zidif/replace-scheduler-havesame
Automatic merge from submit-queue (batch tested with PRs 47043, 48448, 47515, 48446)

Refactor slice intersection

**What this PR does / why we need it**:
In worst case, the original method is O(N^2), while current method is 3 * O(N).
I think it is better.

**Release note**:

```release-note
NONE
```
2017-07-04 09:12:26 -07:00
Kubernetes Submit Queue 3bfcd74ace Merge pull request #46926 from k82cn/k8s_46924
Automatic merge from submit-queue (batch tested with PRs 46926, 48468)

Added helper funcs to schedulercache.Resource.

**What this PR does / why we need it**:
Avoid duplicated code slice by helper funcs.

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

**Release note**:

```release-note-none
```
2017-07-04 06:56:22 -07:00
Kubernetes Submit Queue eb2a560679 Merge pull request #48189 from mikedanese/fixds
Automatic merge from submit-queue

support NoSchedule taints correctly in DaemonSet controller

Fixes https://github.com/kubernetes/kubernetes/issues/48190
```release-note
Support NoSchedule taints correctly in DaemonSet controller.
```
cc @kubernetes/sig-apps-pr-reviews
2017-07-03 08:46:32 -07:00
Faraaz Khan 7b6727f7f7 allow heapster clusterrole to see deployments 2017-06-30 19:17:01 +00:00
Mike Danese 8e6c2ea4d0 support NoExecute and NoSchedule taints correctly in DaemonSet controller
And add some unit tests.
2017-06-29 10:16:36 +02:00
Guangya Liu e0d02f140e Used const variable in scheduler test. 2017-06-29 11:07:47 +08:00
Guangya Liu aaac9228a2 godoc update for scheduler predicates. 2017-06-26 17:00:56 +08:00
Kubernetes Submit Queue 53a66020e4 Merge pull request #47225 from NickrenREN/fix-operation
Automatic merge from submit-queue

Fix mismatched types Verbose and bool

Fix invalid operation: mismatched types Verbose and bool


**Release note**:
```release-note
NONE
```
2017-06-25 19:00:25 -07:00
Kubernetes Submit Queue c885c70c9b Merge pull request #47566 from zhangxiaoyu-zidif/cleanup-add-comment-for-scheduler-predicates
Automatic merge from submit-queue

Cleanup predicates.go

**What this PR does / why we need it**:
cleanup some comments and errors.New().

**Special notes for your reviewer**:
/cc @jayunit100
 
**Release note**:

```release-note
NONE
```
2017-06-25 17:59:29 -07:00
Kubernetes Submit Queue beb5b9dd4d Merge pull request #47869 from timothysc/affinity_cleanup
Automatic merge from submit-queue

Removes alpha feature gate for affinity annotations.  

**What this PR does / why we need it**:
In 1.5 we added a backstop to support alpha affinity annotations.  This PR removes that support in favor of the Beta fields per discussions.  

It also serves as a precursor to some of the component config work that @ncdc has done around @mikedanese design proposal.  

xref: https://github.com/kubernetes/kubernetes/pull/41617 

**Special notes for your reviewer**:

**Release note**:

```
Removes alpha feature gate for pod affinity annotations.  
```

/cc @kubernetes/sig-scheduling-pr-reviews @kubernetes/sig-cluster-lifecycle-misc
2017-06-24 06:11:42 -07:00
Kubernetes Submit Queue 171f48af7b Merge pull request #47179 from ddysher/local-isolation-fix
Automatic merge from submit-queue (batch tested with PRs 47883, 47179, 46966, 47982, 47945)

Fix local isolation for pod requesting only overlay or scratch

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

Fix overlay resource predicates for pod with only overlay or scratch storage request.

E.g. the following pod can pass predicate even if overlay is only 512Gi.
```yaml
apiVersion: v1
kind: Pod
metadata:
  name: pod
spec:
  containers:
  - name: nginx
    image: nginx
    resources:
      requests:
        storage.kubernetes.io/overlay: 1024Gi
```

similarly, following pod will also pass predicate
```yaml
apiVersion: v1
kind: Pod
metadata:
  name: pod
spec:
  containers:
  - name: nginx
    image: nginx
    volumeMounts:
    - name: data
      mountPath: /data
  volumes:
  - name: data
    emptyDir:
      sizeLimit: 1024Gi
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes/kubernetes/issues/47798

**Special notes for your reviewer**:

**Release note**:

```release-note
```

@jingxu97 @vishh @dashpole
2017-06-23 15:48:38 -07:00
Timothy St. Clair 4aea626944 Removes alpha feature gate for affinity annotations. Beta fields should be used. 2017-06-23 10:02:14 -05:00
Klaus Ma 47a62e90f7 Added helper funcs to schedulercache.Resource. 2017-06-23 17:15:18 +08:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Chao Xu e185f7e277 run hack/update-codegen.sh 2017-06-22 11:30:58 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
mbohlool 70c4fe7f4f update generated files 2017-06-21 04:09:08 -07:00
mbohlool c91a12d205 Remove all references to types.UnixUserID and types.UnixGroupID 2017-06-21 04:09:07 -07:00
zhangxiaoyu-zidif 423b7b2c17 fix-review 2017-06-15 16:09:18 +08:00
Chao Xu fa88d08172 remove retry logic in initializer AC configuration loader 2017-06-14 20:12:41 -07:00
Kubernetes Submit Queue 2939837923 Merge pull request #46808 from caesarxuchao/make-daniels-pr-dynamic
Automatic merge from submit-queue (batch tested with PRs 47204, 46808, 47432, 47400, 47099)

Make the generic webhook admission controller use the dynamic webhook config manager

Based on #46672 and #46388.

Only the last commit is unique.

* removed `SetWebhookSource` from the PluginInitializer
* implemented `SetExternalClientset` for the generic webhook admisson controller, initializing an ExternalWebhookConfigurationManager in the method.
2017-06-14 17:13:56 -07:00
Chao Xu 8dbeee50c7 generated 2017-06-14 10:20:33 -07:00
Chao Xu fb06bd823a make webhook ac use the configuration manager 2017-06-14 10:20:06 -07:00
zhangxiaoyu-zidif 22e4abafae Refactor slice intersection 2017-06-14 20:57:48 +08:00
Kubernetes Submit Queue df1e289888 Merge pull request #47004 from ixdy/bazel-stamp-multiple-packages
Automatic merge from submit-queue

bazel: stamp multiple packages by using x_defs instead of linkstamp in go_binary rules

**What this PR does / why we need it**: Fixes regression introduced sometime in the last few months that prevented bazel-built clusters from identifying version properly. 

It does so by updating the bazelbuild/rules_go and kubernetes/repo-infra dependencies to support using stamp values in `go_binary` `x_defs`, and then changing our `go_binary` rules to use `x_defs` instead of `linkstamp`.

This whole charade is necessary because we need to stamp version information in multiple packages.

This pretty much only affects the bazel build, so it should be low risk.

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

**Special notes for your reviewer**: depends on https://github.com/kubernetes/repo-infra/pull/18; should not be merged before it.

**Release note**:

```release-note
NONE
```

/assign @spxtr @mikedanese
2017-06-11 00:33:13 -07:00
Deyuan Deng 3cecb070ca Fix local isolation for pod requesting only scratch 2017-06-10 09:52:46 +08:00
Simon Croome 5e2503e71f Add StorageOS volume plugin 2017-06-09 13:19:27 +01:00
NickrenREN 1766af6068 Fix mismatched types Verbose and bool
Fix invalid operation: mismatched types Verbose and bool
2017-06-09 14:07:28 +08:00
Kubernetes Submit Queue 9f23149a52 Merge pull request #44965 from jpeeler/podpreset-exclusion-simple
Automatic merge from submit-queue

Allow pods to opt out of PodPreset mutation via an annotation on the pod

An annotation in the pod spec of the form:
podpreset.admission.kubernetes.io/PodPresetOptOut: "true"
Will cause the admission controller to skip manipulating the pod spec,
no matter the labelling.

This is an alternative implementation to pull #44163.

```release-note
Allow pods to opt out of PodPreset mutation via an annotation on the pod.
```
2017-06-08 22:57:34 -07:00
Jeff Grafton 64bd79fad7 Convert go_binary linkstamp to x_defs 2017-06-08 14:59:55 -07:00
Deyuan Deng 761e079ed1 Fix local isolation for pod requesting only overlay 2017-06-08 21:23:47 +08:00
Kubernetes Submit Queue 914f5d659e Merge pull request #47003 from aveshagarwal/master-scheduler-aggregate-errors-issue
Automatic merge from submit-queue (batch tested with PRs 45877, 46846, 46630, 46087, 47003)

Remove duplicate errors from an aggregate error input.

This PR, in general, removes duplicate errors from an aggregate error input, and returns unique errors with their occurrence count. Specifically,  this PR helps with some scheduler errors that fill the log enormously. For example, see the following `truncated` output from a 300-plus nodes cluster, as there was a same error from almost all nodes.


[SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected., SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found.........

After this PR, the output looks like (on a 2-node cluster):

SchedulerPredicates failed due to persistentvolumeclaims "mongodb" not found, which is unexpected.(Count=2)

@derekwaynecarr @smarterclayton @kubernetes/sig-scheduling-pr-reviews 

Fixes https://github.com/kubernetes/kubernetes/issues/47145
2017-06-07 17:55:52 -07:00
Avesh Agarwal 667ed4ef51 Remove duplicate errors from an aggregate error input.
Helps with some scheduler errors that fill the log enormously.
2017-06-07 15:33:43 -04:00
Kubernetes Submit Queue 0613ae5077 Merge pull request #46669 from kow3ns/statefulset-update
Automatic merge from submit-queue (batch tested with PRs 46235, 44786, 46833, 46756, 46669)

implements StatefulSet update

**What this PR does / why we need it**:
1. Implements rolling update for StatefulSets
2. Implements controller history for StatefulSets.
3. Makes StatefulSet status reporting consistent with DaemonSet and ReplicaSet.

https://github.com/kubernetes/features/issues/188

**Special notes for your reviewer**:

**Release note**:
```release-note
Implements rolling update for StatefulSets. Updates can be performed using the RollingUpdate, Paritioned, or OnDelete strategies. OnDelete implements the manual behavior from 1.6. status now tracks 
replicas, readyReplicas, currentReplicas, and updatedReplicas. The semantics of replicas is now consistent with DaemonSet and ReplicaSet, and readyReplicas has the semantics that replicas did prior to this release.
```
2017-06-07 00:27:53 -07:00
Kubernetes Submit Queue 3fae07c52e Merge pull request #44115 from derekwaynecarr/reduce-logging-severity
Automatic merge from submit-queue (batch tested with PRs 47083, 44115, 46881, 47082, 46577)

Scheduler should not log an error when there is no fit

**What this PR does / why we need it**:
The scheduler should not log an error when it is unable to find a fit for a pod as it's an expected situation when resources are unavailable on the cluster that satisfy the pods requirements.
2017-06-06 18:48:14 -07:00
Kenneth Owens 1b55f57391 Implements StatefulSet update
Implements history utilities for ControllerRevision in the controller/history package
StatefulSetStatus now has additional fields for consistency with DaemonSet and Deployment
StatefulSetStatus.Replicas now represents the current number of createdPods and StatefulSetStatus.ReadyReplicas is the current number of ready Pods
2017-06-06 12:00:28 -07:00
Kubernetes Submit Queue 4a01f44b73 Merge pull request #46988 from p0lyn0mial/rename_some_admission_pkg
Automatic merge from submit-queue (batch tested with PRs 46718, 46828, 46988)

Simply changed the names of packages of some admission plugins.

**What this PR does / why we need it**:
This PR simply changes the names of packages of some admission plugins so that they are not in conflict with admission pkg.

**Release note**:

```release-note
NONE
```
2017-06-06 11:43:20 -07:00
Kubernetes Submit Queue 3fe8df763a Merge pull request #46621 from gyliu513/NodeSelectorMatches
Automatic merge from submit-queue (batch tested with PRs 46787, 46876, 46621, 46907, 46819)

Highlight nodeSelector when checking nodeSelector for Pod.

**What this PR does / why we need it**:
Currently, we are using function name as `PodSelectorMatches` to check if `nodeSelector` matches for a Pod, it is better update the function name a bit to reflect it is checking `nodeSelector` for a Pod.

The proposal is rename `PodSelectorMatches` as `PodMatchNodeSelector`.

**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
NONE
```
2017-06-06 02:21:44 -07:00
Kubernetes Submit Queue a552ee61a0 Merge pull request #46672 from smarterclayton/initializer_with_config
Automatic merge from submit-queue (batch tested with PRs 46967, 46992, 43338, 46717, 46672)

Select initializers from the dynamic configuration

Continues #36721

kubernetes/features#209
2017-06-05 20:27:50 -07:00
Kubernetes Submit Queue 356d4e8ce2 Merge pull request #44883 from ravigadde/bind-1.7
Automatic merge from submit-queue (batch tested with PRs 44883, 46836, 46765, 46683, 46050)

Added Bind method to Scheduler Extender

- only one extender can support the bind method
- if an extender supports bind, scheduler delegates the pod binding to the extender



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

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-06-05 18:43:06 -07:00
Kubernetes Submit Queue c8c4fff8be Merge pull request #46972 from liggitt/node-pod-delete-cache-miss
Automatic merge from submit-queue

Check live pod on cache miss before forbidding node deletion

Fixes #46971 flake
2017-06-05 17:43:04 -07:00
Clayton Coleman 772ab8e1b4
Load initializers from dynamic config
Handle failure cases on startup gracefully to avoid causing cascading
errors and poor initialization in other components. Initial errors from
config load cause the initializer to pause and hold requests. Return
typed errors to better communicate failures to clients.

Add code to handle two specific cases - admin wants to bypass
initialization defaulting, and mirror pods (which want to bypass
initialization because the kubelet owns their lifecycle).
2017-06-05 19:12:41 -04:00
p0lyn0mial d0e89577db Simply changed the names of packages of some admission plugins. 2017-06-05 22:23:42 +02:00
Ravi Gadde 7f179bf936 Added Bind method to Scheduler Extender
- only one extender can support the bind method
- if an extender supports bind, scheduler delegates the pod binding to the extender
2017-06-05 09:44:53 -07:00
Jordan Liggitt 2106a2bbe5
Check live pod on cache miss before forbidding node deletion 2017-06-05 12:09:15 -04:00
Jeff Peeler 08a59530e1 Allow pods to opt out of PodPreset mutation
An annotation in the pod spec of the form:
podpreset.admission.kubernetes.io/exclude: "true"
Will cause the admission controller to skip manipulating the pod spec,
no matter the labelling.

The annotation for a podpreset acting on a pod has also been slightly
modified to contain a podpreset prefix:
podpreset.admission.kubernetes.io/podpreset-{name} = resource version

Fixes #44161
2017-06-05 11:56:30 -04:00
Kubernetes Submit Queue 0cff839317 Merge pull request #46771 from n-marton/46770-permission-for-volume-binder
Automatic merge from submit-queue (batch tested with PRs 46734, 46810, 46759, 46259, 46771)

Added node to persistent-volume-binder clusterrole

**What this PR does / why we need it**: Added missing permission to volume-binder clusterrole

**Which issue this PR fixes**: fixes #46770

**Special notes for your reviewer**: Non

**Release note**: Non
2017-06-05 06:51:32 -07:00
Kubernetes Submit Queue 09702160b0 Merge pull request #46264 from Q-Lee/annotate
Automatic merge from submit-queue (batch tested with PRs 46681, 46786, 46264, 46680, 46805)

Add annotation for image policy webhook fail open.

**What this PR does / why we need it**: there's no good way to audit log if binary verification fails open. Adding an annotation can solve that, and provide a useful tool to audit [non-malicious] containers.

**Release note**: add the annotation "alpha.image-policy.k8s.io/failed-open=true" to pods created when the image policy webhook fails open.

```release-note
Add the `alpha.image-policy.k8s.io/failed-open=true` annotation when the image policy webhook encounters an error and fails open.
```
2017-06-03 21:16:43 -07:00