-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pod Priority Class support #262
Conversation
216111c
to
4bc7359
Compare
@prometherion apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
env: test
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
priorityClassName: critical when the feature is enabled, i.e. the annotations apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
env: test
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
priorityClassName: |
Totally agree @bsctl, just fixed with the expected behavior. |
It's better but a case is still not correct, imo. Pls, see below
apiVersion: capsule.clastix.io/v1alpha1
kind: Tenant
metadata:
annotations:
priorityclass.capsule.clastix.io/allowed: oil
name: oil
spec:
owner: # required
name: engineering
kind: Group
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: oil
value: 1000000
globalDefault: false
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
env: test
namespace: oil-production
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
priorityClassName: oil
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
env: test
namespace: oil-production
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
priorityClassName: system-cluster-critical
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
env: test
namespace: oil-production
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
A null Priority Class should be allowed, i.e. |
I'm feeling awkward missing this, but yeah, going to work to address the case! |
Tested manually with latest force-pushed changes: $ kubectl describe tnt oil
Name: oil
Namespace:
Labels: <none>
Annotations: priorityclass.capsule.clastix.io/allowed: oil
API Version: capsule.clastix.io/v1alpha1
Kind: Tenant
Metadata:
Creation Timestamp: 2021-05-28T07:25:35Z
Generation: 1
Resource Version: 212798
UID: d5415961-ad68-4f4b-84a1-6f3bc342ddcf
Spec:
Owner:
Kind: Group
Name: engineering
Status:
Namespaces:
oil-production
Size: 1
Events: <none>
$ cat <<EOF | kubectl apply -f -
pipe heredoc> apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
env: test
namespace: oil-production
spec:
containers:
- name: nginx
image: nginx
imagePullPolicy: IfNotPresent
pipe heredoc> EOF
pod/nginx created |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm @prometherion many thanks!
Partially addressing #257.
We have to plan a new version to handle this feature.