mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-11-15 22:29:09 +01:00
First app on the Gateway API: an HTTPS listener for s2.rubenhensen.nl using the existing certificate in the gatus namespace, an HTTPRoute, and a ReferenceGrant for the certificate. Plain HTTP on the Gateway now redirects to HTTPS. The Ingress stays until the switch-over.
18 lines
440 B
YAML
18 lines
440 B
YAML
# Plain HTTP only redirects to HTTPS. cert-manager's HTTP-01 challenge
|
|
# routes name an exact hostname, so they win over this catch-all.
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: https-redirect
|
|
namespace: envoy-gateway-system
|
|
spec:
|
|
parentRefs:
|
|
- name: homelab
|
|
sectionName: http
|
|
rules:
|
|
- filters:
|
|
- type: RequestRedirect
|
|
requestRedirect:
|
|
scheme: https
|
|
statusCode: 301
|