[incubator/sparkoperator] Use securitycontext from the chart values for the init and cleanup jobs too (#21539)

* Use `securitycontext` from the chart values for the init and cleanup jobs too

Signed-off-by: Wout Maaskant <wout.maaskant@riskident.com>

* Bump version

Signed-off-by: Wout Maaskant <wout.maaskant@riskident.com>

Co-authored-by: Wout Maaskant <wout.maaskant@riskident.com>
This commit is contained in:
scheleaap
2020-03-19 10:44:36 -07:00
committed by GitHub
co-authored by Wout Maaskant
parent 64f44ef2e5
commit cc1aec1b96
4 changed files with 25 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
name: sparkoperator
description: A Helm chart for Spark on Kubernetes operator
version: 0.6.7
version: 0.6.8
appVersion: v1beta2-1.1.0-2.4.5
keywords:
- spark
@@ -23,6 +23,12 @@ spec:
- name: delete-sparkapp-crd
image: {{ .Values.operatorImageName }}:{{ .Values.operatorVersion }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
{{- if .Values.securityContext }}
securityContext:
{{- range $securityPolicy, $value := .Values.securityContext }}
{{ $securityPolicy }}: {{ $value }}
{{- end }}
{{- end }}
command:
- "/bin/sh"
- "-c"
@@ -35,6 +41,12 @@ spec:
- name: delete-scheduledsparkapp-crd
image: {{ .Values.operatorImageName }}:{{ .Values.operatorVersion }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
{{- if .Values.securityContext }}
securityContext:
{{- range $securityPolicy, $value := .Values.securityContext }}
{{ $securityPolicy }}: {{ $value }}
{{- end }}
{{- end }}
command:
- "/bin/sh"
- "-c"
@@ -23,6 +23,12 @@ spec:
- name: clean-secret
image: {{ .Values.operatorImageName }}:{{ .Values.operatorVersion }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
{{- if .Values.securityContext }}
securityContext:
{{- range $securityPolicy, $value := .Values.securityContext }}
{{ $securityPolicy }}: {{ $value }}
{{- end }}
{{- end }}
command:
- "/bin/sh"
- "-c"
@@ -23,5 +23,11 @@ spec:
- name: main
image: {{ .Values.operatorImageName }}:{{ .Values.operatorVersion }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
{{- if .Values.securityContext }}
securityContext:
{{- range $securityPolicy, $value := .Values.securityContext }}
{{ $securityPolicy }}: {{ $value }}
{{- end }}
{{- end }}
command: ["/usr/bin/gencerts.sh", "-n", "{{ .Release.Namespace }}", "-s", "{{ .Release.Name }}-webhook", "-p"]
{{ end }}