Skip to content

Add explicit websocket protocol for task services - #14

Merged
imakunin merged 1 commit into
mainfrom
feature/websocket-protocol
Sep 23, 2026
Merged

imakunin merged 1 commit into
mainfrom
feature/websocket-protocol

Conversation

@wo1f

@wo1f wo1f commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • New protocol: "websocket" value in the task_proxy annotation, next to http and grpc.
  • Routes of such services get RouteAction.upgrade_configs with upgrade_type: websocket, enabled: true. The upstream cluster stays HTTP/1.1. Upgrade is not enabled globally on the HCM, so http and grpc services are unaffected.
  • ext_authz keeps working as is: it runs on the upgrade request headers before the protocol switch.
  • Protocol is now part of the task version id, so a protocol change re-renders the xDS snapshot.
  • README documents the new protocol and notes that stream_idle_timeout_seconds still applies to an idle WebSocket connection.

Tests

  • discovery_test.go: parsing of websocket in the annotation.
  • xds_test.go: upgrade config is present on all routes of a websocket task, absent on http routes and on the HCM.
  • task_test.go: ParseProtocol and protocol in the version id.

gofmt, go vet and go test ./... pass.

🤖 Generated with Claude Code

Tasks annotated with protocol "websocket" get Envoy's websocket upgrade
enabled on their routes via RouteAction.upgrade_configs; the upstream
cluster stays HTTP/1.1. Upgrade is not enabled globally on the HCM, so
http and grpc services are unaffected.

Protocol is now part of the task version id so a protocol change
re-renders the xDS snapshot.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@futujaos
futujaos self-requested a review September 23, 2026 15:54

@futujaos futujaos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@imakunin
imakunin merged commit 115976e into main Sep 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants