123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- 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 }}
|