Commit Graph

2477 Commits (237007b6159ebebaa29cb576591180e0ae569842)

Author SHA1 Message Date
Kubernetes Submit Queue 6ba46963f8
Merge pull request #59391 from msau42/topology-beta
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move volume scheduling and local storage to beta

**What this PR does / why we need it**:
* Move the feature gates and APIs for volume scheduling and local storage to beta
* Update tests to use the beta fields
@kubernetes/sig-storage-pr-reviews 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
ACTION REQUIRED: VolumeScheduling and LocalPersistentVolume features are beta and enabled by default.  The PersistentVolume NodeAffinity alpha annotation is deprecated and will be removed in a future release.
```
2018-02-20 13:26:07 -08:00
Michelle Au dc1e871828 Add new volume-scheduler cluster role to scheduler 2018-02-16 17:54:10 -08:00
Jeff Grafton ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
wackxu 9342eff20d rename func ValidatePodSecurityContext to ValidatePod 2018-02-14 10:55:50 +08:00
Kubernetes Submit Queue 317853c90c
Merge pull request #59464 from dixudx/fix_all_typos
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix all the typos across the project

**What this PR does / why we need it**:
There are lots of typos across the project. We should avoid small PRs on fixing those annoying typos, which is time-consuming and low efficient.

This PR does fix all the typos across the project currently. And with #59463, typos could be avoided when a new PR gets merged.

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

**Special notes for your reviewer**:
/sig testing
/area test-infra
/sig release
/cc @ixdy 
/assign @fejta 

**Release note**:

```release-note
None
```
2018-02-10 22:12:45 -08:00
Di Xu 48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Bobby (Babak) Salamat 6bad08ab0c Moved validation to the API side 2018-02-07 17:46:57 -08:00
Bobby (Babak) Salamat 1016d2d16a Disallow PriorityClass names with 'system-' prefix for user defined priority classes 2018-02-07 11:19:46 -08:00
Kubernetes Submit Queue c17b418f89
Merge pull request #59454 from tanshanshan/fix-small
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

simplify if logic

**What this PR does / why we need it**:
simplify if logic ,make it more clear
Thanks.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:


**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-02-07 06:26:02 -08:00
tanshanshan 76471eef36 simplify the if logic 2018-02-07 11:04:33 +08:00
Mike Danese e3c5a73f02 certs: allow cert controller to delete csrs
This should have been changed as part of #51840.
2018-02-05 14:24:42 -08:00
Kubernetes Submit Queue ffda1e2200
Merge pull request #57017 from andyzhangx/azurefile-growsize
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add PV size grow feature for azure file

**What this PR does / why we need it**:
According to kubernetes/features#284, add size grow feature for azure file

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

**Special notes for your reviewer**:
Since azure file is using SMB 3.0 protocal, there is no necessary to resize filesystem on agent side, the agent node will detect the changed size automatically.

**Release note**:

```
add size grow feature for azure file
```
/sig azure
@gnufied @rootfs @brendandburns
2018-02-05 11:25:48 -08:00
Kubernetes Submit Queue d3b783d5ec
Merge pull request #58743 from NickrenREN/pv-protection
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Postpone PV deletion with finalizer when it is being used

Postpone PV deletion if it is bound to a PVC

xref: https://github.com/kubernetes/community/pull/1608


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

**Special notes for your reviewer**:

**Release note**:
```release-note
Postpone PV deletion when it is being bound to a PVC
```

WIP, assign to myself first

/assign @NickrenREN
2018-02-01 19:39:52 -08:00
NickrenREN 4b6a3439a3 Add policy for pv protection controller 2018-01-31 20:19:09 +08:00
NickrenREN cbfa0cc85a reuse PVC protection admission plugin for PV protection 2018-01-31 20:02:01 +08:00
NickrenREN 2a2f88b939 Rename PVCProtection feature gate so that PV protection can share the feature gate with PVC protection 2018-01-31 20:02:01 +08:00
NickrenREN 7b9d2c046f Use v1beta1 VolumeAttachment 2018-01-31 18:46:11 +08:00
andyzhangx fc988d429b initial work for azure file grow size implementation
enable azure file grow size

fix according to comments

fix comments

fix review comments

fix comments
2018-01-30 13:36:29 +00:00
Kubernetes Submit Queue 462d9f223e
Merge pull request #58485 from k82cn/k8s_58471
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Updated priority of mirror pod by PriorityClass.

Signed-off-by: Da K. Ma <madaxa@cn.ibm.com>

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

**Release note**:
```release-note
Updated priority of mirror pod according to PriorityClassName.
```
2018-01-26 12:23:00 -08:00
Kubernetes Submit Queue 26c1a3a8ee
Merge pull request #58595 from CaoShuFeng/LimitPodHardAntiAffinityTopology
Automatic merge from submit-queue (batch tested with PRs 58595, 58689). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix invalid admission name LimitPodHardAntiAffinityTopology

@hzxuzhonghu 
@sttts 

**Release note**:

```release-note
NONE
```
2018-01-23 09:18:30 -08:00
Kubernetes Submit Queue 2b0c7e2372
Merge pull request #57149 from deads2k/rebase-02-quota
Automatic merge from submit-queue (batch tested with PRs 58144, 57149). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

make quota reusable

Quota is logically a re-useable component so that replenishment and admission can be done in constituent servers.  This makes it possible to embed.  More cleanup is probably required, but this is the minimum.
2018-01-22 19:02:29 -08:00
Cao Shufeng 2a15776b41 fix invalid admission name LimitPodHardAntiAffinityTopology 2018-01-23 10:28:30 +08:00
Da K. Ma a7c62eec8f Updated priority of mirror pod by PriorityClass.
Signed-off-by: Da K. Ma <madaxa@cn.ibm.com>
2018-01-22 10:30:23 +08:00
Jordan Liggitt b4fb25261e
return reason for allowed rbac authorizations
includes the binding, role, and subject that allowed a request so audit can make use of it
2018-01-19 14:32:39 -05:00
hzxuzhonghu 5c9e020d7d run update bazel 2018-01-19 13:18:27 +08:00
hzxuzhonghu 7c5f9e0bba refactor admission flag: add two admission flags and make plugins auto in recommended order 2018-01-19 13:16:36 +08:00
Kubernetes Submit Queue 621f3f3c0a
Merge pull request #58360 from liggitt/csi-node-authorizer
Automatic merge from submit-queue (batch tested with PRs 58488, 58360). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add get volumeattachment to the node authorizer

Fixes #58355

Adds `get volumeattachment` authorization for nodes to the node authorizer when the CSI feature is enabled

```release-note
NONE
```
2018-01-18 20:55:34 -08:00
Kubernetes Submit Queue 48f69ac964
Merge pull request #55595 from guangxuli/move_token_constant_and_helper
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add generic Bootstrap Token constants and helpers to client-go

**What this PR does / why we need it**:
per https://github.com/kubernetes/client-go/issues/114

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

fix  https://github.com/kubernetes/client-go/issues/114

**Special notes for your reviewer**:

**Release note**:

```release-note
none
```
2018-01-17 10:22:25 -08:00
Gavin f653d02b05 create auto-gen files 2018-01-17 16:23:03 +08:00
Gavin bb5e156aba Add generic Bootstrap Token constants and helpers to client-go 2018-01-17 16:22:37 +08:00
Jordan Liggitt ecfd18e2a6
Add get volumeattachments support to Node authorizer 2018-01-17 00:00:18 -05:00
Cao Shufeng 4e7398b67b remove duplicated import 2018-01-17 09:34:59 +08:00
Dr. Stefan Schimanski 1a552bbe14 admission: do not leak admission config types outside of the plugins 2018-01-15 14:37:41 +01:00
Jonathan Basseri 85c5862552 Fix scheduler refs in BUILD files.
Update references to moved scheduler code.
2018-01-05 15:05:01 -08:00
Jonathan Basseri 30b89d830b Move scheduler code out of plugin directory.
This moves plugin/pkg/scheduler to pkg/scheduler and
plugin/cmd/kube-scheduler to cmd/kube-scheduler.

Bulk of the work was done with gomvpkg, except for kube-scheduler main
package.
2018-01-05 15:05:01 -08:00
Kubernetes Submit Queue e991a94d2d
Merge pull request #54983 from chentao1596/admission-priorityclass-error-check
Automatic merge from submit-queue (batch tested with PRs 57021, 56843, 54983). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 Optimizing the implementation of the error check for PriorityClass

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

When i create pod(on the bottom) with not exist PriorityClass, the output will be shown as follow:
```
# kubectl apply -f priorityclassname-pod.yaml 
Error from server: error when creating "priorityclassname-pod.yaml": failed to get default priority class not-exist-priorityclassname: priorityclass.scheduling.k8s.io "not-exist-priorityclassname" not found
```

In my eyes, "get default priority class" is not the correct description, so i changed it. The new output will be shown like this:
```
# kubectl apply -f priorityclassname-pod.yaml 
Error from server (NotFound): error when creating "priorityclassname-pod.yaml": priorityclass.scheduling.k8s.io "not-exist-priorityclassname" not found
```

In addition, the 'pc' will never be nil when err is nil, i think this check is not neccessary, so i removed it.

thank you!

Pod template:
```
apiVersion: v1
kind: Pod
metadata:
  name: priorityclassname-pod           
  labels:
    env: priorityclassname-pod    
