Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ spec:
imagePullSecrets:
- name: {{ .Values.image.pullSecret }}
{{- end }}
{{- if .Values.worker.initContainers }}
initContainers:
{{- toYaml .Values.worker.initContainers | nindent 8 }}
{{- end }}
containers:
- name: {{ include "dolphinscheduler.fullname" . }}-worker
image: {{ include "dolphinscheduler.image.fullname.worker" . }}
Expand All @@ -83,6 +87,16 @@ spec:
envFrom:
- configMapRef:
name: {{ include "dolphinscheduler.fullname" . }}-common
{{- if .Values.worker.envFromSecret }}
- secretRef:
name: {{ .Values.worker.envFromSecret }}
{{- end }}
{{- if .Values.worker.envFromSecrets }}
{{- range .Values.worker.envFromSecrets }}
- secretRef:
name: {{ . }}
{{- end }}
{{- end }}
{{- if .Values.worker.resources }}
resources:
{{- toYaml .Values.worker.resources | nindent 12 }}
Expand Down Expand Up @@ -123,6 +137,9 @@ spec:
{{- include "dolphinscheduler.sharedStorage.volumeMount" . | nindent 12 }}
{{- include "dolphinscheduler.fsFileResource.volumeMount" . | nindent 12 }}
{{- include "dolphinscheduler.etcd.ssl.volumeMount" . | nindent 12 }}
{{- if .Values.worker.extraVolumeMounts }}
{{- toYaml .Values.worker.extraVolumeMounts | nindent 12 }}
{{- end }}
volumes:
{{- if .Values.worker.persistentVolumeClaim.enabled }}
- name: {{ include "dolphinscheduler.fullname" . }}-worker-data
Expand Down Expand Up @@ -156,6 +173,9 @@ spec:
{{- include "dolphinscheduler.sharedStorage.volume" . | nindent 8 }}
{{- include "dolphinscheduler.fsFileResource.volume" . | nindent 8 }}
{{- include "dolphinscheduler.etcd.ssl.volume" . | nindent 8 }}
{{- if .Values.worker.extraVolumes }}
{{- toYaml .Values.worker.extraVolumes | nindent 8 }}
{{- end }}
{{- if .Values.worker.persistentVolumeClaim.enabled }}
volumeClaimTemplates:
{{- if .Values.worker.persistentVolumeClaim.dataPersistentVolume.enabled }}
Expand Down
32 changes: 32 additions & 0 deletions deploy/kubernetes/dolphinscheduler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,38 @@ worker:
# -- Update strategy
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
#
# -- Direct Secret Mounting
# Mount secrets directly as environment variables
# Single secret
envFromSecret: ""

# Multiple secrets (advanced use cases)
# Use when you have variables distributed across different secrets
# envFromSecrets:
# - "git-sync-secret" # Git synchronization credentials
# - "database-secret" # Database connection details
# - "external-api-secret" # Third-party API keys

# -- Init Container for Advanced Processing
# Use when you need to transform, validate, or prepare configuration files
initContainers: {}
- name: config-processor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good example, but it should not be set as the default value for initcontainers. Instead, it should be treated as a comment.

image: busybox:latest
command:
- /bin/sh
- -c
- |
echo "⚙️ Init startup settings..."
# Create specific starup script for an specific environment settings in worker pods.
# You can use unix variables from secrets
envFrom:
# -- Example secret name for initContainer
- secretRef:
name: git-sync-secret
# -- Example volumeMounts for initContiner
volumeMounts:
- name: shared-config
mountPath: /shared-config
updateStrategy:
type: RollingUpdate
# -- Replicas is the desired number of replicas of the given Template.
Expand Down