117 lines
3.6 KiB
YAML
117 lines
3.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "vikunja.frontendFullname" . }}
|
|
labels:
|
|
{{- include "vikunja.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if not .Values.frontend.autoscaling.enabled }}
|
|
replicas: {{ .Values.frontend.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "vikunja.frontendSelectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.frontend.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "vikunja.frontendSelectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.frontend.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "vikunja.serviceAccountName" . }}
|
|
{{- with .Values.frontend.podSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
initContainers:
|
|
- name: permissions
|
|
image: alpine:3.16.3
|
|
imagePullPolicy: IfNotPresent
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- |-
|
|
cd /var/cache/nginx
|
|
for i in client_temp proxy_temp fastcgi_temp uwsgi_temp csgi_temp scgi_temp; do
|
|
mkdir -p "$i"
|
|
chown -Rv 1000:1000 "$i"
|
|
done
|
|
volumeMounts:
|
|
- name: nginx-cache
|
|
mountPath: /var/cache/nginx
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
{{- with .Values.frontend.securityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
{{- $image := required ".image.repository is not set" .Values.frontend.image.repository }}
|
|
{{- $tag := required ".image.tag is not set" .Values.frontend.image.tag }}
|
|
image: {{ printf "%s:%s" $image $tag | quote }}
|
|
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
env:
|
|
- name: VIKUNJA_API_URL
|
|
value: {{ quote .Values.frontend.apiUrl }}
|
|
- name: VIKUNJA_HTTP_PORT
|
|
value: "8080"
|
|
{{- with .Values.frontend.env }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.frontend.envFrom }}
|
|
envFrom:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.frontend.livenessProbe }}
|
|
livenessProbe:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
{{- with .Values.frontend.readinessProbe }}
|
|
readinessProbe:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
{{- with .Values.frontend.startupProbe }}
|
|
startupProbe:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
{{- with .Values.frontend.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
- name: nginx-cache
|
|
mountPath: /var/cache/nginx
|
|
{{- with .Values.frontend.extraVolumeMounts }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: tmp
|
|
emptyDir: {}
|
|
- name: nginx-cache
|
|
emptyDir: {}
|
|
{{- with .Values.frontend.extraVolumes }}
|
|
{{- toYaml . | nindent 6 }}
|
|
{{- end }}
|
|
{{- with .Values.frontend.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.frontend.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.frontend.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|