Skip to content

Commit

Permalink
Add public-samples/benchmarks-website-27dn3k/infrastructure/kubernete…
Browse files Browse the repository at this point in the history
…s/staging/ingress.yaml
  • Loading branch information
dforwardfeed committed Dec 29, 2024
1 parent 44a436d commit 4c073e9
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions infrastructure/kubernetes/staging/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: saas-benchmarks-ingress
namespace: staging
labels:
app: saas-benchmarks
environment: staging
component: ingress
annotations:
# Ingress controller configuration
kubernetes.io/ingress.class: "nginx"

# SSL/TLS configuration
nginx.ingress.kubernetes.io/ssl-redirect: "true"

# Request size and timeout configurations
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
nginx.ingress.kubernetes.io/proxy-read-timeout: "60"
nginx.ingress.kubernetes.io/proxy-send-timeout: "60"
nginx.ingress.kubernetes.io/proxy-idle-timeout: "60"

# CORS configuration
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-origin: "https://staging.saas-benchmarks.com"
nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, PUT, DELETE, OPTIONS"
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization"

# SSL Certificate management
cert-manager.io/cluster-issuer: "letsencrypt-staging"

# Monitoring
prometheus.io/scrape: "true"
prometheus.io/port: "10254"

spec:
tls:
- hosts:
- staging.saas-benchmarks.com
- api-staging.saas-benchmarks.com
secretName: saas-benchmarks-tls-staging

rules:
# Web Frontend Rules
- host: staging.saas-benchmarks.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: saas-benchmarks-web
port:
number: 80
- path: /health
pathType: Exact
backend:
service:
name: saas-benchmarks-web
port:
number: 80

# API Backend Rules
- host: api-staging.saas-benchmarks.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: saas-benchmarks-api
port:
number: 3000
- path: /api/health
pathType: Exact
backend:
service:
name: saas-benchmarks-api
port:
number: 3000

0 comments on commit 4c073e9

Please sign in to comment.