From 8fc405822d78119b66613612c105b82dfb592c71 Mon Sep 17 00:00:00 2001 From: t3mi Date: Wed, 24 Apr 2024 19:41:19 +0300 Subject: [PATCH] fix(chart): remove operator namespace default for job namespaces value (#1989) Signed-off-by: t3mi --- charts/spark-operator-chart/Chart.yaml | 2 +- charts/spark-operator-chart/README.md | 4 ++-- charts/spark-operator-chart/templates/deployment.yaml | 4 ++-- charts/spark-operator-chart/templates/spark-rbac.yaml | 2 +- charts/spark-operator-chart/values.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/spark-operator-chart/Chart.yaml b/charts/spark-operator-chart/Chart.yaml index fec08b3ae..b26c28afb 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.2.12 +version: 1.2.13 appVersion: v1beta2-1.4.4-3.5.0 keywords: - spark diff --git a/charts/spark-operator-chart/README.md b/charts/spark-operator-chart/README.md index 4999ae002..1c8b8d202 100644 --- a/charts/spark-operator-chart/README.md +++ b/charts/spark-operator-chart/README.md @@ -1,6 +1,6 @@ # spark-operator -![Version: 1.2.12](https://img.shields.io/badge/Version-1.2.12-informational?style=flat-square) ![AppVersion: v1beta2-1.4.4-3.5.0](https://img.shields.io/badge/AppVersion-v1beta2--1.4.4--3.5.0-informational?style=flat-square) +![Version: 1.2.13](https://img.shields.io/badge/Version-1.2.13-informational?style=flat-square) ![AppVersion: v1beta2-1.4.4-3.5.0](https://img.shields.io/badge/AppVersion-v1beta2--1.4.4--3.5.0-informational?style=flat-square) A Helm chart for Spark on Kubernetes operator @@ -126,7 +126,7 @@ See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall) for command docum | serviceAccounts.sparkoperator.create | bool | `true` | Create a service account for the operator | | serviceAccounts.sparkoperator.name | string | `""` | Optional name for the operator service account | | sidecars | list | `[]` | Sidecar containers | -| sparkJobNamespaces | list | `[]` | List of namespaces where to run spark jobs, operator namespace is included only when list of namespaces is empty | +| sparkJobNamespaces | list | `[]` | List of namespaces where to run spark jobs | | tolerations | list | `[]` | List of node taints to tolerate | | uiService.enable | bool | `true` | Enable UI service creation for Spark application | | volumeMounts | list | `[]` | | diff --git a/charts/spark-operator-chart/templates/deployment.yaml b/charts/spark-operator-chart/templates/deployment.yaml index 48128acc1..4f1f552e5 100644 --- a/charts/spark-operator-chart/templates/deployment.yaml +++ b/charts/spark-operator-chart/templates/deployment.yaml @@ -3,7 +3,7 @@ # In the post-install hook, the token corresponding to the operator service account # is used to authenticate with the Kubernetes API server to install the secret bundle. -{{- $jobNamespaces := .Values.sparkJobNamespaces | default (list .Release.Namespace) }} +{{- $jobNamespaces := .Values.sparkJobNamespaces | default list }} --- apiVersion: apps/v1 kind: Deployment @@ -66,7 +66,7 @@ spec: args: - -v={{ .Values.logLevel }} - -logtostderr - {{- if le (len $jobNamespaces) 1 }} + {{- if eq (len $jobNamespaces) 1 }} - -namespace={{ index $jobNamespaces 0 }} {{- end }} - -enable-ui-service={{ .Values.uiService.enable}} diff --git a/charts/spark-operator-chart/templates/spark-rbac.yaml b/charts/spark-operator-chart/templates/spark-rbac.yaml index 429992541..acdeaa5cb 100644 --- a/charts/spark-operator-chart/templates/spark-rbac.yaml +++ b/charts/spark-operator-chart/templates/spark-rbac.yaml @@ -1,5 +1,5 @@ {{- if or .Values.rbac.create .Values.rbac.createRole }} -{{- $jobNamespaces := .Values.sparkJobNamespaces | default (list .Release.Namespace) }} +{{- $jobNamespaces := .Values.sparkJobNamespaces | default list }} {{- range $jobNamespace := $jobNamespaces }} --- apiVersion: rbac.authorization.k8s.io/v1 diff --git a/charts/spark-operator-chart/values.yaml b/charts/spark-operator-chart/values.yaml index 3ea5eb868..175a44cf8 100644 --- a/charts/spark-operator-chart/values.yaml +++ b/charts/spark-operator-chart/values.yaml @@ -52,7 +52,7 @@ serviceAccounts: # -- Optional annotations for the operator service account annotations: {} -# -- List of namespaces where to run spark jobs, operator namespace is included only when list of namespaces is empty +# -- List of namespaces where to run spark jobs sparkJobNamespaces: [] # - ns1