Skip to content

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-critical
  • hdx-critical
  • hdx-highest
  • hdx-high
  • hdx-medium
  • hdx-low
  • hdx-lowest
HydrolixCluster spec
apiVersion: hydrolix.io/v1
kind: HydrolixCluster
metadata:
  name: my-cluster
spec:
  priority_classes:
    deployments:
      intake-head: hdx-critical
      merge-peer: hdx-low
    statefulset:
      rabbitmq: hdx-critical
      redpanda: hdx-low
    daemonset:
      vector: hdx-low

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
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
  namespace: hydrolix
spec:
  template:
    spec:
      priorityClassName: hdx-high
      containers:
        - name: my-app
          image: my-app:latest

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
1
2
3
4
5
6
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
  name: my-app-priority
preemptionPolicy: PreemptLowerPriority
value: 9750

Then reference it in your workload:

1
2
3
4
spec:
  template:
    spec:
      priorityClassName: my-app-priority

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:

kubectl get pods -n <namespace> -o custom-columns="NAME:.metadata.name,PRIORITY_CLASS:.spec.priorityClassName,PRIORITY:.spec.priority"