{{- if .Values.frontend.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "cloudhost-platform.frontend.fullname" . }} namespace: {{ include "cloudhost-platform.namespace" . }} labels: app: {{ include "cloudhost-platform.frontend.fullname" . }} {{- include "cloudhost-platform.labels" . | nindent 4 }} spec: replicas: {{ .Values.frontend.replicas }} selector: matchLabels: app: {{ include "cloudhost-platform.frontend.fullname" . }} template: metadata: labels: app: {{ include "cloudhost-platform.frontend.fullname" . }} spec: {{- with .Values.frontend.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} containers: - name: frontend image: {{ include "cloudhost-platform.frontendImage" . | quote }} imagePullPolicy: {{ .Values.images.frontend.pullPolicy }} ports: - containerPort: 3000 env: - name: PORT value: "3000" - name: HOSTNAME value: "0.0.0.0" {{- if .Values.ingress.panel.host }} # Host-based separation: landing on frontend.host, authenticated # panel on panel.host. Read by Next.js middleware at runtime. - name: LANDING_HOST value: {{ .Values.ingress.frontend.host | quote }} - name: PANEL_HOST value: {{ .Values.ingress.panel.host | quote }} {{- end }} livenessProbe: httpGet: path: / port: 3000 initialDelaySeconds: 30 periodSeconds: 15 readinessProbe: httpGet: path: / port: 3000 initialDelaySeconds: 10 periodSeconds: 10 {{- with .Values.frontend.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} {{- end }}