mirror of
https://github.com/google/nomulus
synced 2026-01-07 14:05:44 +00:00
This opens up port 80 on the load balancer IP and upgrades all HTTP request to HTTPS. TESTED=tested on alpha.
40 lines
733 B
YAML
40 lines
733 B
YAML
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: nomulus
|
|
spec:
|
|
gatewayClassName: gke-l7-global-external-managed-mc
|
|
listeners:
|
|
- name: http
|
|
protocol: HTTP
|
|
port: 80
|
|
allowedRoutes:
|
|
kinds:
|
|
- kind: HTTPRoute
|
|
- name: https
|
|
protocol: HTTPS
|
|
port: 443
|
|
tls:
|
|
mode: Terminate
|
|
options:
|
|
networking.gke.io/pre-shared-certs: nomulus
|
|
allowedRoutes:
|
|
kinds:
|
|
- kind: HTTPRoute
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: redirect
|
|
spec:
|
|
parentRefs:
|
|
- kind: Gateway
|
|
name: nomulus
|
|
sectionName: http
|
|
rules:
|
|
- filters:
|
|
- type: RequestRedirect
|
|
requestRedirect:
|
|
scheme: https
|
|
|