From c5175b0ea4ade7955ff68ed29295e9ca83ec4028 Mon Sep 17 00:00:00 2001 From: Jason Staack Date: Tue, 17 Mar 2026 18:45:49 -0500 Subject: [PATCH] feat(helm): add frontend deployment and service templates Simple nginx-based deployment serving the React SPA on port 80, no runtime env or volumes required. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../helm/templates/frontend-deployment.yaml | 38 +++++++++++++++++++ .../helm/templates/frontend-service.yaml | 15 ++++++++ 2 files changed, 53 insertions(+) create mode 100644 infrastructure/helm/templates/frontend-deployment.yaml create mode 100644 infrastructure/helm/templates/frontend-service.yaml diff --git a/infrastructure/helm/templates/frontend-deployment.yaml b/infrastructure/helm/templates/frontend-deployment.yaml new file mode 100644 index 0000000..bf845f3 --- /dev/null +++ b/infrastructure/helm/templates/frontend-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "tod.fullname" . }}-frontend + labels: + {{- include "tod.componentLabels" (dict "context" . "component" "frontend") | nindent 4 }} +spec: + replicas: {{ .Values.frontend.replicaCount }} + selector: + matchLabels: + {{- include "tod.componentSelectorLabels" (dict "context" . "component" "frontend") | nindent 6 }} + template: + metadata: + labels: + {{- include "tod.componentSelectorLabels" (dict "context" . "component" "frontend") | nindent 8 }} + spec: + containers: + - name: frontend + image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }}" + imagePullPolicy: {{ .Values.frontend.image.pullPolicy }} + ports: + - name: http + containerPort: 80 + protocol: TCP + livenessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 5 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 3 + periodSeconds: 5 + resources: + {{- toYaml .Values.frontend.resources | nindent 12 }} diff --git a/infrastructure/helm/templates/frontend-service.yaml b/infrastructure/helm/templates/frontend-service.yaml new file mode 100644 index 0000000..9d98808 --- /dev/null +++ b/infrastructure/helm/templates/frontend-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "tod.fullname" . }}-frontend + labels: + {{- include "tod.componentLabels" (dict "context" . "component" "frontend") | nindent 4 }} +spec: + type: ClusterIP + ports: + - name: http + port: {{ .Values.frontend.service.port }} + targetPort: http + protocol: TCP + selector: + {{- include "tod.componentSelectorLabels" (dict "context" . "component" "frontend") | nindent 4 }}