Added WebSocket support configuration to both oauth2-proxy and Traefik ingress: - Enable explicit WebSocket proxying in oauth2-proxy (--proxy-websockets=true) - Pass Host header through oauth2-proxy (--pass-host-header=true) - Add WebSocket upgrade headers to Traefik ingress annotations This fixes the "UI cannot connect to API" error by ensuring real-time log streaming WebSocket connections work through the authentication proxy. Co-Authored-By: Paperclip <noreply@paperclip.ing>
100 lines
2.6 KiB
YAML
100 lines
2.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: dozzle
|
|
namespace: dozzle
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: dozzle
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: dozzle
|
|
spec:
|
|
serviceAccountName: dozzle
|
|
containers:
|
|
- name: dozzle
|
|
image: amir20/dozzle:latest
|
|
ports:
|
|
- containerPort: 8080
|
|
name: dozzle-http
|
|
protocol: TCP
|
|
env:
|
|
- name: DOZZLE_MODE
|
|
value: "k8s"
|
|
- name: DOZZLE_LEVEL
|
|
value: "info"
|
|
- name: DOZZLE_AUTH_PROVIDER
|
|
value: "forward-proxy"
|
|
- name: DOZZLE_AUTH_HEADER_USER
|
|
value: "X-Forwarded-User"
|
|
- name: DOZZLE_AUTH_HEADER_EMAIL
|
|
value: "X-Forwarded-Email"
|
|
- name: DOZZLE_AUTH_HEADER_NAME
|
|
value: "X-Forwarded-Preferred-Username"
|
|
- name: DOZZLE_NO_ANALYTICS
|
|
value: "true"
|
|
volumeMounts:
|
|
- name: dozzle-data
|
|
mountPath: /data
|
|
resources:
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
- name: oauth2-proxy
|
|
image: quay.io/oauth2-proxy/oauth2-proxy:latest
|
|
ports:
|
|
- containerPort: 4180
|
|
name: http
|
|
protocol: TCP
|
|
args:
|
|
- --http-address=0.0.0.0:4180
|
|
- --upstream=http://localhost:8080
|
|
- --provider=oidc
|
|
- --oidc-issuer-url=https://auth.basicstack.de
|
|
- --redirect-url=https://dozzle.basicstack.de/oauth2/callback
|
|
- --email-domain=*
|
|
- --pass-user-headers=true
|
|
- --set-xauthrequest=true
|
|
- --pass-access-token=false
|
|
- --cookie-secure=true
|
|
- --cookie-httponly=true
|
|
- --cookie-name=__Host-oauth2-proxy
|
|
- --cookie-expire=12h
|
|
- --code-challenge-method=S256
|
|
- --proxy-websockets=true
|
|
- --pass-host-header=true
|
|
env:
|
|
- name: OAUTH2_PROXY_CLIENT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: dozzle-oidc
|
|
key: client-id
|
|
- name: OAUTH2_PROXY_CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: dozzle-oidc
|
|
key: client-secret
|
|
- name: OAUTH2_PROXY_COOKIE_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: dozzle-oidc
|
|
key: cookie-secret
|
|
resources:
|
|
limits:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
requests:
|
|
cpu: 50m
|
|
memory: 64Mi
|
|
volumes:
|
|
- name: dozzle-data
|
|
persistentVolumeClaim:
|
|
claimName: dozzle-data
|