Skip to content

Commit

Permalink
Use Ingress for wss:// connections
Browse files Browse the repository at this point in the history
  • Loading branch information
levaitamas committed Oct 8, 2024
1 parent 941ae7b commit 6394862
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
cd webapp
docker build \
--tag docker.io/levaitamas/webrtc-observer-webapp \
--build-arg host="wss://webrtc-observer.org:9081" \
--build-arg host="wss://webrtc-observer.org:443" \
.
cd ../media-server
docker build \
Expand Down
6 changes: 3 additions & 3 deletions charts/webrtc-observer-org/templates/mediaserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ metadata:
labels:
app: mediaserver
spec:
type: LoadBalancer
loadBalancerIP: {{ .Values.publicIP }}
type: ClusterIP
ports:
- port: 9081
- port: 443
targetPort: 9081
protocol: TCP
name: mediaserver-ws
selector:
Expand Down
39 changes: 19 additions & 20 deletions charts/webrtc-observer-org/templates/webapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,29 @@ metadata:
annotations:
kubernetes.io/ingress.global-static-ip-name: webrtc-observer-org
cert-manager.io/cluster-issuer: letsencrypt-prod
# nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
# nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
# nginx.org/websocket-services: "mediaserver-ws"
nginx.ingress.kubernetes.io/force-ssl-redirect: "false"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.org/websocket-services: "mediaserver-ws"
spec:
ingressClassName: nginx
tls:
- hosts:
- {{ .Values.domain }}
secretName: webapp-tls
defaultBackend:
service:
name: webapp
port:
number: 80
rules:
- host: {{ .Values.domain }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: webapp
port:
number: 80
# - path: /
# pathType: Prefix
# backend:
# service:
# name: mediaserver-ws
# port:
# number: 9081
- host: {{ .Values.domain }}
http:
paths:
- path: /*
pathType: ImplementationSpecific
backend:
service:
name: mediaserver-ws
port:
number: 443

0 comments on commit 6394862

Please sign in to comment.