-
Notifications
You must be signed in to change notification settings - Fork 240
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
Add priorityClassName support #322
Add priorityClassName support #322
Conversation
As per jenkinsci#322 (comment) jenkins-operator should have enough permissions to get priorityclasses now. Modify the role in the corresponding way.
It will be great if we could check this in e2e https://github.com/jenkinsci/kubernetes-operator/blob/master/test/e2e/jenkins.go#L69. |
@tomaszsek , I reverted validation, as it compicates things in multitenant environment and added e2e test. I have a question regarding e2e tests: is it possible to check negative cases (i.e. when reconcile loop fails) in those? If possible, how can I achieve that and how can I check error messages in tests then? |
Tests are failing due to this: kubernetes/kubernetes#60596 |
You can bump minikube Kubernetes version here https://github.com/jenkinsci/kubernetes-operator/blob/master/config.minikube.env#L3 |
ec4e99c
to
3572f7e
Compare
Allow to set priorityClassName for master pod. This will make possible for jenkins master to either not be preempted on other's pod low resources or to preempt lesser priority pods on resources shortage. Ref: jenkinsci#321
As it is quite difficult to set cluster-wide objects in test and don't break other tests, which are running in parallel, rely on pre-created priorityClass (which is already in the cluster by default) in test.
628a17a
to
9b468f8
Compare
9b468f8
to
7c5f41f
Compare
@tomaszsek , after tons of struggling with e2e, i finally managed to make tests pass! |
@anxolerd Thanks 👍 |
Description
Allow to set priorityClassName for master pod. This will make possible
for jenkins master to either not be preempted on other's pod low
resources or to preempt lesser priority pods on resources shortage.
API changes
Add
spec.master.priorityClassName
field toJenkins
CR, which corresponds tospec.priorityClassName
field inPod
spec. Field type isstring
, it should be either name of a validscheduling.k8s.io/v1/PriorityClass
or empty string.Linked issues
Closes #321