Add base kubernetes support 4

This commit is contained in:
Urtzi Alfaro
2025-09-27 17:19:00 +02:00
parent b2c988b416
commit f246381d34
5 changed files with 22 additions and 40 deletions

View File

@@ -103,7 +103,7 @@ data:
# ================================================================
# CORS & API CONFIGURATION
# ================================================================
CORS_ORIGINS: "http://frontend-service:3000,http://localhost:3000,https://bakery.yourdomain.com"
CORS_ORIGINS: "http://frontend-service:3000,http://localhost:3000,http://bakery-ia.local,https://bakery.yourdomain.com,http://localhost"
CORS_ALLOW_CREDENTIALS: "true"
RATE_LIMIT_ENABLED: "true"
RATE_LIMIT_REQUESTS: "100"
@@ -314,7 +314,7 @@ data:
# ================================================================
VITE_APP_TITLE: "PanIA Dashboard"
VITE_APP_VERSION: "1.0.0"
VITE_API_URL: "http://gateway-service:8000"
VITE_API_URL: "/api"
VITE_ENVIRONMENT: "production"
# ================================================================

View File

@@ -7,12 +7,21 @@ metadata:
app.kubernetes.io/name: bakery-ia
app.kubernetes.io/component: ingress
annotations:
# Kind-specific nginx ingress controller annotations
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, PUT, DELETE, OPTIONS"
nginx.ingress.kubernetes.io/cors-allow-headers: "Content-Type, Authorization"
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
# CORS configuration for local development
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000,http://bakery-ia.local,http://127.0.0.1:3000"
nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, PUT, DELETE, OPTIONS, PATCH"
nginx.ingress.kubernetes.io/cors-allow-headers: "Content-Type, Authorization, X-Requested-With, Accept, Origin"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
spec:
ingressClassName: nginx
rules:

View File

@@ -13,11 +13,11 @@ data:
MOCK_EXTERNAL_APIS: "true"
# CORS Configuration for Development
CORS_ORIGINS: "http://frontend-service:3000,http://localhost:3000,http://localhost:3001,http://127.0.1:3000,http://127.0.0.1:3001,https://localhost,https://127.0.0.1"
CORS_ORIGINS: "http://frontend-service:3000,http://localhost:3000,http://localhost:3001,http://localhost,http://127.0.0.1:3000,http://127.0.0.1:3001,http://bakery-ia.local,https://localhost,https://127.0.0.1"
# Frontend Development Configuration
VITE_ENVIRONMENT: "development"
VITE_API_URL: ""
VITE_API_URL: "/api"
---