From 10447617e9ba07166b3c8f361fa093cdaf2d580b Mon Sep 17 00:00:00 2001 From: Daniel Moore Date: Sat, 10 Oct 2020 19:38:47 -0400 Subject: [PATCH] [incubator/sparkoperator] fixes ISSUE-23875 (#23876) [] fixes missing colon bumps version adds to README fixes lint error Signed-off-by: Daniel Moore --- incubator/sparkoperator/Chart.yaml | 2 +- incubator/sparkoperator/README.md | 1 + incubator/sparkoperator/templates/crd-cleanup-job.yaml | 6 ++++++ incubator/sparkoperator/templates/webhook-cleanup-job.yaml | 6 ++++++ incubator/sparkoperator/templates/webhook-init-job.yaml | 6 ++++++ incubator/sparkoperator/values.yaml | 4 ++++ 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/incubator/sparkoperator/Chart.yaml b/incubator/sparkoperator/Chart.yaml index 00788ac633..a058ae5089 100644 --- a/incubator/sparkoperator/Chart.yaml +++ b/incubator/sparkoperator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: sparkoperator description: A Helm chart for Spark on Kubernetes operator -version: 0.8.2 +version: 0.8.3 appVersion: v1beta2-1.2.0-3.0.0 keywords: - spark diff --git a/incubator/sparkoperator/README.md b/incubator/sparkoperator/README.md index c8d75b8ab9..b0ad2baf30 100644 --- a/incubator/sparkoperator/README.md +++ b/incubator/sparkoperator/README.md @@ -70,6 +70,7 @@ The following table lists the configurable parameters of the Spark operator char | `leaderElection.lockName` | Lock name to use for leader election | `spark-operator-lock` | | `leaderElection.lockNamespace` | Namespace to use for leader election | (namespace of release) | | `securityContext` | Defines security context for operator container. | `{}` | +| `istio.enabled` | Whether Jobs will run in service mesh | false | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. diff --git a/incubator/sparkoperator/templates/crd-cleanup-job.yaml b/incubator/sparkoperator/templates/crd-cleanup-job.yaml index 73d1b2abed..ada3e3c9cf 100644 --- a/incubator/sparkoperator/templates/crd-cleanup-job.yaml +++ b/incubator/sparkoperator/templates/crd-cleanup-job.yaml @@ -14,6 +14,12 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} spec: template: + metadata: + name: {{ include "sparkoperator.fullname" . }}-crd-cleanup + {{- if .Values.istio.enabled }} + annotations: + "sidecar.istio.io/inject": "false" + {{- end }} spec: serviceAccountName: {{ include "sparkoperator.serviceAccountName" . }} restartPolicy: OnFailure diff --git a/incubator/sparkoperator/templates/webhook-cleanup-job.yaml b/incubator/sparkoperator/templates/webhook-cleanup-job.yaml index 6e8ffb1ebb..6ed8a95d6b 100644 --- a/incubator/sparkoperator/templates/webhook-cleanup-job.yaml +++ b/incubator/sparkoperator/templates/webhook-cleanup-job.yaml @@ -14,6 +14,12 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} spec: template: + metadata: + name: {{ include "sparkoperator.fullname" . }}-webhook-cleanup + {{- if .Values.istio.enabled }} + annotations: + "sidecar.istio.io/inject": "false" + {{- end }} spec: serviceAccountName: {{ include "sparkoperator.serviceAccountName" . }} restartPolicy: OnFailure diff --git a/incubator/sparkoperator/templates/webhook-init-job.yaml b/incubator/sparkoperator/templates/webhook-init-job.yaml index 4963ed6684..dcf6639722 100644 --- a/incubator/sparkoperator/templates/webhook-init-job.yaml +++ b/incubator/sparkoperator/templates/webhook-init-job.yaml @@ -10,6 +10,12 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} spec: + metadata: + name: {{ include "sparkoperator.fullname" . }}-webhook-init + {{- if .Values.istio.enabled }} + annotations: + "sidecar.istio.io/inject": "false" + {{- end }} template: spec: serviceAccountName: {{ include "sparkoperator.serviceAccountName" . }} diff --git a/incubator/sparkoperator/values.yaml b/incubator/sparkoperator/values.yaml index bcf6ba86d1..0d2cfaa53e 100644 --- a/incubator/sparkoperator/values.yaml +++ b/incubator/sparkoperator/values.yaml @@ -76,3 +76,7 @@ leaderElection: ## Optionally store the lock in another namespace. Defaults to operator's namespace # lockNamespace: "" replicas: 1 + +## When using istio Jobs need to run without a sidecar to properly terminate +istio: + enabled: false