deployment-dolphinscheduler-frontend.yaml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to You under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. apiVersion: apps/v1
  18. kind: Deployment
  19. metadata:
  20. name: {{ include "dolphinscheduler.fullname" . }}-frontend
  21. labels:
  22. app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-frontend
  23. app.kubernetes.io/instance: {{ .Release.Name }}
  24. app.kubernetes.io/managed-by: {{ .Release.Service }}
  25. app.kubernetes.io/component: frontend
  26. spec:
  27. replicas: {{ .Values.frontend.replicas }}
  28. selector:
  29. matchLabels:
  30. app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-frontend
  31. app.kubernetes.io/instance: {{ .Release.Name }}
  32. app.kubernetes.io/managed-by: {{ .Release.Service }}
  33. app.kubernetes.io/component: frontend
  34. strategy:
  35. type: {{ .Values.frontend.strategy.type | quote }}
  36. rollingUpdate:
  37. maxSurge: {{ .Values.frontend.strategy.rollingUpdate.maxSurge | quote }}
  38. maxUnavailable: {{ .Values.frontend.strategy.rollingUpdate.maxUnavailable | quote }}
  39. template:
  40. metadata:
  41. labels:
  42. app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-frontend
  43. app.kubernetes.io/instance: {{ .Release.Name }}
  44. app.kubernetes.io/managed-by: {{ .Release.Service }}
  45. app.kubernetes.io/component: frontend
  46. spec:
  47. {{- if .Values.frontend.affinity }}
  48. affinity: {{- toYaml .Values.frontend.affinity | nindent 8 }}
  49. {{- end }}
  50. {{- if .Values.frontend.nodeSelector }}
  51. nodeSelector: {{- toYaml .Values.frontend.nodeSelector | nindent 8 }}
  52. {{- end }}
  53. {{- if .Values.frontend.tolerations }}
  54. tolerations: {{- toYaml . | nindent 8 }}
  55. {{- end }}
  56. containers:
  57. - name: {{ include "dolphinscheduler.fullname" . }}-frontend
  58. image: {{ include "dolphinscheduler.image.repository" . | quote }}
  59. args:
  60. - "frontend"
  61. ports:
  62. - containerPort: 8888
  63. name: tcp-port
  64. imagePullPolicy: {{ .Values.image.pullPolicy }}
  65. env:
  66. - name: TZ
  67. value: {{ .Values.timezone }}
  68. - name: FRONTEND_API_SERVER_HOST
  69. value: '{{ include "dolphinscheduler.fullname" . }}-api'
  70. - name: FRONTEND_API_SERVER_PORT
  71. value: "12345"
  72. {{- if .Values.frontend.livenessProbe.enabled }}
  73. livenessProbe:
  74. tcpSocket:
  75. port: 8888
  76. initialDelaySeconds: {{ .Values.frontend.livenessProbe.initialDelaySeconds }}
  77. periodSeconds: {{ .Values.frontend.livenessProbe.periodSeconds }}
  78. timeoutSeconds: {{ .Values.frontend.livenessProbe.timeoutSeconds }}
  79. successThreshold: {{ .Values.frontend.livenessProbe.successThreshold }}
  80. failureThreshold: {{ .Values.frontend.livenessProbe.failureThreshold }}
  81. {{- end }}
  82. {{- if .Values.frontend.readinessProbe.enabled }}
  83. readinessProbe:
  84. tcpSocket:
  85. port: 8888
  86. initialDelaySeconds: {{ .Values.frontend.readinessProbe.initialDelaySeconds }}
  87. periodSeconds: {{ .Values.frontend.readinessProbe.periodSeconds }}
  88. timeoutSeconds: {{ .Values.frontend.readinessProbe.timeoutSeconds }}
  89. successThreshold: {{ .Values.frontend.readinessProbe.successThreshold }}
  90. failureThreshold: {{ .Values.frontend.readinessProbe.failureThreshold }}
  91. {{- end }}
  92. volumeMounts:
  93. - mountPath: "/var/log/nginx"
  94. name: {{ include "dolphinscheduler.fullname" . }}-frontend
  95. volumes:
  96. - name: {{ include "dolphinscheduler.fullname" . }}-frontend
  97. {{- if .Values.frontend.persistentVolumeClaim.enabled }}
  98. persistentVolumeClaim:
  99. claimName: {{ include "dolphinscheduler.fullname" . }}-frontend
  100. {{- else }}
  101. emptyDir: {}
  102. {{- end }}