Skip to content

Commit

Permalink
fix: expose supervisor websocket via Kong api (#2603)
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge authored Aug 11, 2024
1 parent f676aa8 commit d400387
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ type kongConfig struct {
PgmetaId string
EdgeRuntimeId string
LogflareId string
PoolerId string
ApiHost string
ApiPort uint16
}
Expand Down Expand Up @@ -350,6 +351,7 @@ EOF
PgmetaId: utils.PgmetaId,
EdgeRuntimeId: utils.EdgeRuntimeId,
LogflareId: utils.LogflareId,
PoolerId: utils.PoolerId,
ApiHost: utils.Config.Hostname,
ApiPort: utils.Config.Api.Port,
}); err != nil {
Expand Down
11 changes: 11 additions & 0 deletions internal/start/templates/kong.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,14 @@ services:
strip_path: true
paths:
- /analytics/v1/
- name: pooler-v2-ws
_comment: "Pooler: /pooler/v2/* -> ws://pooler:4000/v2/*"
url: http://{{ .PoolerId }}:4000/v2
protocol: ws
routes:
- name: pooler-v2-ws
strip_path: true
paths:
- /pooler/v2/
plugins:
- name: cors

0 comments on commit d400387

Please sign in to comment.