1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-20 04:23:16 +00:00
Files
xslt-lab/charts/xslt-playground/templates/backend-deployment.yaml
T

53 lines
1.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "xslt-playground.fullname" . }}-backend
labels:
{{- include "xslt-playground.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount.backend }}
selector:
matchLabels:
{{- include "xslt-playground.selectorLabels" . | nindent 6 }}
component: backend
template:
metadata:
labels:
{{- include "xslt-playground.selectorLabels" . | nindent 8 }}
component: backend
spec:
containers:
- name: backend
image: "{{ .Values.image.backend.repository }}:{{ .Values.image.backend.tag }}"
imagePullPolicy: {{ .Values.image.backend.pullPolicy }}
env:
{{- if .Values.storage.enabled }}
- name: DATABASE_URL
value: {{ .Values.storage.databaseUrl | quote }}
{{- else }}
- name: DISABLE_DATABASE
value: "true"
{{- end }}
{{- if .Values.firebase.enabled }}
- name: GOOGLE_APPLICATION_CREDENTIALS
value: {{ printf "%s/%s" .Values.firebase.credentialsMountPath .Values.firebase.credentialsKey | quote }}
{{- end }}
volumeMounts:
{{- if .Values.firebase.enabled }}
- name: firebase
mountPath: {{ .Values.firebase.credentialsMountPath }}
readOnly: true
{{- end }}
ports:
- containerPort: {{ .Values.service.backend.port }}
{{- if .Values.firebase.enabled }}
volumes:
- name: firebase
secret:
secretName: {{ .Values.firebase.secretName }}
items:
- key: {{ .Values.firebase.credentialsKey }}
path: {{ .Values.firebase.credentialsKey }}
{{- end }}