Skip to content

Commit e894517

Browse files
committed
Changes
1 parent 7dea030 commit e894517

File tree

5 files changed

+156
-35
lines changed

5 files changed

+156
-35
lines changed

charts/spark-operator-chart/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,8 @@ See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall) for command docum
130130
| controller.workqueueRateLimiter.maxDelay.enable | bool | `true` | Specifies whether to enable max delay for the workqueue rate limiter. This is useful to avoid losing events when the workqueue is full. |
131131
| controller.workqueueRateLimiter.maxDelay.duration | string | `"6h"` | Specifies the maximum delay duration for the workqueue rate limiter. |
132132
| controller.submitter.type | string | `"default"` | Type of submitter to use: 'default' or 'grpc'. |
133-
| controller.submitter.grpcServerAddress | string | `"localhost:50051"` | gRPC server address for alternate Spark submit (used when submitter.type is 'grpc'). When using native submit plugin sidecar, this should be 'localhost:50051'. |
133+
| controller.submitter.grpcServerAddress | string | `"localhost:50051"` | gRPC server address for alternate Spark submit (used when submitter.type is 'grpc'). |
134134
| controller.submitter.grpcSubmitTimeout | string | `"10s"` | Timeout for gRPC Spark submit (used when submitter.type is 'grpc'). |
135-
| controller.submitter.nativeSubmitPlugin.enabled | bool | `false` | Enable native submit plugin sidecar. |
136-
| controller.submitter.nativeSubmitPlugin.image | string | `"docker.io/library/native-submit:0.0.1"` | Native submit plugin image. |
137-
| controller.submitter.nativeSubmitPlugin.imagePullPolicy | string | `"IfNotPresent"` | Native submit plugin image pull policy. |
138-
| controller.submitter.nativeSubmitPlugin.port | int | `50051` | Native submit plugin container port. |
139-
| controller.submitter.nativeSubmitPlugin.portName | string | `"grpc"` | Native submit plugin container port name. |
140-
| controller.submitter.nativeSubmitPlugin.resources | object | `{}` | Resource requests and limits for native submit plugin. |
141135
| webhook.enable | bool | `true` | Specifies whether to enable webhook. |
142136
| webhook.replicas | int | `1` | Number of replicas of webhook server. |
143137
| webhook.leaderElection.enable | bool | `true` | Specifies whether to enable leader election for webhook. |

