Some checks failed
Build / Code Quality Checks (push) Successful in 15m11s
Build / Build & Push Docker Images (worker) (push) Successful in 13m44s
Build / Build & Push Docker Images (frontend) (push) Successful in 5m8s
Build / Build & Push Docker Images (chat) (push) Failing after 30m7s
Build / Build & Push Docker Images (api) (push) Failing after 21m39s
95 lines
3.3 KiB
YAML
95 lines
3.3 KiB
YAML
{{- if .Values.chat.enabled }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "datacenter-docs.chat.fullname" . }}
|
|
labels:
|
|
{{- include "datacenter-docs.chat.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.chat.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "datacenter-docs.chat.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "datacenter-docs.chat.selectorLabels" . | nindent 8 }}
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
|
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
|
{{- with .Values.podAnnotations }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.global.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "datacenter-docs.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
initContainers:
|
|
- name: wait-for-mongodb
|
|
image: busybox:1.36
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
until nc -z {{ include "datacenter-docs.mongodb.fullname" . }} {{ .Values.mongodb.service.port }}; do
|
|
echo "Waiting for MongoDB..."
|
|
sleep 2
|
|
done
|
|
containers:
|
|
- name: chat
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.chat.image.repository }}:{{ .Values.chat.image.tag }}"
|
|
imagePullPolicy: {{ .Values.chat.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.chat.service.targetPort }}
|
|
protocol: TCP
|
|
env:
|
|
- name: MONGODB_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "datacenter-docs.fullname" . }}-config
|
|
key: mongodb-url
|
|
- name: LLM_BASE_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "datacenter-docs.fullname" . }}-config
|
|
key: llm-base-url
|
|
- name: LLM_MODEL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "datacenter-docs.fullname" . }}-config
|
|
key: llm-model
|
|
- name: LLM_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "datacenter-docs.fullname" . }}-secrets
|
|
key: llm-api-key
|
|
- name: LOG_LEVEL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ include "datacenter-docs.fullname" . }}-config
|
|
key: log-level
|
|
- name: PYTHONPATH
|
|
value: "/app/src"
|
|
resources:
|
|
{{- toYaml .Values.chat.resources | nindent 12 }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|