From 6bf5d6473fb71157eef63d7292bbc87c8619e46d Mon Sep 17 00:00:00 2001 From: Praveen Gajulapalli <13733716+pkgajulapalli@users.noreply.github.com> Date: Sat, 15 Jun 2024 23:12:34 +0530 Subject: [PATCH] Adding an option to set the priority class for spark-operator pod (#2043) * feat: give an option to set the priority class for spark-operator pod Signed-off-by: Praveen Gajulapalli <13733716+pkgajulapalli@users.noreply.github.com> * feat: bumped up helm chart version Signed-off-by: Praveen Gajulapalli <13733716+pkgajulapalli@users.noreply.github.com> * fix: fixed issue with position of priorityClassName Signed-off-by: Praveen Gajulapalli <13733716+pkgajulapalli@users.noreply.github.com> --- charts/spark-operator-chart/Chart.yaml | 2 +- charts/spark-operator-chart/README.md | 1 + charts/spark-operator-chart/templates/deployment.yaml | 3 +++ charts/spark-operator-chart/values.yaml | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/spark-operator-chart/Chart.yaml b/charts/spark-operator-chart/Chart.yaml index 9107161ad..7dcec3a52 100644 --- a/charts/spark-operator-chart/Chart.yaml +++ b/charts/spark-operator-chart/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: spark-operator description: A Helm chart for Spark on Kubernetes operator -version: 1.4.0 +version: 1.4.1 appVersion: v1beta2-1.6.0-3.5.0 keywords: - spark diff --git a/charts/spark-operator-chart/README.md b/charts/spark-operator-chart/README.md index b84e96360..50af340de 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 485620fee..797ea998e 100644 --- a/charts/spark-operator-chart/templates/deployment.yaml +++ b/charts/spark-operator-chart/templates/deployment.yaml @@ -122,6 +122,9 @@ spec: volumes: {{- toYaml . | nindent 8 }} {{- end }} + {{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/spark-operator-chart/values.yaml b/charts/spark-operator-chart/values.yaml index 1dd9a5b15..df08008df 100644 --- a/charts/spark-operator-chart/values.yaml +++ b/charts/spark-operator-chart/values.yaml @@ -181,3 +181,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: ""