orchestratord: allow setting a PriorityClass on environmentd and clusterd pods - #38457
orchestratord: allow setting a PriorityClass on environmentd and clusterd pods#38457jazz-mo wants to merge 1 commit into
Conversation
…terd pods The operator sets no priority class on environmentd or clusterd pods, so they run at priority 0. Any higher-priority pod can evict them when a node fills up. A clusterd replica preempted mid-hydration aborts the deploy, and the chart has no way to raise these pods. Add `environmentd.priorityClassName` and `clusterd.priorityClassName`, next to the per-component node selectors, affinities and tolerations both components already have. Each becomes an orchestratord argument. `environmentd.priorityClassName` sets `priorityClassName` on the environmentd StatefulSet's pod template. `clusterd.priorityClassName` is forwarded to environmentd as `--orchestrator-kubernetes-priority-class-name` and applied there to clusterd pod specs. Both default to unset, which renders no argument and leaves every pod spec unchanged. The forwarded argument is gated on `meets_minimum_version(&V26_40_0)`, matching how `clusterd.affinity` and `clusterd.tolerations` are gated on `V144`. environmentd exits on an unrecognized argument, so an instance pinned to an older `environmentdImageRef` would otherwise fail to start once the value was set. balancerd and console are left out. Both default to two replicas and neither holds state, so an eviction costs a connection rather than a rehydration. The negative chart assertions use `notMatchRegex`. `notContains` compares whole list elements, so it cannot fail against a flag rendered as `--flag=value`. The existing `schedulerName` assertion has the same defect and is fixed here.
|
Thank you for your submission! We really appreciate it. Like many source-available projects, we require that you sign our Contributor License Agreement (CLA) before we can accept your contribution. I have read the Contributor License Agreement (CLA) and I hereby sign the CLA. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
I have read the Contributor License Agreement (CLA) and I hereby sign the CLA. |
| # -- PriorityClass to use for environmentd pods spawned by the operator. The | ||
| # PriorityClass must already exist. Kubernetes rejects a pod that names one | ||
| # it cannot resolve, so a typo here stops these pods being created at all. | ||
| priorityClassName: |
There was a problem hiding this comment.
Most helm charts default priorityClassName to "" rather than null (having an empty yaml value isn't a great yaml practice). Since you are using an if ...priorityClassName in your helm template, nothing changes on that side.
Why
The operator sets no priority class on environmentd or clusterd pods. Higher priority pods evict them when a node fills up. One eviction aborted a deploy mid-hydration.
What
Users set
environmentd.priorityClassNameandclusterd.priorityClassNameto apply priority classes to those pods. Both values default to unset, which renders no argument and changes no pod spec. The clusterd argument requires environmentd v26.40 or newer. This matches howclusterd.affinityandclusterd.tolerationsare already gated. Older environmentd versions exit on unrecognized arguments. We exclude balancerd and console because they hold no state and run multiple replicas.Before you set it
system-cluster-criticalis 2000000000, so these pods remain vulnerable to critical preemptors.preemptionPolicy: Neverto prevent new pods from evicting serving pods during the rollout.Testing
Helm unit tests use
notMatchRegexfor negative assertions. ThenotContainsfunction compares whole list elements, so it never fails against a flag rendered as--flag=value. The pre-existingschedulerNameassertion has the same defect and is fixed here. An mzcompose test asserts the resolved integer priority to prove Kubernetes admitted the class.Open: I omitted the Chart.yaml version bump because a script manages it and PR #38406 omitted it, but which rule is live?