Override Pod Priority Classes
This feature was introduced in Hydrolix version 5.9.
The Hydrolix operator assigns a default priority class to every workload. You can override these defaults using the priority_classes tunable in the HydrolixCluster spec.
Before you begin⚓︎
- Understand how pod priority classes work and review the default assignments.
- Identify which services you want to change and what priority level they need.
Override a Hydrolix service priority class⚓︎
Add the priority_classes tunable to your HydrolixCluster spec. Specify overrides by workload type and service name. The workload type keys are deployments, statefulset, and daemonset.
Allowed values:
system-node-criticalhdx-criticalhdx-highesthdx-highhdx-mediumhdx-lowhdx-lowest
| HydrolixCluster spec | |
|---|---|
After applying the updated spec, the operator reconciles the affected workloads with the new priority classes.
Override precedence
A tunable override always takes precedence over the built-in default. If you remove an override, the service reverts to its default priority class.
Protect non-Hydrolix workloads in a shared namespace⚓︎
If you deploy additional Kubernetes workloads in the same namespace as Hydrolix, those workloads are at risk of preemption. During resource constraints, the Kubernetes scheduler evicts pods that lack a priority class or have a lower-priority value to make room for higher-priority Hydrolix pods.
To protect your workloads, assign a priorityClassName to each deployment or pod spec.
Use an existing Hydrolix priority class⚓︎
You can reference any Hydrolix priority class that's already installed on the cluster. For example, to give a workload the same priority as Hydrolix query services:
| Non-Hydrolix deployment | |
|---|---|
Create a custom priority class⚓︎
If you need a priority level that doesn't match any Hydrolix class, create your own PriorityClass object:
| Custom PriorityClass | |
|---|---|
Then reference it in your workload:
Choose a priority value
Place your custom value between existing Hydrolix priority class values to control where your workloads sit in the preemption hierarchy. A value of 9750 falls between hdx-medium at 9700 and hdx-high at 9800.
Verify priority class assignments⚓︎
To check which priority class a pod is using: