- Add libs/frontend crate: build.rs runs pnpm build, copies dist/ to
OUT_DIR/dist_blobs/, generates frontend.rs with lazy_static! map
- libs/api/dist.rs serves embedded assets via serve_frontend handler
- Register /{path:.*} SPA fallback in route.rs (after /api/*)
- Remove frontend container from deploy: docker/frontend.Dockerfile,
deploy/templates/frontend-*.yaml, values.yaml frontend section
- Update ingress: gitdata.ai root now routes to app service
- Update scripts: build.js removes frontend step, deploy.js removes frontend
82 lines
2.3 KiB
YAML
82 lines
2.3 KiB
YAML
{{- /* Single unified Ingress for all services */ -}}
|
|
{{- $fullName := include "gitdata.fullname" . -}}
|
|
{{- $ns := include "gitdata.namespace" . -}}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ $fullName }}-ingress
|
|
namespace: {{ $ns }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ $fullName }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: cloudflare-acme-cluster-issuer
|
|
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
|
spec:
|
|
ingressClassName: nginx
|
|
tls:
|
|
- hosts:
|
|
- gitdata.ai
|
|
- api.gitdata.ai
|
|
- git.gitdata.ai
|
|
- static.gitdata.ai
|
|
secretName: {{ $fullName }}-tls
|
|
rules:
|
|
# SPA (embedded in app), with /api and /ws
|
|
- host: gitdata.ai
|
|
http:
|
|
paths:
|
|
- path: /api
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ $fullName }}-app
|
|
port:
|
|
number: {{ .Values.app.service.port }}
|
|
- path: /ws
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ $fullName }}-app
|
|
port:
|
|
number: {{ .Values.app.service.port }}
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ $fullName }}-app
|
|
port:
|
|
number: {{ .Values.app.service.port }}
|
|
- host: api.gitdata.ai
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ $fullName }}-app
|
|
port:
|
|
number: {{ .Values.app.service.port }}
|
|
- host: git.gitdata.ai
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ $fullName }}-gitserver-http
|
|
port:
|
|
number: {{ .Values.gitserver.service.http.port }}
|
|
- host: static.gitdata.ai
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ $fullName }}-static
|
|
port:
|
|
number: {{ .Values.static.service.port }}
|