Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions build-tools/helm/spark-kubernetes-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,13 @@ spark.kubernetes.operator.watchedNamespaces={{ include "spark-operator.workloadN
Readiness Probe properties overrides
*/}}
{{- define "spark-operator.readinessProbe.failureThreshold" -}}
{{- default 30 .Values.operatorDeployment.operatorPod.operatorContainer.probes.startupProbe.failureThreshold }}
{{- default 30 .Values.operatorDeployment.operatorPod.operatorContainer.probes.readinessProbe.failureThreshold }}
{{- end }}
{{- define "spark-operator.readinessProbe.periodSeconds" -}}
{{- default 10 .Values.operatorDeployment.operatorPod.operatorContainer.probes.startupProbe.periodSeconds }}
{{- default 10 .Values.operatorDeployment.operatorPod.operatorContainer.probes.readinessProbe.periodSeconds }}
{{- end }}
{{- define "spark-operator.readinessProbe.timeoutSeconds" -}}
{{- default 1 .Values.operatorDeployment.operatorPod.operatorContainer.probes.readinessProbe.timeoutSeconds }}
{{- end }}

{{/*
Expand All @@ -140,6 +143,28 @@ Liveness Probe properties override
{{- define "spark-operator.livenessProbe.periodSeconds" -}}
{{- default 10 .Values.operatorDeployment.operatorPod.operatorContainer.probes.livenessProbe.periodSeconds }}
{{- end }}
{{- define "spark-operator.livenessProbe.failureThreshold" -}}
{{- default 1 .Values.operatorDeployment.operatorPod.operatorContainer.probes.livenessProbe.failureThreshold }}
{{- end }}
{{- define "spark-operator.livenessProbe.timeoutSeconds" -}}
{{- default 1 .Values.operatorDeployment.operatorPod.operatorContainer.probes.livenessProbe.timeoutSeconds }}
{{- end }}

{{/*
Startup Probe properties override
*/}}
{{- define "spark-operator.startupProbe.initialDelaySeconds" -}}
{{- default 0 .Values.operatorDeployment.operatorPod.operatorContainer.probes.startupProbe.initialDelaySeconds }}
{{- end }}
{{- define "spark-operator.startupProbe.failureThreshold" -}}
{{- default 30 .Values.operatorDeployment.operatorPod.operatorContainer.probes.startupProbe.failureThreshold }}
{{- end }}
{{- define "spark-operator.startupProbe.periodSeconds" -}}
{{- default 10 .Values.operatorDeployment.operatorPod.operatorContainer.probes.startupProbe.periodSeconds }}
{{- end }}
{{- define "spark-operator.startupProbe.timeoutSeconds" -}}
{{- default 1 .Values.operatorDeployment.operatorPod.operatorContainer.probes.startupProbe.timeoutSeconds }}
{{- end }}

{{/*
Readiness Probe property overrides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,29 @@ spec:
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
startupProbe:
httpGet:
port: probe-port
path: /healthz
initialDelaySeconds: {{ include "spark-operator.startupProbe.initialDelaySeconds" . }}
failureThreshold: {{ include "spark-operator.startupProbe.failureThreshold" . }}
periodSeconds: {{ include "spark-operator.startupProbe.periodSeconds" . }}
timeoutSeconds: {{ include "spark-operator.startupProbe.timeoutSeconds" . }}
readinessProbe:
httpGet:
port: probe-port
path: /readyz
failureThreshold: {{ include "spark-operator.readinessProbe.failureThreshold" . }}
periodSeconds: {{ include "spark-operator.readinessProbe.periodSeconds" . }}
timeoutSeconds: {{ include "spark-operator.readinessProbe.timeoutSeconds" . }}
livenessProbe:
httpGet:
port: probe-port
path: /healthz
initialDelaySeconds: {{ include "spark-operator.livenessProbe.initialDelaySeconds" . }}
periodSeconds: {{ include "spark-operator.livenessProbe.periodSeconds" . }}
failureThreshold: {{ include "spark-operator.livenessProbe.failureThreshold" . }}
timeoutSeconds: {{ include "spark-operator.livenessProbe.timeoutSeconds" . }}
{{- with .Values.operatorDeployment.operatorPod.operatorContainer.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
Expand Down
5 changes: 5 additions & 0 deletions build-tools/helm/spark-kubernetes-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,14 @@ operatorDeployment:
livenessProbe:
periodSeconds: 10
initialDelaySeconds: 30
failureThreshold: 1
timeoutSeconds: 1
startupProbe:
failureThreshold: 30
periodSeconds: 10
readinessProbe:
failureThreshold: 1
periodSeconds: 10
metrics:
port: 19090
# By default, operator container is configured to comply restricted standard
Expand Down
Loading