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.
116 lines
5.0 KiB
116 lines
5.0 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: Deployment
|
||
|
metadata:
|
||
|
name: {{ include "dolphinscheduler.fullname" . }}-api
|
||
|
labels:
|
||
3 years ago
|
{{- include "dolphinscheduler.api.labels" . | nindent 4 }}
|
||
5 years ago
|
spec:
|
||
|
replicas: {{ .Values.api.replicas }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
3 years ago
|
{{- include "dolphinscheduler.api.labels" . | nindent 6 }}
|
||
5 years ago
|
strategy:
|
||
|
type: {{ .Values.api.strategy.type | quote }}
|
||
|
rollingUpdate:
|
||
|
maxSurge: {{ .Values.api.strategy.rollingUpdate.maxSurge | quote }}
|
||
|
maxUnavailable: {{ .Values.api.strategy.rollingUpdate.maxUnavailable | quote }}
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
3 years ago
|
{{- include "dolphinscheduler.api.labels" . | nindent 8 }}
|
||
|
{{- if .Values.api.annotations }}
|
||
4 years ago
|
annotations:
|
||
3 years ago
|
{{- toYaml .Values.api.annotations | nindent 8 }}
|
||
4 years ago
|
{{- end }}
|
||
5 years ago
|
spec:
|
||
|
{{- if .Values.api.affinity }}
|
||
3 years ago
|
affinity:
|
||
|
{{- toYaml .Values.api.affinity | nindent 8 }}
|
||
5 years ago
|
{{- end }}
|
||
|
{{- if .Values.api.nodeSelector }}
|
||
3 years ago
|
nodeSelector:
|
||
|
{{- toYaml .Values.api.nodeSelector | nindent 8 }}
|
||
5 years ago
|
{{- end }}
|
||
|
{{- if .Values.api.tolerations }}
|
||
3 years ago
|
tolerations:
|
||
|
{{- toYaml .Values.api.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" . }}-api
|
||
4 years ago
|
image: {{ include "dolphinscheduler.image.fullname" . }}
|
||
4 years ago
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
5 years ago
|
args:
|
||
|
- "api-server"
|
||
|
ports:
|
||
|
- containerPort: 12345
|
||
4 years ago
|
name: "api-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" . }}-api
|
||
4 years ago
|
{{- if .Values.api.resources }}
|
||
|
resources:
|
||
3 years ago
|
{{- toYaml .Values.api.resources | nindent 12 }}
|
||
4 years ago
|
{{- end }}
|
||
5 years ago
|
{{- if .Values.api.livenessProbe.enabled }}
|
||
|
livenessProbe:
|
||
3 years ago
|
exec:
|
||
|
command: ["bash", "/root/checkpoint.sh", "ApiApplicationServer"]
|
||
5 years ago
|
initialDelaySeconds: {{ .Values.api.livenessProbe.initialDelaySeconds }}
|
||
|
periodSeconds: {{ .Values.api.livenessProbe.periodSeconds }}
|
||
|
timeoutSeconds: {{ .Values.api.livenessProbe.timeoutSeconds }}
|
||
|
successThreshold: {{ .Values.api.livenessProbe.successThreshold }}
|
||
|
failureThreshold: {{ .Values.api.livenessProbe.failureThreshold }}
|
||
|
{{- end }}
|
||
|
{{- if .Values.api.readinessProbe.enabled }}
|
||
|
readinessProbe:
|
||
3 years ago
|
exec:
|
||
|
command: ["bash", "/root/checkpoint.sh", "ApiApplicationServer"]
|
||
5 years ago
|
initialDelaySeconds: {{ .Values.api.readinessProbe.initialDelaySeconds }}
|
||
|
periodSeconds: {{ .Values.api.readinessProbe.periodSeconds }}
|
||
|
timeoutSeconds: {{ .Values.api.readinessProbe.timeoutSeconds }}
|
||
|
successThreshold: {{ .Values.api.readinessProbe.successThreshold }}
|
||
|
failureThreshold: {{ .Values.api.readinessProbe.failureThreshold }}
|
||
|
{{- end }}
|
||
|
volumeMounts:
|
||
|
- mountPath: "/opt/dolphinscheduler/logs"
|
||
|
name: {{ include "dolphinscheduler.fullname" . }}-api
|
||
3 years ago
|
{{- include "dolphinscheduler.sharedStorage.volumeMount" . | nindent 12 }}
|
||
|
{{- include "dolphinscheduler.fsFileResource.volumeMount" . | nindent 12 }}
|
||
5 years ago
|
volumes:
|
||
|
- name: {{ include "dolphinscheduler.fullname" . }}-api
|
||
|
{{- if .Values.api.persistentVolumeClaim.enabled }}
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "dolphinscheduler.fullname" . }}-api
|
||
|
{{- else }}
|
||
|
emptyDir: {}
|
||
4 years ago
|
{{- end }}
|
||
3 years ago
|
{{- include "dolphinscheduler.sharedStorage.volume" . | nindent 8 }}
|
||
|
{{- include "dolphinscheduler.fsFileResource.volume" . | nindent 8 }}
|