1
0
mirror of https://github.com/google/nomulus synced 2026-01-03 11:45:39 +00:00
Files
nomulus/jetty/kubernetes/gateway/nomulus-route-console.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

73 lines
1.3 KiB
YAML

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