Skip to content

Commit b4d0469

Browse files
feat: migrate ingress from NGINX to Envoy Gateway (#80)
Migrate OLMap backend and frontend from ingress-nginx to Envoy Gateway (Gateway API). - Add `gateway.enabled: true` to both `deploy/backend-values.yaml` and `deploy/frontend-values.yaml` - Disable explicit ingress resources (chart suppresses them when gateway is enabled) - Remove NGINX-specific `configuration-snippet` annotation from frontend > [!IMPORTANT] > Before merging, verify the frontend nginx container image handles SPA routing (`try_files $uri $uri/ /index.html`) internally in its nginx.conf. Closes #62 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Lauri Gates <laurigates@users.noreply.github.com>
1 parent 8916a7a commit b4d0469

2 files changed

Lines changed: 21 additions & 44 deletions

File tree

deploy/backend-values.yaml

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ env:
7777
name: olmap-backend-secrets
7878
key: DJANGO_SECRET_KEY
7979
DJANGO_ALLOWED_HOSTS:
80-
value: "olmap.dataportal.fi,localhost"
80+
value: "olmap-backend.dataportal.fi,localhost"
8181
DJANGO_CORS_ALLOWED_ORIGINS:
82-
value: "https://olmap.dataportal.fi"
82+
value: "https://olmap-frontend.dataportal.fi"
8383
DJANGO_MIGRATE:
8484
value: "true"
8585
# Database configuration (Cloud SQL via proxy with IAM auth)
@@ -95,7 +95,7 @@ env:
9595
value: "olmap-app@fvh-project-containers-etc.iam"
9696
# Frontend URL for CORS and redirects
9797
FRONTEND_ROOT:
98-
value: "https://olmap.dataportal.fi"
98+
value: "https://olmap-frontend.dataportal.fi"
9999
# Admin email
100100
ADMIN_EMAIL:
101101
value: "admin@forumvirium.fi"
@@ -125,29 +125,15 @@ service:
125125
port: 80
126126
targetPort: 8000
127127

128-
# Ingress configuration - API endpoint (same domain as frontend, path-based routing)
129-
ingress:
128+
# Gateway API configuration (Envoy Gateway)
129+
# Replaces ingress-nginx; creates HTTPRoute pointing to shared dataportal-gateway
130+
# Hostname auto-generated as olmap-backend.dataportal.fi from release name
131+
gateway:
130132
enabled: true
131-
className: nginx
132-
annotations:
133-
cert-manager.io/cluster-issuer: "letsencrypt-prod"
134-
hosts:
135-
- host: olmap.dataportal.fi
136-
paths:
137-
- path: /api
138-
pathType: Prefix
139-
- path: /admin
140-
pathType: Prefix
141-
- path: /static
142-
pathType: Prefix
143-
- path: /rest-auth
144-
pathType: Prefix
145-
- path: /accounts
146-
pathType: Prefix
147-
tls:
148-
- hosts:
149-
- olmap.dataportal.fi
150-
secretName: olmap-backend-tls # pragma: allowlist secret
133+
134+
# Ingress configuration - disabled in favour of Gateway API above
135+
ingress:
136+
enabled: false
151137

152138
# Health checks for Django
153139
livenessProbe:

deploy/frontend-values.yaml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,17 @@ service:
3737
port: 80
3838
targetPort: 80
3939

40-
# Ingress configuration - serves the SPA, proxies /api to backend
41-
ingress:
40+
# Gateway API configuration (Envoy Gateway)
41+
# Replaces ingress-nginx; creates HTTPRoute pointing to shared dataportal-gateway
42+
# Hostname auto-generated as olmap-frontend.dataportal.fi from release name
43+
# Note: SPA catch-all routing (try_files $uri $uri/ /index.html) must be handled
44+
# by the nginx container's own nginx.conf - it cannot be delegated to the gateway.
45+
gateway:
4246
enabled: true
43-
className: nginx
44-
annotations:
45-
cert-manager.io/cluster-issuer: "letsencrypt-prod"
46-
# SPA catch-all routing - serve index.html for non-file paths
47-
nginx.ingress.kubernetes.io/configuration-snippet: |
48-
location ~* ^/(?!api|admin|static|rest-auth|accounts|health).*$ {
49-
try_files $uri $uri/ /index.html;
50-
}
51-
hosts:
52-
- host: olmap.dataportal.fi
53-
paths:
54-
- path: /
55-
pathType: Prefix
56-
tls:
57-
- hosts:
58-
- olmap.dataportal.fi
59-
secretName: olmap-frontend-tls # pragma: allowlist secret
47+
48+
# Ingress configuration - disabled in favour of Gateway API above
49+
ingress:
50+
enabled: false
6051

6152
# Health check for nginx
6253
livenessProbe:

0 commit comments

Comments
 (0)