fix(helm): add missing gateway env vars, deploy control, and sidecar support#693
fix(helm): add missing gateway env vars, deploy control, and sidecar support#693JARVIS-coding-Agent wants to merge 2 commits intoopenabdev:mainfrom
Conversation
…support - Add TELEGRAM_BOT_TOKEN, TELEGRAM_SECRET_TOKEN, TELEGRAM_WEBHOOK_PATH, LINE_CHANNEL_SECRET, LINE_CHANNEL_ACCESS_TOKEN env var injection - Add gateway.deploy flag (default: true) to decouple config from deployment - Add extraContainers, extraVolumes, extraVolumeMounts for sidecar support - Add nodeSelector, tolerations, affinity to gateway Deployment - Add telegram/line config sections to values.yaml - Expand gateway-secret.yaml to include telegram and LINE secrets - Add 18 new helm-unittest tests (28 total gateway tests, 64/64 passing) Closes openabdev#692
- Use toString pipe for deploy flag (default true handles false correctly) - Remove misleading single-arg 'and' on hasTelegram/hasLine assignments Co-authored-by: FRIDAY
Group Review Summary — PR #693Reviewers
Issues Fixed (Issue #692)
* Originally reported as P0 (startup panic), but latest Review RoundsRound 1 — FRIDAY
Round 2 — VISION
Round 3 — SHURI
Test Results
Files Changed
Suggested Follow-ups (out of scope for this hotfix)
|
OpenAB PR ScreeningThis is auto-generated by the OpenAB project-screening flow for context collection and reviewer handoff.
Screening report## IntentPR #693 is trying to make the Helm chart’s gateway deployment usable for Telegram, LINE, external/shared gateway setups, and gateway sidecars. The operator-visible problem is concrete: Helm users cannot currently configure Telegram or LINE gateway credentials through the chart, cannot run common tunnel sidecars such as FeatThis is primarily a Helm chart fix with small deployment feature additions. It adds missing Telegram and LINE environment variables from Kubernetes Secrets, introduces Who It ServesPrimary beneficiary: deployers and agent runtime operators using the Helm chart. Secondary beneficiaries: maintainers and reviewers, because the PR adds helm-unittest coverage around gateway rendering, secret rendering, and config-only behavior. Rewritten PromptUpdate the OpenAB Helm chart so gateway configuration and gateway deployment can be controlled independently. Implement optional Telegram and LINE credential support for the gateway by adding values, Secret keys, and Preserve existing behavior by default. Add helm-unittest coverage for normal gateway deployment, Merge PitchThis is worth moving forward because it closes real deployment gaps in the v0.8.2 Helm chart and removes the need for users to fork or patch manifests for common gateway setups. Risk profile is moderate-low: the changes are mostly Helm template conditionals and values additions, with backward-compatible defaults. The likely reviewer concern is semantic drift between Best-Practice ComparisonOpenClaw principles partially apply. Explicit delivery routing is relevant because the chart should make it clear whether agents connect to an in-chart gateway or an externally managed/shared gateway. Isolated executions are loosely relevant through support for separate gateway workloads and sidecars. Gateway-owned scheduling, durable job persistence, retry/backoff, and run logs do not directly fit this Helm chart PR. Hermes Agent principles also partially apply. The gateway daemon tick model, file locking, atomic writes, fresh session per scheduled run, and self-contained scheduled prompts are not directly relevant. The closest applicable principle is operational isolation: Implementation Options
Comparison Table
RecommendationAdvance the balanced option, with careful review of It solves the reported deployment problems without forcing a larger gateway architecture redesign. The PR should be reviewed around render behavior, Secret ownership, and upgrade compatibility. A future follow-up can introduce a first-class shared gateway model if multi-agent gateway ownership becomes common enough to justify a larger chart abstraction. |
chaodu-agent
left a comment
There was a problem hiding this comment.
LGTM ✅ — Well-structured fix addressing all four issues from #692 with clean implementation, proper secret separation, backward compatibility, and thorough test coverage (18 new tests, 64/64 chart-wide passing).
Baseline Check
Main has gateway templates with only Teams env vars, no deploy flag, no sidecar/scheduling support.
PR adds: deploy flag for config-only mode, Telegram env vars (BOT_TOKEN, SECRET_TOKEN, WEBHOOK_PATH), LINE env vars (CHANNEL_SECRET, CHANNEL_ACCESS_TOKEN), extraContainers/extraVolumes/extraVolumeMounts, nodeSelector/affinity/tolerations.
No stale overlap with main — all changes are net-new.
四問框架
- What problem? Gateway templates missing env vars for Telegram/LINE adapters, no way to disable gateway deployment while keeping config, no sidecar/scheduling support.
- How? Adds
deployboolean gate, platform-specific env vars with proper secret separation, and standard K8s extensibility fields (extraContainers, nodeSelector, etc.). - Alternatives? N/A — straightforward gap-fill for existing gateway template architecture.
- Best approach? Yes. Follows existing chart patterns, correct secret separation (gateway secrets in gateway Secret, agent secrets in agent Secret).
Traffic Light
🟢 INFO — Excellent test coverage (18 new tests across 3 suites including negative cases)
🟢 INFO — Correct secret separation and backward compatibility
🟢 INFO — Model PR description with design decisions and severity analysis
🟢 INFO — Clean removal of redundant $agentD redeclaration
🟡 NIT — Empty string defaults for telegram/line fields in values.yaml (cosmetic)
🟡 NIT — deploy guard string comparison works correctly but could use a CLI usage note
超渡法師 Review — PR #693APPROVE ✅ — Clean, well-scoped Helm fix that correctly wires Telegram/LINE env vars into the gateway template. Ready to merge. Baseline CheckMain branch (v0.8.2): Gateway templates (#677) only inject Gateway source (
Issue #692 severity correction: PR correctly notes that the current Four-Question Analysis1. What problem does it solve?Gateway templates from #677 only wired Teams env vars. Telegram and LINE adapters cannot be configured via Helm — users must manually inject env vars or use external secret management. Also, no way to decouple config generation from deployment creation, and no sidecar support for cloudflared tunnels. 2. How does it solve it?
3. What was considered?
4. Is this the best approach?Yes. Minimal, focused fix that follows existing chart patterns. The Detailed Findings🟢 INFO — Well done
🟡 NIT — Non-blocking
🔴 SUGGESTED CHANGESNone. Verdict: Clean, well-tested Helm fix. Env var names verified against gateway source. |
Context
Closes #692
The v0.8.2 Helm chart gateway templates (added in #677) are missing critical env var injection for Telegram and LINE adapters, have no sidecar support, and couple config generation with deployment creation.
Summary
This PR fixes all four issues reported in #692:
TELEGRAM_BOT_TOKEN,TELEGRAM_SECRET_TOKEN,TELEGRAM_WEBHOOK_PATH,LINE_CHANNEL_SECRET,LINE_CHANNEL_ACCESS_TOKENviasecretKeyRefgateway.deployflag (default:true). Set tofalsefor config-only mode (agent gets[gateway]config block without creating Gateway Deployment/Service)extraContainers,extraVolumes,extraVolumeMountsto gateway Deployment (e.g. for cloudflared tunnel sidecar)deploy: falseon all but one agent to share a single gateway instanceChanges
charts/openab/templates/gateway.yaml— Add telegram/LINE env vars,deployguard, extraContainers/extraVolumes/extraVolumeMounts, nodeSelector/affinity/tolerationscharts/openab/templates/gateway-secret.yaml— Add telegram-bot-token, telegram-secret-token, line-channel-secret, line-channel-access-token keyscharts/openab/values.yaml— Adddeploy,telegram.*,line.*,extraContainers,extraVolumeMounts,extraVolumes,nodeSelector,tolerations,affinityfields with documentation commentscharts/openab/tests/gateway_test.yaml— Add 18 new tests across 3 suites (config rendering, deployment rendering, secret rendering). 28 gateway tests total, 64/64 chart-wide passing.Design Decisions
gateway.deployinstead of top-level shared gateway: Minimal change that solves the coupling problem. Users who want a shared gateway setdeploy: falseon all agents except one (or deploy gateway externally). A top-level shared gateway abstraction is a larger architectural change better suited for a follow-up.GATEWAY_WS_TOKENremains in the agent Secret (shared between agent and gateway) — single source of truth preserved.requiredvalidation on telegram.botToken: The latest gateway binary uses.ok()(optional) forTELEGRAM_BOT_TOKEN, not.expect(). Missing token means the Telegram adapter is simply not enabled, not a crash. Addingrequiredwould block Teams-only or LINE-only deployments.Verification:
deploy: falsedoes not break agent SecretWhen
gateway.deploy: false:secret.yaml) which holdsgateway-ws-token— this is controlled bygateway.enabled+gateway.token, independent ofgateway.deploy[gateway]config block — still rendered whengateway.enabled: true[gateway]config andGATEWAY_WS_TOKENfrom its own Secret. No danglingsecretKeyRefreferences.Verified by helm-unittest:
does not render Deployment when deploy is falseanddoes not render when deploy is false(Secret) both pass while config rendering tests confirm[gateway]block is still generated.Note on P0 severity
Issue #692 reported
TELEGRAM_BOT_TOKENas causingpanicon startup. This was true in older gateway versions, but the currentmainbranch (gateway/src/main.rs) usesstd::env::var("TELEGRAM_BOT_TOKEN").ok()— the adapter is silently disabled rather than crashing. The fix is still necessary (users cannot configure Telegram via Helm without it), but severity is P1 (silent feature failure) rather than P0 (startup crash).Discord Discussion URL: https://discord.com/channels/1491295327620169908/1499911655142985888