-
Notifications
You must be signed in to change notification settings - Fork 23
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
Allow users to configure the priorityClassName field in the Helm chart #403
Allow users to configure the priorityClassName field in the Helm chart #403
Conversation
56fd6a6
to
dbbd374
Compare
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.
|
||
For more information, see: | ||
* [Guaranteed Scheduling For Critical Add-On Pods](https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/) | ||
* [Protect Your Mission-Critical Pods From Eviction With PriorityClass](https://kubernetes.io/blog/2023/01/12/protect-mission-critical-pods-priorityclass/) |
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.
Other charts link to PriorityClass, but I think these links are more useful.
|
||
```yaml | ||
priorityClassName: system-cluster-critical | ||
``` |
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.
The justification for suggesting this priority class is written in:
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.
One minor comment/question, but this LGTM as it stands.
/lgtm
f105b20
to
8755dce
Compare
@@ -81,6 +81,9 @@ spec: | |||
|
|||
hostNetwork: {{ (or .Values.app.webhook.hostNetwork .Values.hostNetwork) }} | |||
dnsPolicy: {{ (or .Values.app.webhook.dnsPolicy .Values.dnsPolicy) }} | |||
{{- with .Values.priorityClassName }} | |||
priorityClassName: "{{ . }}" |
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.
priorityClassName: "{{ . }}" | |
priorityClassName: {{ . }} |
Nit, I don't think quotes are required here and more consistent with the rest of the template.
Signed-off-by: Richard Wall <richard.wall@venafi.com> Co-authored-by: Erik Godding Boye <egboye@gmail.com>
Signed-off-by: Richard Wall <richard.wall@venafi.com>
Signed-off-by: Richard Wall <richard.wall@venafi.com>
8755dce
to
d8843ba
Compare
/lgtm Thanks, Richard! |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wallrj The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Added a
priorityClassName
field to the Helm chart so that users can reduce the chances of the approver-policy Pod being evicted (aka preempted) to make way for some other Pod on the node where it is currently running.I've also written some documentation about why this is useful and why you should use
priorityClassName: system-cluster-critical
:The name of the field and its location in the values.yaml file is consistent with trust-manager, csi-driver, csi-driver-spiffy.
But unlike those other charts I have not supplied a default
""
value, because that adds distraction to the the generated Deployment and it's unclear what the effect of that empty value is.Testing
The installation just hangs, and interestingly there is no feedback on the Deployment.
But you do see events about the unrecognised priority class
$ kubectl events -n cert-manager ... 34s (x16 over 3m18s) Warning FailedCreate ReplicaSet/cert-manager-approver-policy-6f675dbdcd Error creating: pods "cert-manager-approver-policy-6f675dbdcd-" is forbidden: no PriorityClass with name system-cluster-criticalx was found
Related Links