From a70397a23e9704ea452065d7a3e35fc80a260a72 Mon Sep 17 00:00:00 2001 From: Oleksandr Kovalchuk Date: Mon, 12 Oct 2020 16:12:47 +0300 Subject: [PATCH] [incubator/sparkoperator] fix invalid webhook init job (#23887) * [sparkoperator] fix invalid webhook init job Prior to this commit, helm validation for webhook-init-job of incubator/sparkoperator failed in helm3 with the following error: Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Job.spec): unknown field "metadata" in io.k8s.api.batch.v1.JobSpec Issue was introduced by https://github.com/helm/charts/pull/23876 by accident, as other jobs in this chart (incubator/sparkoperator) were not affected. Signed-off-by: Oleksandr Kovalchuk * Bump chart version Signed-off-by: Oleksandr Kovalchuk --- incubator/sparkoperator/Chart.yaml | 2 +- .../sparkoperator/templates/webhook-init-job.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/incubator/sparkoperator/Chart.yaml b/incubator/sparkoperator/Chart.yaml index a058ae5089..8ebfeb82fb 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.3 +version: 0.8.4 appVersion: v1beta2-1.2.0-3.0.0 keywords: - spark diff --git a/incubator/sparkoperator/templates/webhook-init-job.yaml b/incubator/sparkoperator/templates/webhook-init-job.yaml index dcf6639722..969d0adfdb 100644 --- a/incubator/sparkoperator/templates/webhook-init-job.yaml +++ b/incubator/sparkoperator/templates/webhook-init-job.yaml @@ -10,13 +10,13 @@ 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: + metadata: + name: {{ include "sparkoperator.fullname" . }}-webhook-init + {{- if .Values.istio.enabled }} + annotations: + "sidecar.istio.io/inject": "false" + {{- end }} spec: serviceAccountName: {{ include "sparkoperator.serviceAccountName" . }} restartPolicy: OnFailure