|
|
|
#
|
|
|
|
# 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" . }}-alert
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
|
|
app.kubernetes.io/component: alert
|
|
|
|
spec:
|
|
|
|
replicas: {{ .Values.alert.replicas }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
|
|
app.kubernetes.io/component: alert
|
|
|
|
strategy:
|
|
|
|
type: {{ .Values.alert.strategy.type | quote }}
|
|
|
|
rollingUpdate:
|
|
|
|
maxSurge: {{ .Values.alert.strategy.rollingUpdate.maxSurge | quote }}
|
|
|
|
maxUnavailable: {{ .Values.alert.strategy.rollingUpdate.maxUnavailable | quote }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
|
|
app.kubernetes.io/component: alert
|
|
|
|
{{- if .Values.alert.annotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml .Values.alert.annotations | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
{{- if .Values.alert.affinity }}
|
|
|
|
affinity: {{- toYaml .Values.alert.affinity | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.alert.nodeSelector }}
|
|
|
|
nodeSelector: {{- toYaml .Values.alert.nodeSelector | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.alert.tolerations }}
|
|
|
|
tolerations: {{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.image.pullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
- name: {{ include "dolphinscheduler.image.pullSecrets" . }}
|
|
|
|
{{- end }}
|
|
|
|
containers:
|
|
|
|
- name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
image: {{ include "dolphinscheduler.image.repository" . | quote }}
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
|
args:
|
|
|
|
- "alert-server"
|
|
|
|
env:
|
|
|
|
- name: TZ
|
|
|
|
value: {{ .Values.timezone }}
|
|
|
|
- name: DOLPHINSCHEDULER_OPTS
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: DOLPHINSCHEDULER_OPTS
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: ALERT_PLUGIN_DIR
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: ALERT_PLUGIN_DIR
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: XLS_FILE_PATH
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: XLS_FILE_PATH
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: MAIL_SERVER_HOST
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MAIL_SERVER_HOST
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: MAIL_SERVER_PORT
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MAIL_SERVER_PORT
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: MAIL_SENDER
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MAIL_SENDER
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: MAIL_USER
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MAIL_USER
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: MAIL_PASSWD
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MAIL_PASSWD
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: MAIL_SMTP_STARTTLS_ENABLE
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MAIL_SMTP_STARTTLS_ENABLE
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: MAIL_SMTP_SSL_ENABLE
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MAIL_SMTP_SSL_ENABLE
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: MAIL_SMTP_SSL_TRUST
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: MAIL_SMTP_SSL_TRUST
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: ENTERPRISE_WECHAT_ENABLE
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: ENTERPRISE_WECHAT_ENABLE
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: ENTERPRISE_WECHAT_CORP_ID
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: ENTERPRISE_WECHAT_CORP_ID
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: ENTERPRISE_WECHAT_SECRET
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: ENTERPRISE_WECHAT_SECRET
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: ENTERPRISE_WECHAT_AGENT_ID
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: ENTERPRISE_WECHAT_AGENT_ID
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: ENTERPRISE_WECHAT_USERS
|
|
|
|
valueFrom:
|
|
|
|
configMapKeyRef:
|
|
|
|
key: ENTERPRISE_WECHAT_USERS
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
- name: DATABASE_TYPE
|
|
|
|
{{- if .Values.postgresql.enabled }}
|
|
|
|
value: "postgresql"
|
|
|
|
{{- else }}
|
|
|
|
value: {{ .Values.externalDatabase.type | quote }}
|
|
|
|
{{- end }}
|
|
|
|
- name: DATABASE_DRIVER
|
|
|
|
{{- if .Values.postgresql.enabled }}
|
|
|
|
value: "org.postgresql.Driver"
|
|
|
|
{{- else }}
|
|
|
|
value: {{ .Values.externalDatabase.driver | quote }}
|
|
|
|
{{- end }}
|
|
|
|
- name: DATABASE_HOST
|
|
|
|
{{- if .Values.postgresql.enabled }}
|
|
|
|
value: {{ template "dolphinscheduler.postgresql.fullname" . }}
|
|
|
|
{{- else }}
|
|
|
|
value: {{ .Values.externalDatabase.host | quote }}
|
|
|
|
{{- end }}
|
|
|
|
- name: DATABASE_PORT
|
|
|
|
{{- if .Values.postgresql.enabled }}
|
|
|
|
value: "5432"
|
|
|
|
{{- else }}
|
|
|
|
value: {{ .Values.externalDatabase.port | quote }}
|
|
|
|
{{- end }}
|
|
|
|
- name: DATABASE_USERNAME
|
|
|
|
{{- if .Values.postgresql.enabled }}
|
|
|
|
value: {{ .Values.postgresql.postgresqlUsername }}
|
|
|
|
{{- else }}
|
|
|
|
value: {{ .Values.externalDatabase.username | quote }}
|
|
|
|
{{- end }}
|
|
|
|
- name: DATABASE_PASSWORD
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
{{- if .Values.postgresql.enabled }}
|
|
|
|
name: {{ template "dolphinscheduler.postgresql.fullname" . }}
|
|
|
|
key: postgresql-password
|
|
|
|
{{- else }}
|
|
|
|
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
|
|
|
key: db-password
|
|
|
|
{{- end }}
|
|
|
|
- name: DATABASE_DATABASE
|
|
|
|
{{- if .Values.postgresql.enabled }}
|
|
|
|
value: {{ .Values.postgresql.postgresqlDatabase }}
|
|
|
|
{{- else }}
|
|
|
|
value: {{ .Values.externalDatabase.database | quote }}
|
|
|
|
{{- end }}
|
|
|
|
- name: DATABASE_PARAMS
|
|
|
|
{{- if .Values.postgresql.enabled }}
|
|
|
|
value: "characterEncoding=utf8"
|
|
|
|
{{- else }}
|
|
|
|
value: {{ .Values.externalDatabase.params | quote }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.alert.resources }}
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: {{ .Values.alert.resources.limits.memory }}
|
|
|
|
cpu: {{ .Values.alert.resources.limits.cpu }}
|
|
|
|
requests:
|
|
|
|
memory: {{ .Values.alert.resources.requests.memory }}
|
|
|
|
cpu: {{ .Values.alert.resources.requests.cpu }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.alert.livenessProbe.enabled }}
|
|
|
|
livenessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- /root/checkpoint.sh
|
|
|
|
- AlertServer
|
|
|
|
initialDelaySeconds: {{ .Values.alert.livenessProbe.initialDelaySeconds }}
|
|
|
|
periodSeconds: {{ .Values.alert.livenessProbe.periodSeconds }}
|
|
|
|
timeoutSeconds: {{ .Values.alert.livenessProbe.timeoutSeconds }}
|
|
|
|
successThreshold: {{ .Values.alert.livenessProbe.successThreshold }}
|
|
|
|
failureThreshold: {{ .Values.alert.livenessProbe.failureThreshold }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.alert.readinessProbe.enabled }}
|
|
|
|
readinessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- /root/checkpoint.sh
|
|
|
|
- AlertServer
|
|
|
|
initialDelaySeconds: {{ .Values.alert.readinessProbe.initialDelaySeconds }}
|
|
|
|
periodSeconds: {{ .Values.alert.readinessProbe.periodSeconds }}
|
|
|
|
timeoutSeconds: {{ .Values.alert.readinessProbe.timeoutSeconds }}
|
|
|
|
successThreshold: {{ .Values.alert.readinessProbe.successThreshold }}
|
|
|
|
failureThreshold: {{ .Values.alert.readinessProbe.failureThreshold }}
|
|
|
|
{{- end }}
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: "/opt/dolphinscheduler/logs"
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
volumes:
|
|
|
|
- name: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
{{- if .Values.alert.persistentVolumeClaim.enabled }}
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ include "dolphinscheduler.fullname" . }}-alert
|
|
|
|
{{- else }}
|
|
|
|
emptyDir: {}
|
|
|
|
{{- end }}
|