You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
5.5 KiB
128 lines
5.5 KiB
5 years ago
|
#
|
||
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||
|
# contributor license agreements. See the NOTICE file distributed with
|
||
|
# this work for additional information regarding copyright ownership.
|
||
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||
|
# (the "License"); you may not use this file except in compliance with
|
||
|
# the License. You may obtain a copy of the License at
|
||
|
#
|
||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||
|
#
|
||
|
# Unless required by applicable law or agreed to in writing, software
|
||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
# See the License for the specific language governing permissions and
|
||
|
# limitations under the License.
|
||
|
#
|
||
|
apiVersion: apps/v1
|
||
|
kind: StatefulSet
|
||
|
metadata:
|
||
|
name: {{ include "dolphinscheduler.fullname" . }}-master
|
||
|
labels:
|
||
3 years ago
|
{{- include "dolphinscheduler.master.labels" . | nindent 4 }}
|
||
5 years ago
|
spec:
|
||
|
podManagementPolicy: {{ .Values.master.podManagementPolicy }}
|
||
|
replicas: {{ .Values.master.replicas }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
3 years ago
|
{{- include "dolphinscheduler.master.labels" . | nindent 6 }}
|
||
5 years ago
|
serviceName: {{ template "dolphinscheduler.fullname" . }}-master-headless
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
3 years ago
|
{{- include "dolphinscheduler.master.labels" . | nindent 8 }}
|
||
|
{{- if .Values.master.annotations }}
|
||
4 years ago
|
annotations:
|
||
3 years ago
|
{{- toYaml .Values.master.annotations | nindent 8 }}
|
||
4 years ago
|
{{- end }}
|
||
5 years ago
|
spec:
|
||
|
{{- if .Values.master.affinity }}
|
||
3 years ago
|
affinity:
|
||
|
{{- toYaml .Values.master.affinity | nindent 8 }}
|
||
5 years ago
|
{{- end }}
|
||
|
{{- if .Values.master.nodeSelector }}
|
||
3 years ago
|
nodeSelector:
|
||
|
{{- toYaml .Values.master.nodeSelector | nindent 8 }}
|
||
5 years ago
|
{{- end }}
|
||
|
{{- if .Values.master.tolerations }}
|
||
3 years ago
|
tolerations:
|
||
|
{{- toYaml .Values.master.tolerations | nindent 8 }}
|
||
5 years ago
|
{{- end }}
|
||
4 years ago
|
{{- if .Values.image.pullSecret }}
|
||
4 years ago
|
imagePullSecrets:
|
||
4 years ago
|
- name: {{ .Values.image.pullSecret }}
|
||
4 years ago
|
{{- end }}
|
||
5 years ago
|
containers:
|
||
|
- name: {{ include "dolphinscheduler.fullname" . }}-master
|
||
4 years ago
|
image: {{ include "dolphinscheduler.image.fullname" . }}
|
||
4 years ago
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
5 years ago
|
args:
|
||
|
- "master-server"
|
||
|
ports:
|
||
3 years ago
|
- containerPort: 5678
|
||
4 years ago
|
name: "master-port"
|
||
5 years ago
|
env:
|
||
|
- name: TZ
|
||
|
value: {{ .Values.timezone }}
|
||
3 years ago
|
{{- include "dolphinscheduler.database.env_vars" . | nindent 12 }}
|
||
3 years ago
|
{{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }}
|
||
3 years ago
|
{{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }}
|
||
|
envFrom:
|
||
|
- configMapRef:
|
||
|
name: {{ include "dolphinscheduler.fullname" . }}-common
|
||
|
- configMapRef:
|
||
|
name: {{ include "dolphinscheduler.fullname" . }}-master
|
||
4 years ago
|
{{- if .Values.master.resources }}
|
||
|
resources:
|
||
3 years ago
|
{{- toYaml .Values.master.resources | nindent 12 }}
|
||
4 years ago
|
{{- end }}
|
||
5 years ago
|
{{- if .Values.master.livenessProbe.enabled }}
|
||
|
livenessProbe:
|
||
|
exec:
|
||
3 years ago
|
command: ["bash", "/root/checkpoint.sh", "MasterServer"]
|
||
5 years ago
|
initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }}
|
||
|
periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }}
|
||
|
timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }}
|
||
|
successThreshold: {{ .Values.master.livenessProbe.successThreshold }}
|
||
|
failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }}
|
||
|
{{- end }}
|
||
|
{{- if .Values.master.readinessProbe.enabled }}
|
||
|
readinessProbe:
|
||
|
exec:
|
||
3 years ago
|
command: ["bash", "/root/checkpoint.sh", "MasterServer"]
|
||
5 years ago
|
initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }}
|
||
|
periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }}
|
||
|
timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }}
|
||
|
successThreshold: {{ .Values.master.readinessProbe.successThreshold }}
|
||
|
failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }}
|
||
|
{{- end }}
|
||
|
volumeMounts:
|
||
|
- mountPath: "/opt/dolphinscheduler/logs"
|
||
|
name: {{ include "dolphinscheduler.fullname" . }}-master
|
||
3 years ago
|
{{- include "dolphinscheduler.sharedStorage.volumeMount" . | nindent 12 }}
|
||
5 years ago
|
volumes:
|
||
|
- name: {{ include "dolphinscheduler.fullname" . }}-master
|
||
|
{{- if .Values.master.persistentVolumeClaim.enabled }}
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "dolphinscheduler.fullname" . }}-master
|
||
|
{{- else }}
|
||
|
emptyDir: {}
|
||
|
{{- end }}
|
||
3 years ago
|
{{- include "dolphinscheduler.sharedStorage.volume" . | nindent 8 }}
|
||
5 years ago
|
{{- if .Values.master.persistentVolumeClaim.enabled }}
|
||
|
volumeClaimTemplates:
|
||
|
- metadata:
|
||
|
name: {{ include "dolphinscheduler.fullname" . }}-master
|
||
|
labels:
|
||
|
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-master
|
||
3 years ago
|
{{- include "dolphinscheduler.common.labels" . | nindent 10 }}
|
||
5 years ago
|
spec:
|
||
|
accessModes:
|
||
3 years ago
|
{{- range .Values.master.persistentVolumeClaim.accessModes }}
|
||
5 years ago
|
- {{ . | quote }}
|
||
3 years ago
|
{{- end }}
|
||
5 years ago
|
storageClassName: {{ .Values.master.persistentVolumeClaim.storageClassName | quote }}
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: {{ .Values.master.persistentVolumeClaim.storage | quote }}
|
||
4 years ago
|
{{- end }}
|