From da61e34580587f9b2b1cc0da1cd6bfa99a2c6ed8 Mon Sep 17 00:00:00 2001 From: Vegard Hagen Date: Sat, 2 Mar 2024 16:55:05 +0100 Subject: [PATCH] fix(gateway): Create a separate Gateway for Proxmox TLS passthrough --- apps/utility/proxmox/tls-route.yaml | 2 +- infra/gateway/gw-proxmox-euclid.yaml | 22 ++++++++++++++++++++ infra/gateway/kustomization.yaml | 3 ++- infra/net-aux/config/cloudflared/config.yaml | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 infra/gateway/gw-proxmox-euclid.yaml diff --git a/apps/utility/proxmox/tls-route.yaml b/apps/utility/proxmox/tls-route.yaml index 2f6c7f9..7743981 100644 --- a/apps/utility/proxmox/tls-route.yaml +++ b/apps/utility/proxmox/tls-route.yaml @@ -5,7 +5,7 @@ metadata: namespace: proxmox spec: parentRefs: - - name: stonegarden + - name: proxmox-euclid namespace: gateway hostnames: - "proxmox.euclid.stonegarden.dev" diff --git a/infra/gateway/gw-proxmox-euclid.yaml b/infra/gateway/gw-proxmox-euclid.yaml new file mode 100644 index 0000000..c73afc8 --- /dev/null +++ b/infra/gateway/gw-proxmox-euclid.yaml @@ -0,0 +1,22 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: Gateway +metadata: + name: proxmox-euclid + namespace: gateway + annotations: + cert-manager.io/issuer: cloudflare-issuer +spec: + gatewayClassName: cilium + infrastructure: + annotations: + io.cilium/lb-ipam-ips: 192.168.1.173 + listeners: + - protocol: HTTPS + port: 443 + name: proxmox-tls-passthrough + hostname: proxmox.euclid.stonegarden.dev + tls: + mode: Passthrough + allowedRoutes: + namespaces: + from: All \ No newline at end of file diff --git a/infra/gateway/kustomization.yaml b/infra/gateway/kustomization.yaml index d2c054a..acaf526 100644 --- a/infra/gateway/kustomization.yaml +++ b/infra/gateway/kustomization.yaml @@ -7,4 +7,5 @@ resources: - ns.yaml - cloudflare-api-token.yaml - cloudflare-issuer.yaml - - gw-stonegarden.yaml \ No newline at end of file + - gw-stonegarden.yaml + - gw-proxmox-euclid.yaml \ No newline at end of file diff --git a/infra/net-aux/config/cloudflared/config.yaml b/infra/net-aux/config/cloudflared/config.yaml index a18c624..64c5e7e 100644 --- a/infra/net-aux/config/cloudflared/config.yaml +++ b/infra/net-aux/config/cloudflared/config.yaml @@ -12,7 +12,7 @@ ingress: - hostname: ssh.stonegarden.dev service: ssh://192.168.1.50:22 - hostname: proxmox.euclid.stonegarden.dev - service: https://cilium-gateway-stonegarden.gateway.svc.cluster.local:443 + service: https://cilium-gateway-proxmox-euclid.gateway.svc.cluster.local:443 originRequest: originServerName: proxmox.euclid.stonegarden.dev - hostname: haos.stonegarden.dev