Files
sova-deploy/apps/backend/templates/_console.tpl
T

82 lines
2.1 KiB
Smarty

{{- define "backend.consolePodSpec" -}}
restartPolicy: OnFailure
{{- with .root.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 2 }}
{{- end }}
containers:
- name: console
image: "{{ .root.Values.image.repository }}:{{ .root.Values.image.tag }}"
imagePullPolicy: {{ .root.Values.image.pullPolicy }}
command: {{ .job.command | toJson }}
envFrom:
- secretRef:
name: backend-env
env:
- name: JWT_SECRET_KEY
value: /app/config/jwt/private.pem
- name: JWT_PUBLIC_KEY
value: /app/config/jwt/public.pem
{{- range $key, $val := .root.Values.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
volumeMounts:
- name: jwt-keys
mountPath: /app/config/jwt
readOnly: true
- name: var-cache
mountPath: /app/var/cache
- name: var-log
mountPath: /app/var/log
volumes:
- name: jwt-keys
secret:
secretName: backend-jwt
- name: var-cache
emptyDir: {}
- name: var-log
emptyDir: {}
{{- end -}}
{{- define "backend.migratePodSpec" -}}
restartPolicy: Never
{{- with .root.Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 2 }}
{{- end }}
containers:
- name: migrate
image: "{{ .root.Values.image.repository }}:{{ .root.Values.image.tag }}"
imagePullPolicy: {{ .root.Values.image.pullPolicy }}
command: ["php", "bin/console", "doctrine:migrations:migrate", "--no-interaction"]
envFrom:
- secretRef:
name: backend-env
env:
- name: JWT_SECRET_KEY
value: /app/config/jwt/private.pem
- name: JWT_PUBLIC_KEY
value: /app/config/jwt/public.pem
{{- range $key, $val := .root.Values.env }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
volumeMounts:
- name: jwt-keys
mountPath: /app/config/jwt
readOnly: true
- name: var-cache
mountPath: /app/var/cache
- name: var-log
mountPath: /app/var/log
volumes:
- name: jwt-keys
secret:
secretName: backend-jwt
- name: var-cache
emptyDir: {}
- name: var-log
emptyDir: {}
{{- end -}}