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.
33 lines
874 B
YAML
33 lines
874 B
YAML
# The single entry point for all HTTP(S) traffic. Each app adds an HTTPS
|
|
# listener for its hostname here and an HTTPRoute in its own namespace.
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: Gateway
|
|
metadata:
|
|
name: homelab
|
|
namespace: envoy-gateway-system
|
|
spec:
|
|
gatewayClassName: envoy
|
|
listeners:
|
|
- name: http
|
|
protocol: HTTP
|
|
port: 80
|
|
allowedRoutes:
|
|
namespaces:
|
|
from: All
|
|
# One HTTPS listener per hostname, each limited to its app's namespace.
|
|
# The certificates stay in the app namespaces (ReferenceGrant there).
|
|
- name: https-s2
|
|
protocol: HTTPS
|
|
port: 443
|
|
hostname: s2.rubenhensen.nl
|
|
tls:
|
|
certificateRefs:
|
|
- name: letsencrypt-prod
|
|
namespace: gatus
|
|
allowedRoutes:
|
|
namespaces:
|
|
from: Selector
|
|
selector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: gatus
|