gui/charts/nebulous-gui/templates/deployment.yaml
Radosław Piliszek b9c077c46d Adapt chart to use the correct images
Change-Id: Ibb29d9eaf8e35a08ac081f752aa73916ee1c734b
2024-02-06 18:51:27 +01:00

85 lines
2.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "nebulous-gui.fullname" . }}
labels:
{{- include "nebulous-gui.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "nebulous-gui.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "nebulous-gui.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "nebulous-gui.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: {{ .Chart.Name }}-builder
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.builderImage.repository }}:{{ .Values.builderImage.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.builderImage.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
command:
- npx
- vite
- build
volumeMounts:
- name: static-files
mountPath: /app/dist
env:
{{- toYaml .Values.builderEnv | nindent 12 }}
containers:
- name: {{ .Chart.Name }}-server
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.serverImage.repository }}:{{ .Values.serverImage.tag }}"
imagePullPolicy: {{ .Values.serverImage.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: static-files
mountPath: /usr/share/nginx/html
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: static-files
emptyDir: {}