charts/spark-operator-chart/templates/controller/deployment.yaml

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,20 @@ metadata:
2121
labels:
2222
{{- include "spark-operator.controller.labels" . | nindent 4 }}
2323
spec:
24+
{{- with .Values.controller.progressDeadlineSeconds }}
25+
progressDeadlineSeconds: {{ . }}
26+
{{- end }}
2427
replicas: {{ .Values.controller.replicas }}
28+
{{- with .Values.controller.revisionHistoryLimit }}
29+
revisionHistoryLimit: {{ . }}
30+
{{- end }}
2531
selector:
2632
matchLabels:
2733
{{- include "spark-operator.controller.selectorLabels" . | nindent 6 }}
34+
{{- with .Values.controller.strategy }}
35+
strategy:
36+
{{- toYaml . | nindent 4 }}
37+
{{- end }}
2838
template:
2939
metadata:
3040
labels:
@@ -152,6 +162,7 @@ spec:
152162
volumeMounts:
153163
{{- toYaml . | nindent 8 }}
154164
{{- end }}
165+
resources: {}
155166
{{- with .Values.controller.resources }}
156167
resources:
157168
{{- toYaml . | nindent 10 }}
@@ -170,33 +181,36 @@ spec:
170181
securityContext:
171182
{{- toYaml . | nindent 10 }}
172183
{{- end }}
184+
terminationMessagePath: /dev/termination-log
185+
terminationMessagePolicy: File
173186
{{- if .Values.controller.submitter.nativeSubmitPlugin.enabled }}
174187
- name: native-submit
175188
image: {{ .Values.controller.submitter.nativeSubmitPlugin.image }}
176189
{{- with .Values.controller.submitter.nativeSubmitPlugin.imagePullPolicy }}
177190
imagePullPolicy: {{ . }}
178191
{{- end }}
192+
{{- with .Values.controller.submitter.nativeSubmitPlugin.ports }}
179193
ports:
180-
- name: grpc
181-
containerPort: 50051
182-
- name: health
183-
containerPort: 9090
194+
{{- toYaml . | nindent 8 }}
195+
{{- end }}
196+
{{- with .Values.controller.submitter.nativeSubmitPlugin.livenessProbe }}
197+
livenessProbe:
198+
{{- toYaml . | nindent 10 }}
199+
{{- end }}
200+
{{- with .Values.controller.submitter.nativeSubmitPlugin.readinessProbe }}
201+
readinessProbe:
202+
{{- toYaml . | nindent 10 }}
203+
{{- end }}
184204
{{- with .Values.controller.submitter.nativeSubmitPlugin.resources }}
185205
resources:
186206
{{- toYaml . | nindent 10 }}
187207
{{- end }}
188-
livenessProbe:
189-
httpGet:
190-
port: 9090
191-
path: /health
192-
initialDelaySeconds: 30
193-
periodSeconds: 10
194-
readinessProbe:
195-
httpGet:
196-
port: 9090
197-
path: /ready
198-
initialDelaySeconds: 5
199-
periodSeconds: 5
208+
{{- with .Values.controller.submitter.nativeSubmitPlugin.terminationMessagePath }}
209+
terminationMessagePath: {{ . }}
210+
{{- end }}
211+
{{- with .Values.controller.submitter.nativeSubmitPlugin.terminationMessagePolicy }}
212+
terminationMessagePolicy: {{ . }}
213+
{{- end }}
200214
{{- end }}
201215
{{- with .Values.controller.sidecars }}
202216
{{- toYaml . | nindent 6 }}
@@ -224,8 +238,20 @@ spec:
224238
{{- with .Values.controller.priorityClassName }}
225239
priorityClassName: {{ . }}
226240
{{- end }}
241+
{{- with .Values.controller.dnsPolicy }}
242+
dnsPolicy: {{ . }}
243+
{{- end }}
244+
{{- with .Values.controller.restartPolicy }}
245+
restartPolicy: {{ . }}
246+
{{- end }}
247+
{{- with .Values.controller.schedulerName }}
248+
schedulerName: {{ . }}
249+
{{- end }}
227250
serviceAccountName: {{ include "spark-operator.controller.serviceAccountName" . }}
228251
automountServiceAccountToken: {{ .Values.controller.serviceAccount.automountServiceAccountToken }}
252+
{{- with .Values.controller.terminationGracePeriodSeconds }}
253+
terminationGracePeriodSeconds: {{ . }}
254+
{{- end }}
229255
{{- with .Values.controller.podSecurityContext }}
230256
securityContext:
231257
{{- toYaml . | nindent 8 }}

charts/spark-operator-chart/tests/controller/deployment_test.yaml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,32 @@ tests:
734734
submitter:
735735
nativeSubmitPlugin:
736736
enabled: true
737-
image: "docker.io/library/native-submit:0.0.1"
737+
image: "docker.io/library/native-submit-plugin:08142025"
738738
imagePullPolicy: "IfNotPresent"
739+
ports:
740+
- containerPort: 50051
741+
name: metrics
742+
protocol: TCP
743+
livenessProbe:
744+
failureThreshold: 3
745+
httpGet:
746+
path: /healthz
747+
port: 9090
748+
scheme: HTTP
749+
periodSeconds: 10
750+
successThreshold: 1
751+
timeoutSeconds: 1
752+
readinessProbe:
753+
failureThreshold: 3
754+
httpGet:
755+
path: /readyz
756+
port: 9090
757+
scheme: HTTP
758+
periodSeconds: 10
759+
successThreshold: 1
760+
timeoutSeconds: 1
761+
terminationMessagePath: /dev/termination-log
762+
terminationMessagePolicy: File
739763
resources:
740764
limits:
741765
cpu: 100m
@@ -749,29 +773,25 @@ tests:
749773
value: native-submit
750774
- equal:
751775
path: spec.template.spec.containers[?(@.name=="native-submit")].image
752-
value: docker.io/library/native-submit:0.0.1
776+
value: docker.io/library/native-submit-plugin:08142025
753777
- equal:
754778
path: spec.template.spec.containers[?(@.name=="native-submit")].imagePullPolicy
755779
value: IfNotPresent
756780
- contains:
757781
path: spec.template.spec.containers[?(@.name=="native-submit")].ports
758782
content:
759-
name: grpc
783+
name: metrics
760784
containerPort: 50051
761-
- contains:
762-
path: spec.template.spec.containers[?(@.name=="native-submit")].ports
763-
content:
764-
name: health
765-
containerPort: 9090
785+
protocol: TCP
766786
- equal:
767787
path: spec.template.spec.containers[?(@.name=="native-submit")].livenessProbe.httpGet.port
768788
value: 9090
769789
- equal:
770790
path: spec.template.spec.containers[?(@.name=="native-submit")].livenessProbe.httpGet.path
771-
value: /health
791+
value: /healthz
772792
- equal:
773793
path: spec.template.spec.containers[?(@.name=="native-submit")].readinessProbe.httpGet.port
774794
value: 9090
775795
- equal:
776796
path: spec.template.spec.containers[?(@.name=="native-submit")].readinessProbe.httpGet.path
777-
value: /ready
797+
value: /readyz

