blob: fdfc51a275c3724bb5327b5b0d1726a4b0199f94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# If the admission webhook is enabled, then a post-install step is required
# to generate and install the secret in the operator namespace.
# 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.
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "sparkoperator.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "sparkoperator.name" . }}
helm.sh/chart: {{ include "sparkoperator.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: {{ include "sparkoperator.name" . }}
app.kubernetes.io/version: {{ .Values.operatorVersion }}
strategy:
type: Recreate
template:
metadata:
{{- if .Values.enableMetrics }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "{{ .Values.metricsPort }}"
prometheus.io/path: {{ .Values.metricsEndpoint }}
{{- end }}
labels:
app.kubernetes.io/name: {{ include "sparkoperator.name" . }}
app.kubernetes.io/version: {{ .Values.operatorVersion }}
initializers:
pending: []
spec:
serviceAccountName: {{ include "sparkoperator.serviceAccountName" . }}
{{- if .Values.enableWebhook }}
volumes:
- name: webhook-certs
secret:
secretName: spark-webhook-certs
{{- end }}
containers:
- name: sparkoperator
image: {{ .Values.operatorImageName }}:{{ .Values.operatorVersion }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
{{- if .Values.enableWebhook }}
volumeMounts:
- name: webhook-certs
mountPath: /etc/webhook-certs
{{- end }}
{{- if .Values.enableMetrics }}
ports:
- containerPort: {{ .Values.metricsPort }}
{{ end }}
args:
- -v=2
- -namespace={{ .Values.sparkJobNamespace }}
- -ingress-url-format={{ .Values.ingressUrlFormat }}
- -install-crds={{ .Values.installCrds }}
- -controller-threads={{ .Values.controllerThreads }}
- -resync-interval={{ .Values.resyncInterval }}
- -logtostderr
{{- if .Values.enableMetrics }}
- -enable-metrics=true
- -metrics-labels=app_type
- -metrics-port={{ .Values.metricsPort }}
- -metrics-endpoint={{ .Values.metricsEndpoint }}
- -metrics-prefix={{ .Values.metricsPrefix }}
{{- end }}
{{- if .Values.enableWebhook }}
- -enable-webhook=true
- -webhook-svc-namespace={{ .Release.Namespace }}
- -webhook-port={{ .Values.webhookPort }}
- -webhook-svc-name={{ .Release.Name }}-webhook
- -webhook-config-name={{ include "sparkoperator.fullname" . }}-webhook-config
{{- end }}
|