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 env: {{- toYaml .Values.env | nindent 12 }} 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: {}