Clay Rosenthal 0ea257d030
adding secrets to helm (#1541)
* adding secrets to helm

* incrementing chart version
2024-05-31 19:11:36 -07:00

77 lines
2.9 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "danswer-stack.fullname" . }}-background
labels:
{{- include "danswer-stack.labels" . | nindent 4 }}
spec:
{{- if not .Values.background.autoscaling.enabled }}
replicas: {{ .Values.background.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "danswer-stack.selectorLabels" . | nindent 6 }}
{{- if .Values.background.deploymentLabels }}
{{- toYaml .Values.background.deploymentLabels | nindent 6 }}
{{- end }}
template:
metadata:
{{- with .Values.background.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "danswer-stack.labels" . | nindent 8 }}
{{- with .Values.background.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "danswer-stack.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.background.podSecurityContext | nindent 8 }}
containers:
- name: background
securityContext:
{{- toYaml .Values.background.securityContext | nindent 12 }}
image: "{{ .Values.background.image.repository }}:{{ .Values.background.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.background.image.pullPolicy }}
command: ["/usr/bin/supervisord"]
resources:
{{- toYaml .Values.background.resources | nindent 12 }}
envFrom:
- configMapRef:
name: {{ .Values.config.envConfigMapName }}
env:
- name: ENABLE_MINI_CHUNK
value: "{{ .Values.background.enableMiniChunk }}"
{{- include "danswer-stack.envSecrets" . | nindent 12}}
volumeMounts:
- name: dynamic-storage
mountPath: /home/storage
- name: connector-storage
mountPath: /home/file_connector_storage
{{- if .Values.background.volumeMounts }}
{{- .Values.background.volumeMounts | toYaml | nindent 12}}
{{- end }}
volumes:
- name: dynamic-storage
{{- if .Values.persistence.background.dynamic.enabled }}
persistentVolumeClaim:
claimName: {{ include "danswer-stack.fullname" . }}-bg-dynamic
{{- else }}
emptyDir: { }
{{- end }}
- name: connector-storage
{{- if .Values.persistence.background.connector.enabled }}
persistentVolumeClaim:
claimName: {{ include "danswer-stack.fullname" . }}-bg-connector
{{- else }}
emptyDir: { }
{{- end }}
{{- if .Values.background.volumes }}
{{- .Values.background.volumes | toYaml | nindent 8}}
{{- end }}