Commit graph

13 commits

Author SHA1 Message Date
6de215aeca apps/dozzle/deployment.yaml aktualisiert 2026-07-19 16:17:17 +00:00
CTO Agent
5797b106a6 Add health probes to Dozzle container to fix startup race condition
Fixes DEV-350. During pod startup, Dozzle takes ~11 seconds to start
accepting connections, but oauth2-proxy can receive and proxy requests
immediately. This causes "connection refused" errors when users access
the UI right after a pod restart.

Solution:
- Add startupProbe with 30s timeout (15 failures × 2s) to give Dozzle
  time to start without failing readiness
- Add readinessProbe to prevent traffic routing until Dozzle is ready
- Add livenessProbe to restart container if Dozzle becomes unhealthy

All probes use the /healthcheck endpoint on port 8080.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-19 14:59:35 +00:00
CTO Agent
7c11256739 fix(dozzle): Remove invalid --proxy-buffer-size flag from oauth2-proxy
The oauth2-proxy container was failing with "unknown flag: --proxy-buffer-size".
This flag is not valid for oauth2-proxy and has been removed.

Fixes DEV-349

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-19 14:48:47 +00:00
CTO Agent
69b1668854 Fix Dozzle WebSocket/SSE streaming issues
Added oauth2-proxy flags to properly handle Server-Sent Events (SSE):
- --flush-interval=1s: Flush buffered data regularly for SSE
- --upstream-timeout=30s: Allow longer streaming connections
- --proxy-buffer-size=8k: Reduce buffering latency

Simplified ingress configuration to standard Traefik setup.

OAuth2-proxy was buffering responses by default, which broke the
WebSocket/SSE endpoints used for real-time log streaming. The
flush-interval flag ensures data is streamed properly.

Related: DEV-349

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-19 14:41:00 +00:00
CTO Agent
d7a81a2f7d Fix Dozzle WebSocket connectivity by forcing IPv4 upstream
oauth2-proxy was resolving localhost to IPv6 [::1]:8080 instead of
IPv4 127.0.0.1:8080, causing connection refused errors on the streaming
endpoints (/api/events/stream and /api/hosts/.../logs/stream).

Changed upstream URL from http://localhost:8080 to http://127.0.0.1:8080
to force IPv4 resolution.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-19 14:31:50 +00:00
CTO Agent
9ae3973d9b Fix Dozzle WebSocket connectivity for API access
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>
2026-07-19 14:25:07 +00:00
fa19370e49 apps/dozzle/deployment.yaml aktualisiert
Added env DOZZLE_MODE "k8s"
2026-07-19 13:45:39 +00:00
CTO Agent
088f3728ba Remove command args to test Dozzle Kubernetes auto-detection
Trying to resolve "Could not connect to any Docker Engine" error by letting Dozzle auto-detect its environment without explicit flags.

Current blocker: Dozzle v10.6.10 is not auto-detecting Kubernetes mode despite having proper RBAC and service account configured.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-19 13:39:33 +00:00
CTO Agent
dc77249ea6 Fix YAML syntax error in deployment
Add missing 'containers:' line that was accidentally removed in previous edit.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-19 13:37:36 +00:00
CTO Agent
694529b0af Fix Dozzle image version and add --agent flag
Revert to :latest image (v8.9.4 doesn't exist) and add --agent flag to help Dozzle detect and work in Kubernetes mode.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-19 13:35:38 +00:00
CTO Agent
d1357f316e Use specific Dozzle version and add no-analytics flag
Switch from :latest to v8.9.4 for stability and add --no-analytics flag to improve startup behavior in Kubernetes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-19 13:33:59 +00:00
CTO Agent
9e6344fd7c Fix Dozzle authentication with oauth2-proxy sidecar
Switch from direct OIDC (not supported by Dozzle) to forward-proxy authentication using oauth2-proxy as a sidecar container.

Changes:
- Add oauth2-proxy sidecar container for OIDC authentication
- Configure Dozzle to use forward-proxy auth with user headers
- Update service and ingress to route to oauth2-proxy (port 4180)
- Add cookie-secret to sealed secret for oauth2-proxy session management
- Update documentation to reflect oauth2-proxy architecture

The oauth2-proxy authenticates users via Pocket ID and forwards requests to Dozzle with X-Forwarded-User, X-Forwarded-Email, and X-Forwarded-Preferred-Username headers.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-19 13:30:41 +00:00
CTO Agent
d78f89fb99 Add Dozzle container log viewer deployment
Deploy Dozzle (https://dozzle.dev/) for real-time container log viewing in the k8s cluster.

Configuration:
- Namespace: dozzle
- Domain: dozzle.basicstack.de
- Storage: 1Gi PVC with hcloud-volumes-encrypted storage class
- Authentication: Pocket ID OIDC integration
- RBAC: Cluster-wide pod log access via service account
- Strategy: Recreate with ReadWriteOnce PVC for persistent settings

Created Pocket ID OIDC client:
- Client ID: 179c13f2-d251-4e1e-b1a0-c070df350c4e
- Callback URL: https://dozzle.basicstack.de/oauth/callback

ArgoCD application configured with automated sync and self-heal.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-19 13:25:08 +00:00