Skip to content

feat(chart): support colocated (all-in-one-pod) mode for gateway #847

@chaodu-agent

Description

@chaodu-agent

Problem

Currently the Helm chart deploys the gateway as a separate Deployment from the OAB agent. For simple single-agent setups (e.g. one Telegram bot on K3s), this means:

  • 2 pods instead of 1
  • A Kubernetes Service is needed for the OAB → gateway WebSocket connection
  • More moving parts for what could be a single-pod deployment

Proposal

Add a gateway.colocated: true option (or similar) that runs the gateway + cloudflared as sidecar containers in the same pod as the OAB agent, instead of creating a separate Deployment + Service.

When colocated:

  • Gateway runs as a sidecar container in the agent pod
  • OAB connects to ws://localhost:8080/ws (no Service needed)
  • cloudflared (if used) also runs as a sidecar in the same pod
  • No separate gateway Deployment or Service is created
agents:
  kiro:
    gateway:
      enabled: true
      colocated: true  # <-- new option
      url: "ws://localhost:8080/ws"
      platform: "telegram"
      telegram:
        botToken: ""
      extraContainers:
        - name: cloudflared
          ...

Use Case

Reference architecture: docs/refarch/telegram-cloudflare-tunnel.md

Single-agent K3s deployments where simplicity is preferred over independent scaling. All three components (OAB, gateway, cloudflared) share the same lifecycle and can communicate over localhost.

Current Workaround

Use the chart as-is with gateway.deploy: true — this creates a separate pod with a Service, and OAB connects via the Service DNS name. Works fine, just more resources than strictly necessary for a single-agent setup.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions