feat(backends): WebSocket-Toggle pro Backend

Migration 0017 fügt backends.websocket BOOL. Wenn aktiv emittiert der
HAProxy-Renderer `timeout tunnel 1h` IM Backend-Block; defaults-Section
hat den Global-Timeout dafür verloren. Backends ohne WS-Workload bleiben
bei strikten HTTP-Timeouts (Connection-Hygiene). Migrations-Heuristik
schaltet vm-pool/proxmox/console/vnc-Namen auto auf true damit Proxmox-
Konsole nach Deploy weiterhin durchläuft.

UI: Switch im Backend-Modal + WS-Tag in der Übersichtstabelle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Debian
2026-05-11 21:51:09 +02:00
parent da35097041
commit 26f321de9d
13 changed files with 108 additions and 24 deletions

View File

@@ -0,0 +1,28 @@
-- +goose Up
-- +goose StatementBegin
-- Per-Backend WebSocket-Toggle. Wenn aktiv rendert der HAProxy-Renderer
-- `timeout tunnel 1h` IN dem Backend-Block, sodass HTTP-Upgrade-
-- Verbindungen (noVNC, VS-Code-SSH, AsyncAPI-Streams) nicht vom
-- defaults-Timeout-Server=60s gekappt werden. Backends ohne WS-Workload
-- behalten kurze Timeouts — gut für Connection-Hygiene.
ALTER TABLE backends
ADD COLUMN IF NOT EXISTS websocket BOOLEAN NOT NULL DEFAULT FALSE;
-- Erhalte das alte Verhalten für bekannte WebSocket-Pools: alles was
-- Proxmox / vm-Pool / Konsole im Namen hat bekommt websocket=true.
-- Falls der Operator das nicht will → einfach im UI ausschalten.
UPDATE backends
SET websocket = TRUE
WHERE name ILIKE '%vm%pool%'
OR name ILIKE '%proxmox%'
OR name ILIKE '%console%'
OR name ILIKE '%vnc%';
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
ALTER TABLE backends DROP COLUMN IF EXISTS websocket;
-- +goose StatementEnd