You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

74 lines
2.5 KiB

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "textbee.fullname" .}}-web
labels:
app: {{ include "textbee.fullname" .}}-web
{{- include "textbee.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ include "textbee.fullname" .}}-web
template:
metadata:
labels:
app: {{ include "textbee.fullname" .}}-web
spec:
containers:
- name: {{ include "textbee.fullname" .}}-web
image: "{{ .Values.web.image.repository }}:{{ .Values.web.image.tag | default .Chart.AppVersion }}"
ports:
- name: http
containerPort: {{ .Values.web.service.port }}
env:
- name: HOSTNAME
value: 0.0.0.0
{{- if .Values.web.ingress.enabled }}
- name: NEXT_PUBLIC_SITE_URL
value: "https://{{ .Values.globals.domain }}"
{{- end }}
- name: PORT
value: "{{ .Values.web.service.port }}"
- name: NEXT_PUBLIC_API_BASE_URL
value: "http://svc-{{ include "textbee.fullname" .}}-api:{{ .Values.api.service.port }}/api/v1"
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: {{ .Values.globals.mongo_uri.secretName }}
key: {{ .Values.globals.mongo_uri.secretKey }}
envFrom:
- secretRef:
name: {{ .Values.web.envSecretName | default (include "textbee.fullname" .) }}-web-secrets
{{- with .Values.web.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.web.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.web.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}