Commit Graph

45 Commits

Author SHA1 Message Date
Alex Wang
541907334e graduate nonpreemptingpriority to ga 2022-02-08 18:11:23 +08:00
prateekpandey14
f9cf14f3f6 fix static check of importing the same package multiple times
Signed-off-by: prateekpandey14 <prateekpandey14@gmail.com>
2021-12-14 11:06:44 +05:30
Alex Wang
209117413f
Promote NonPreempt feature gate to beta (#91899)
* update nonpreempt featuregate to beta

* update
2020-06-30 00:02:56 -07:00
draveness
5cb92260a6 feat: graduate ResourceQuotaScopeSelectors to GA 2019-11-13 14:07:22 +08:00
ravisantoshgudimetla
fe4cac73c8 Relax namespace restriction for critical pods 2019-11-12 17:22:09 -05:00
yue9944882
09cf42d67c switch system priority class to versioned (v1) api
move all the helpers to scheduling v1 helpers

less explicit conversion
2019-10-24 00:51:57 +08:00
Mike Dame
ca18b48151 Move PodPriorityResolution e2e to integration 2019-09-19 20:25:03 -04:00
Jordan Liggitt
61774cd717 Plumb context to admission Admit/Validate 2019-08-20 11:11:00 -04:00
draveness
495faa22db feat: cleanup pod critical pod annotations feature 2019-08-09 08:41:23 +08:00
draveness
d83526d253 Revert "feat: cleanup pod critical pod annotations feature"
This reverts commit b6d41ee5cc.
2019-07-18 13:31:12 +08:00
draveness
b6d41ee5cc feat: cleanup pod critical pod annotations feature 2019-07-11 08:54:19 +08:00
draveness
ca6003bc75 feat: cleanup PodPriority features gate 2019-06-23 11:57:24 +08:00
wangqingcan
52f3380ef3 change preempting to PreemptionPolicy 2019-05-31 12:42:05 +08:00
wangqingcan
5c9438c691 non-preempting-priorityclass
Co-authored-by: Vallery Lancey <vallery@zeitgeistlabs.io>
Co-authored-by: Tan shanshan <tan.shanshan@zte.com.cn>
2019-05-31 12:37:07 +08:00
Bobby (Babak) Salamat
8574e3e3f4 Use Scheduling V1 API instead of Scheduling v1beta1 2019-04-05 14:21:45 -07:00
Mehdy Bohlool
d08bc3774d Mechanical changes due to signature change for Admit and Validate functions 2019-02-16 13:28:47 -08:00
Da K. Ma
083b92acf3 Set PriorityClassName when there's a default PirorityClass.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
2018-09-27 15:26:13 +08:00
Marko Mudrinić
21d2377821
admission/priority: externalize priority admission controller 2018-08-31 15:33:37 +02:00
Jordan Liggitt
bfd966c4c2
update priority admission for interoperability 2018-07-03 10:43:35 -04:00
Bobby (Babak) Salamat
a1472459a5 Addressed reviewers comments 2018-06-29 10:22:11 -07:00
Bobby (Babak) Salamat
1ce7585924 Limit usage of system critical priority classes to the system namespace 2018-06-28 17:43:30 -07:00
Bobby (Babak) Salamat
9592a9ecf4 Allow system critical priority classes in API validation 2018-03-06 10:06:58 -08:00
Bobby (Babak) Salamat
ebda9584f9 Auto-create system critical prioity classes at API server startup 2018-03-02 16:50:07 -08:00
wackxu
97e5c0a3e4 remove default priority cache in Priority admission controller 2018-02-26 11:51:45 +08:00
Kubernetes Submit Queue
f351d8cddb
Merge pull request #59082 from WanLinghao/package_name_fix
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 package name error

1.priority admission file got wrong package name
2.PriorityPlugin struct should not be public as well as its construct function. 
this patch fix this.



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

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

```release-note
NONE
```
2018-02-25 19:28:10 -08:00
WanLinghao
74fdccc629 fix package name error
modified:   plugin/pkg/admission/priority/admission.go
	modified:   plugin/pkg/admission/priority/admission_test.go
2018-02-26 09:17:36 +08:00
Kubernetes Submit Queue
755ab974e1
Merge pull request #58835 from ravisantoshgudimetla/critical-pod-with-priority
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>.

Critical pod priorityClass addition

**What this PR does / why we need it**:
@bsalamat - Apologies for the delay. This PR is to ensure that all pods with priorityClassName `system-node-critical` and `system-cluster-critical` will be critical pods while preserving backwards compatibility.

**Special notes for your reviewer**:

- Moved some constants and other data structures to scheduler/api/types.go where other constants are present.
- An automatic assignment of critical priorities to pods based on critical pod annotation for backwards compatibility including some unit tests. 
xref:  https://github.com/kubernetes/kubernetes/issues/57471 

**Release note**:

```release-note
Critical pods to use priorityClasses.
```
2018-02-23 11:22:31 -08:00
ravisantoshgudimetla
68c20ad770 Critical pods priorityClass addition 2018-02-21 20:53:21 -05:00
Bobby (Babak) Salamat
6b292822f5 Pick the PriorityClass with the lowest value of priority in case more than one global default exists 2018-02-16 16:59:09 -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
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
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
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
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
chentao1596
dca1447f5f Optimizing the implementation of the error check for PriorityClass 2018-01-03 10:25:44 +08:00
Cao Shufeng
1440949dc6 not calculate new priority when user update pods
motivation of this change:
If we update the priority, pod validation mechanism will prevent this update
request, this is not expected.
2017-11-10 16:10:51 +08:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
David Eads
2c671614df split some admission plugins into mutation and validation halves 2017-11-06 09:07:00 -05:00
Dr. Stefan Schimanski
aedcf681b3 admission: rename Validate{ -> Initialization}, Validat{ingAdmit -> e} 2017-11-02 09:29:55 +01:00
Kubernetes Submit Queue
7a944a69d6
Merge pull request #54485 from sttts/sttts-unify-admission-constructors
Automatic merge from submit-queue (batch tested with PRs 54761, 54748, 53991, 54485, 46951). 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>.

admission: unify plugin constructors

It's common in Go to return the actual object in constructors, not **one interface**
it implements. This allows us to implement multiple interfaces, but only have
one constructor. As having private types in constructors, we export all plugin structs, of course with private fields.

Note: super interfaces do not work if there are overlapping methods.
2017-10-30 15:38:33 -07:00
Dr. Stefan Schimanski
131905cdb8 admission: unify plugin constructors 2017-10-30 16:56:38 +01:00
wackxu
2430c24c61 update wrong group for priorityclasses 2017-10-28 10:35:41 +08:00
Bobby (Babak) Salamat
bef83fbeb9 Addressed reviewer comments 2017-08-07 17:07:20 -07:00
Bobby (Babak) Salamat
de8689c99b Add priority admission controller 2017-07-27 18:44:40 -07:00