apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "invy.fullname" . }}-frontend labels: {{- include "invy.labels" . | nindent 4 }} app.kubernetes.io/component: frontend spec: replicas: {{ .Values.frontend.replicaCount }} selector: matchLabels: {{- include "invy.selectorLabels" . | nindent 6 }} app.kubernetes.io/component: frontend template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "invy.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: frontend spec: {{- with .Values.global.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "invy.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: frontend securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.frontend.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.frontend.service.targetPort }} protocol: TCP {{- if .Values.frontend.env }} env: {{- range $key, $value := .Values.frontend.env }} - name: {{ $key }} value: {{ $value | quote }} {{- end }} - name: VITE_ADMIN_USERNAME value: {{ .Values.frontend.adminUsername | quote }} - name: VITE_ADMIN_PASSWORD value: {{ .Values.frontend.adminPassword | quote }} {{- end }} livenessProbe: httpGet: path: / port: http initialDelaySeconds: 30 periodSeconds: 10 readinessProbe: httpGet: path: / port: http initialDelaySeconds: 10 periodSeconds: 5 resources: {{- toYaml .Values.frontend.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}