apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Release.Name }}-backend-af labels: tier: aihub-dag component: backendaf release: {{ .Release.Name }} spec: replicas: {{ .Values.backendaf.replicas | default 1 }} selector: matchLabels: tier: aihub-dag component: backendaf release: {{ .Release.Name }} template: metadata: {{- with .Values.backendaf.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: tier: aihub-dag component: backendaf release: {{ .Release.Name }} date: "{{ now | unixEpoch }}" spec: {{- with .Values.backendaf.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.backendaf.podSecurityContext | nindent 8 }} containers: - name: {{ .Release.Name }}-backendaf env: - name: APP_ENV value: {{ .Values.backendaf.appEnv }} - name: APP_PREFIX value: af securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.backendaf.image.repository }}:{{ .Values.backendaf.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.backendaf.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.backendaf.service.port }} protocol: TCP volumeMounts: - name: airflow-logs mountPath: /logs - name: airflow-dags mountPath: /dags subPath: repo livenessProbe: initialDelaySeconds: 30 periodSeconds: 5 timeoutSeconds: 5 failureThreshold: 3 successThreshold: 1 httpGet: path: /af/ping port: http readinessProbe: initialDelaySeconds: 30 periodSeconds: 5 timeoutSeconds: 5 failureThreshold: 3 successThreshold: 1 httpGet: path: /af/ping port: http resources: {{- toYaml .Values.backendaf.resources | nindent 12 }} volumes: - name: airflow-dags persistentVolumeClaim: claimName: airflow-dags - name: airflow-logs persistentVolumeClaim: claimName: airflow-logs # livenessProbe: # httpGet: # path: / # port: http # readinessProbe: # httpGet: # path: / # port: http {{- with .Values.backendaf.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.backendaf.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.backendaf.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}