add istio gateway configuration for tls termination
All checks were successful
Mirror to GitHub / mirror (push) Successful in 7s

This commit is contained in:
jona.klaess
2026-06-08 14:26:40 +02:00
parent 3dd6492768
commit ba4825f7ff
3 changed files with 51 additions and 32 deletions

View File

@@ -47,6 +47,25 @@ spec:
type: NodePort
---
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: ptp-chat-gateway
namespace: ptp-chat
spec:
selector:
istio: ingressgateway # Holt sich das Standard-Ingress-Gateway
servers:
- port:
number: 443
name: https-ptpchat
protocol: HTTPS
hosts:
- ptp-chat.k8s.bittehackmichnicht.de
tls:
mode: SIMPLE # TLS-Termination am Gateway, damit der VirtualService den Traffic aufteilen kann
credentialName: istio-cert # Name des TLS-Zertifikats, das im Sealed Secret definiert ist
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: ptp-chat-vs
@@ -54,15 +73,9 @@ metadata:
spec:
hosts:
- ptp-chat.k8s.bittehackmichnicht.de
gateways:
- ptp-chat-gateway
http:
- match:
- uri:
prefix: /
route:
- destination:
host: ptp-chat-frontend.ptp-chat.svc.cluster.local
port:
number: 80
- match:
- uri:
prefix: /api
@@ -73,3 +86,11 @@ spec:
host: ptp-chat-backend.ptp-chat.svc.cluster.local
port:
number: 80
- match:
- uri:
prefix: /
route:
- destination:
host: ptp-chat-frontend.ptp-chat.svc.cluster.local
port:
number: 80