charts/spark-operator-chart/values-grpc.yaml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,38 @@ controller:
1414
# Enable native submit plugin sidecar
1515
nativeSubmitPlugin:
1616
enabled: true
17-
image: "docker.io/library/native-submit:0.0.1"
17+
image: "docker.io/library/native-submit-plugin:08142025"
1818
imagePullPolicy: "IfNotPresent"
1919
port: 50051
2020
portName: "grpc"
21+
# Container ports configuration
22+
ports:
23+
- containerPort: 50051
24+
name: metrics
25+
protocol: TCP
26+
# Liveness probe configuration
27+
livenessProbe:
28+
failureThreshold: 3
29+
httpGet:
30+
path: /healthz
31+
port: 9090
32+
scheme: HTTP
33+
periodSeconds: 10
34+
successThreshold: 1
35+
timeoutSeconds: 1
36+
# Readiness probe configuration
37+
readinessProbe:
38+
failureThreshold: 3
39+
httpGet:
40+
path: /readyz
41+
port: 9090
42+
scheme: HTTP
43+
periodSeconds: 10
44+
successThreshold: 1
45+
timeoutSeconds: 1
46+
# Container termination configuration
47+
terminationMessagePath: /dev/termination-log
48+
terminationMessagePolicy: File
2149
resources:
2250
limits:
2351
cpu: 100m

charts/spark-operator-chart/values.yaml

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@ image:
4444
controller:
4545
# -- Number of replicas of controller.
4646
replicas: 1
47+
48+
# -- Progress deadline seconds for deployment
49+
progressDeadlineSeconds: 600
50+
51+
# -- Revision history limit for deployment
52+
revisionHistoryLimit: 10
53+
54+
# -- Deployment strategy
55+
strategy:
56+
rollingUpdate:
57+
maxSurge: 25%
58+
maxUnavailable: 25%
59+
type: RollingUpdate
4760

4861
leaderElection:
4962
# -- Specifies whether to enable leader election for controller.
@@ -143,6 +156,18 @@ controller:
143156

144157
# -- Priority class for controller pods.
145158
priorityClassName: ""
159+
160+
# -- Pod DNS policy
161+
dnsPolicy: ClusterFirst
162+
163+
# -- Pod restart policy
164+
restartPolicy: Always
165+
166+
# -- Pod scheduler name
167+
schedulerName: default-scheduler
168+
169+
# -- Pod termination grace period seconds
170+
terminationGracePeriodSeconds: 30
146171

147172
# -- Security context for controller pods.
148173
podSecurityContext:
@@ -213,13 +238,41 @@ controller:
213238
# -- Enable native submit plugin sidecar
214239
enabled: false
215240
# -- Native submit plugin image
216-
image: "docker.io/library/native-submit:0.0.1"
241+
image: "docker.io/library/native-submit-plugin:08142025"
217242
# -- Native submit plugin image pull policy
218243
imagePullPolicy: "IfNotPresent"
219244
# -- Native submit plugin container port
220245
port: 50051
221246
# -- Native submit plugin container port name
222247
portName: "grpc"
248+
# -- Container ports configuration
249+
ports:
250+
- containerPort: 50051
251+
name: metrics
252+
protocol: TCP
253+
# -- Liveness probe configuration
254+
livenessProbe:
255+
failureThreshold: 3
256+
httpGet:
257+
path: /healthz
258+
port: 9090
259+
scheme: HTTP
260+
periodSeconds: 10
261+
successThreshold: 1
262+
timeoutSeconds: 1
263+
# -- Readiness probe configuration
264+
readinessProbe:
265+
failureThreshold: 3
266+
httpGet:
267+
path: /readyz
268+
port: 9090
269+
scheme: HTTP
270+
periodSeconds: 10
271+
successThreshold: 1
272+
timeoutSeconds: 1
273+
# -- Container termination configuration
274+
terminationMessagePath: /dev/termination-log
275+
terminationMessagePolicy: File
223276
# -- Resource requests and limits for native submit plugin
224277
resources: {}
225278
# limits:

0 commit comments

Comments
 (0)