spec:
  containers:
  - name: was
    image: gcr.io/google_containers/busybox:v1.0
    imagePullPolicy: IfNotPresent
  priorityClassName: not-exist-priorityclassname
```
2018-01-04 14:40:49 -08:00
Kubernetes Submit Queue 5528dde2f0
Merge pull request #56843 from CaoShuFeng/podsecuritypolicy
Automatic merge from submit-queue (batch tested with PRs 57021, 56843, 54983). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[PSP] always check validated policy first for update operation

When update a pod with `kubernetes.io/psp` annotation set, we should
check this policy first. Because this saved policy is `usually` the
one we are looking for.


**Release note**:
```release-note
NONE
```
2018-01-04 14:40:46 -08:00
Kubernetes Submit Queue cb6b88ffc6
Merge pull request #56971 from derekwaynecarr/limit-range-ignore-terminating-pods
Automatic merge from submit-queue (batch tested with PRs 56971, 57570, 57830, 57742). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

LimitRange ignores objects previously marked for deletion

**What this PR does / why we need it**:
A `LimitRange` added to a namespace after it has pods can prevent terminating pods from being deleted if they do not conform to the min/max criteria.

xref https://bugzilla.redhat.com/show_bug.cgi?id=1509309

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

```release-note
NONE
```
2018-01-04 08:59:37 -08:00
Kubernetes Submit Queue 8971a516ed
Merge pull request #56317 from guangxuli/refactor_priority_CalculateAntiAffinityPriority
Automatic merge from submit-queue (batch tested with PRs 57696, 57821, 56317). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Change priority function(CalculateAntiAffinityPriority) into Map/Reduce pattern

**What this PR does / why we need it**:
Ref #24246. exactly ref https://github.com/kubernetes/kubernetes/issues/51455, the PR aim to unify priority functions(deprecated) by using map/reduce pattern. 
Previous related PR is https://github.com/kubernetes/kubernetes/pull/51192
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #
None
**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2018-01-04 03:22:42 -08:00
Kubernetes Submit Queue b57b253594
Merge pull request #57696 from apilloud/bloat
Automatic merge from submit-queue (batch tested with PRs 57696, 57821, 56317). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Move DefaultMaxEBSVolumes constant into scheduler

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

A constant only used by the scheduler lives in the aws cloudprovider package. Moving the constant into the only package where it is used reduces import bloat. Testing with the dockerized build environment, the kube-scheduler binary went from 61748499 bytes to 47339144 bytes on amd64 with this change.

**Release note**:

```release-note
NONE
```
2018-01-04 03:22:36 -08:00
Gavin 94d75929b6 refactor function CalculateAntiAffinityPriority by using map/reduce pattern 2018-01-04 16:03:34 +08:00
Kubernetes Submit Queue 46eabb7d91
Merge pull request #56534 from allenpetersen/updateGengo
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update gengo version to include goimports formatter

Update gengo which now uses goimports to format code and organize imports.

Fixes #55542

**Special notes for your reviewer**:
Updates version of k8s.io/gengo
Takes new dependency on golang.org/x/tools/imports and golang.org/x/tools/go/ast/astutil

**Release Notes**:
```release-note
NONE
```
2018-01-03 17:47:05 -08:00
Kubernetes Submit Queue 81b43401a9
Merge pull request #57128 from liggitt/kubelet-admin
Automatic merge from submit-queue (batch tested with PRs 57702, 57128). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Define default role for full kubelet API access

This makes sense to define uniformly so integrators can grant this to the `--kubelet-client-certificate` credential given to the apiserver. Mirrors the role GCE sets up.

```release-note
RBAC: The system:kubelet-api-admin cluster role can be used to grant full access to the kubelet API
```
2018-01-03 08:30:33 -08:00
Andrew Pilloud a57d492713 Move DefaultMaxEBSVolumes constant into scheduler
A constant only used by the scheduler lives in the aws cloudprovider
package. Moving the constant into the only package where it is used
reduces import bloat.
2018-01-03 08:19:38 -08:00
Allen Petersen 3d69cea1e5 Update generated files 2018-01-02 22:13:19 -08:00
Cao Shufeng 4b738a7b40 [PSP] always check validated policy first for update operation
When update a pod with `kubernetes.io/psp` annotation set, we should
check this policy first. Because this saved policy is `usually` the
one we are looking for.
2018-01-03 11:08:37 +08:00
chentao1596 dca1447f5f Optimizing the implementation of the error check for PriorityClass 2018-01-03 10:25:44 +08:00
Kubernetes Submit Queue 45a069a241
Merge pull request #56839 from hzxuzhonghu/exec-admission
Automatic merge from submit-queue (batch tested with PRs 57746, 57621, 56839, 57464). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 check pod securityContext hostNetwork in exec admission controller

**What this PR does / why we need it**:
currently only hostIPC hostPID are checked in DenyEscalatingExec admission controller,
hostNetwork should also be checked to deny exec /attach
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #56838

**Special notes for your reviewer**:

**Release note**:

```release-note
check psp HostNetwork in DenyEscalatingExec admission controller.
```
2018-01-02 15:26:44 -08:00
Kubernetes Submit Queue 89a38860f9
Merge pull request #57746 from ZhaokunQiu/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix typeos

**What this PR does / why we need it**:
fix typeos to make code more clear

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

**Special notes for your reviewer**:

**Release note**:

```
NONE

```
2018-01-02 14:55:57 -08:00
Kubernetes Submit Queue 014676fc4f
Merge pull request #57523 from jennybuckley/podtolerationrestriction-config
Automatic merge from submit-queue (batch tested with PRs 57651, 56411, 56779, 57523, 57624). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

add podtolerationrestriction config to scheme

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

Related to #57513
2018-01-02 14:09:48 -08:00