1
0
mirror of https://github.com/google/nomulus synced 2026-01-06 13:36:48 +00:00
Files
nomulus/jetty/kubernetes/gateway/nomulus-route-frontend.yaml
Lai Jiang 6f7ae1eabc Redirect HTTP to HTTPS (#2679)
This opens up port 80 on the load balancer IP and upgrades all HTTP
request to HTTPS.

TESTED=tested on alpha.
2025-02-18 16:57:18 +00:00

64 lines
1.2 KiB
YAML

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: frontend
spec:
parentRefs:
- kind: Gateway
name: nomulus
sectionName: https
hostnames:
- "frontend.BASE_DOMAIN"
rules:
- matches:
- path:
type: PathPrefix
value: /_dr/epp
backendRefs:
- group: net.gke.io
kind: ServiceImport
name: frontend
port: 80
- matches:
- path:
type: PathPrefix
value: /_dr/epp
headers:
- name: "canary"
value: "true"
backendRefs:
- group: net.gke.io
kind: ServiceImport
name: frontend-canary
port: 80
---
apiVersion: networking.gke.io/v1
kind: HealthCheckPolicy
metadata:
name: frontend
spec:
default:
config:
type: HTTP
httpHealthCheck:
requestPath: /healthz/
targetRef:
group: net.gke.io
kind: ServiceImport
name: frontend
---
apiVersion: networking.gke.io/v1
kind: HealthCheckPolicy
metadata:
name: frontend-canary
spec:
default:
config:
type: HTTP
httpHealthCheck:
requestPath: /healthz/
targetRef:
group: net.gke.io
kind: ServiceImport
name: frontend-canary