From fd66e32f61d52b058bce199dc1b504b48ecf1fc6 Mon Sep 17 00:00:00 2001 From: Praveen Gajulapalli <13733716+pkgajulapalli@users.noreply.github.com> Date: Sun, 2 Jun 2024 03:05:35 +0530 Subject: [PATCH] feat: give an option to set the priority class for spark-operator pod Signed-off-by: Praveen Gajulapalli --- charts/spark-operator-chart/README.md | 1 + charts/spark-operator-chart/templates/deployment.yaml | 3 +++ charts/spark-operator-chart/values.yaml | 3 +++ 3 files changed, 7 insertions(+) diff --git a/charts/spark-operator-chart/README.md b/charts/spark-operator-chart/README.md index b76bdfb249..62ec31e184 100644 --- a/charts/spark-operator-chart/README.md +++ b/charts/spark-operator-chart/README.md @@ -110,6 +110,7 @@ See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall) for command docum | podMonitor.labels | object | `{}` | Pod monitor labels | | podMonitor.podMetricsEndpoint | object | `{"interval":"5s","scheme":"http"}` | Prometheus metrics endpoint properties. `metrics.portName` will be used as a port | | podSecurityContext | object | `{}` | Pod security context | +| priorityClassName | string | `""` | Priority class to be used for running spark-operator pod. This helps in managing the pods during preemption. | | rbac.annotations | object | `{}` | Optional annotations for rbac | | rbac.create | bool | `false` | **DEPRECATED** use `createRole` and `createClusterRole` | | rbac.createClusterRole | bool | `true` | Create and use RBAC `ClusterRole` resources | diff --git a/charts/spark-operator-chart/templates/deployment.yaml b/charts/spark-operator-chart/templates/deployment.yaml index f318c27f4b..5f5ff86dd1 100644 --- a/charts/spark-operator-chart/templates/deployment.yaml +++ b/charts/spark-operator-chart/templates/deployment.yaml @@ -134,6 +134,9 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.nodeSelector }} + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/spark-operator-chart/values.yaml b/charts/spark-operator-chart/values.yaml index 2cbd088b33..2697bd84d8 100644 --- a/charts/spark-operator-chart/values.yaml +++ b/charts/spark-operator-chart/values.yaml @@ -210,3 +210,6 @@ istio: # labelSelectorFilter -- A comma-separated list of key=value, or key labels to filter resources during watch and list based on the specified labels. labelSelectorFilter: "" + +# priorityClassName -- A priority class to be used for running spark-operator pod. +priorityClassName: ""