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

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

61 lines
2.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "danswer-stack.fullname" . }}-webserver
labels:
{{- include "danswer-stack.labels" . | nindent 4 }}
spec:
{{- if not .Values.webserver.autoscaling.enabled }}
replicas: {{ .Values.webserver.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "danswer-stack.selectorLabels" . | nindent 6 }}
{{- if .Values.webserver.deploymentLabels }}
{{- toYaml .Values.webserver.deploymentLabels | nindent 6 }}
{{- end }}
template:
metadata:
{{- with .Values.webserver.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "danswer-stack.labels" . | nindent 8 }}
{{- with .Values.webserver.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "danswer-stack.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.webserver.podSecurityContext | nindent 8 }}
containers:
- name: web-server
securityContext:
{{- toYaml .Values.webserver.securityContext | nindent 12 }}
image: "{{ .Values.webserver.image.repository }}:{{ .Values.webserver.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.webserver.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.webserver.service.port }}
protocol: TCP
resources:
{{- toYaml .Values.webserver.resources | nindent 12 }}
envFrom:
- configMapRef:
name: {{ .Values.config.envConfigMapName }}
env:
{{- include "danswer-stack.envSecrets" . | nindent 12}}
{{- with .Values.webserver.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.webserver.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}