Skip to content

feat: add openab-telegram chart#873

Merged
thepagent merged 18 commits into
mainfrom
feat/openab-telegram-chart
May 21, 2026
Merged

feat: add openab-telegram chart#873
thepagent merged 18 commits into
mainfrom
feat/openab-telegram-chart

Conversation

@chaodu-agent
Copy link
Copy Markdown
Collaborator

@chaodu-agent chaodu-agent commented May 20, 2026

Summary

Adds charts/openab-telegram/ — a standalone Helm chart that deploys OAB + Gateway + Cloudflare Tunnel in a single pod, following the reference architecture.

Install

helm install my-bot ./charts/openab-telegram \
  --set telegramBotToken="123:ABC" \
  --set cloudflareTunnelToken="eyJ..." \
  --namespace openab --create-namespace

Only 2 required flags. Everything else has sane defaults.

Credential Management

Three options from simplest to most secure:

# Method Security Notes
1 --set telegramBotToken=X ⚠️ Stored in Helm release Secret, visible via helm get values Good for dev/testing
2 kubectl create secret --from-literal + --set existingSecret=name ✅ Out of Helm values, brief shell exposure Good for production
3 kubectl create secret --from-env-file=<(aws sm ...) + --set existingSecret=name ✅✅ Never touches disk or shell variables Best for security

Option 3 example (AWS Secrets Manager → K8s Secret, no disk/shell exposure):

kubectl create secret generic my-bot-creds -n openab \
  --from-env-file=<(aws secretsmanager get-secret-value \
    --secret-id oab --query SecretString --output text | \
    jq -r '{"telegram-bot-token": .telegramBotToken, "cloudflare-tunnel-token": .cloudflareTunnelToken} | to_entries[] | "\(.key)=\(.value)"')

helm install my-bot ./charts/openab-telegram \
  --set existingSecret=my-bot-creds \
  --namespace openab --create-namespace

Release Channel

Users can switch between stable and beta for the core image:

channel Core image tag Gateway image tag
stable (default) 0.8.3 v0.5.0 (pinned)
beta 0.8.3-beta.12 v0.5.0 (pinned)

Gateway is pinned independently since it has its own release cadence (gateway-v* tags).

What it does

  • Colocates 3 containers in one pod: openab (agent), gateway (Telegram adapter), cloudflared (tunnel)
  • All inter-container communication over localhost — no Services needed
  • existingSecret support — reference a pre-created K8s Secret, chart skips Secret creation
  • Security contexts (non-root, read-only rootfs, drop all caps)
  • Post-install NOTES.txt with webhook setup and auth instructions

Design Decision

This is a standalone chart (not a subchart wrapper) because:

  1. The core chart cannot template dynamic Secret names into extraContainers values
  2. Full control over the pod spec without fighting subchart value injection
  3. Simpler to understand and maintain — all templates are self-contained
  4. The config.toml surface is much smaller (gateway-only, no Discord/Slack)

Future platform charts (openab-line, openab-feishu, etc.) can follow the same pattern.

Tested

  • helm lint
  • helm template renders correctly ✅
  • Required value validation (fails fast with clear error) ✅
  • existingSecret mode (skips Secret, references external) ✅
  • Platform restriction overrides (allowAllUsers=false) ✅
  • Channel switching (stable / beta) resolves correct tags ✅

Closes #872

@chaodu-agent chaodu-agent requested a review from thepagent as a code owner May 20, 2026 19:28
@github-actions github-actions Bot added pending-screening closing-soon PR missing Discord Discussion URL — will auto-close in 3 days and removed closing-soon PR missing Discord Discussion URL — will auto-close in 3 days labels May 20, 2026
@github-actions
Copy link
Copy Markdown

⚠️ This PR is missing a Discord Discussion URL in the body.

All PRs must reference a prior Discord discussion to ensure community alignment before implementation.

Please edit the PR description to include a link like:

Discord Discussion URL: https://discord.com/channels/...

This PR will be automatically closed in 3 days if the link is not added.

chaodu-agent and others added 12 commits May 20, 2026 19:26
Single-pod Helm chart for Telegram deployments:
- OAB agent, gateway, and cloudflared tunnel as colocated containers
- Shared emptyDir for /tmp, PVC for agent persistence
- Only 2 required --set flags: telegramBotToken, cloudflareTunnelToken
- Follows the reference architecture from docs/refarch/telegram-cloudflare-tunnel.md

Closes #872
- channel: stable (default) strips -beta.* from appVersion for both images
- channel: beta uses appVersion as-is for core, strips prerelease for gateway
  (gateway has no beta tags)
- Explicit image.tag / gateway.tag override still takes precedence
Gateway has independent release cadence from core — no appVersion
derivation. Just use the pinned tag directly.
…ment README

- existingSecret: reference a pre-created K8s Secret (skips chart Secret creation)
- README documents 3 credential options: --set, --from-literal, --from-env-file
- Secrets from external managers (AWS SM) can flow to K8s without touching disk
- Pin cloudflared to 2026.5.0 (was 'latest')
- Change agent.command default to 'openab' (generic, not kiro-specific)
- Fix NOTES.txt webhook curl to respect existingSecret
Gateway needs write access to ~/.openab/media/inbound/ for media proxy
colocate mode (PR #858). Both core and gateway now share the PVC.
- Cloudflare tunnel setup via API token (no browser)
- Ingress config via local config.yml
- Webhook setup moved to Prerequisites (before helm install)
- Post-install only has agent auth (device flow)
- Fixed agent command to 'openab'
Instead of regex-stripping beta suffix from appVersion, resolve
image tag directly from channel value (stable/beta). Requires
PR #878 to publish the floating tags.
@chaodu-agent chaodu-agent force-pushed the feat/openab-telegram-chart branch from c460ba3 to bf73f06 Compare May 20, 2026 23:26
@github-actions github-actions Bot added the closing-soon PR missing Discord Discussion URL — will auto-close in 3 days label May 20, 2026
Agent auth credentials and state live in the PVC. Without this,
uninstall+reinstall requires re-authentication.
@chaodu-agent chaodu-agent force-pushed the feat/openab-telegram-chart branch from 099dbab to 322169c Compare May 20, 2026 23:42
@chaodu-agent chaodu-agent force-pushed the feat/openab-telegram-chart branch from 322169c to 3c8c28b Compare May 20, 2026 23:43
@chaodu-agent chaodu-agent force-pushed the feat/openab-telegram-chart branch from b2e8b09 to c351ad9 Compare May 20, 2026 23:54
Pahud Hsieh added 2 commits May 20, 2026 19:59
Optional third key in the K8s Secret enables AI agents to configure
tunnel ingress via the Cloudflare API without external credentials.
NOTES.txt extracts all needed values from the secret itself.
@thepagent thepagent merged commit 4944acb into main May 21, 2026
3 checks passed
thepagent pushed a commit that referenced this pull request May 22, 2026
…901)

* feat(openab): add existingSecret support for Slack agent credentials

Add `agents.<name>.slack.existingSecret` to the openab chart. When set,
the chart references the named Kubernetes Secret for SLACK_BOT_TOKEN and
SLACK_APP_TOKEN instead of creating a chart-managed Secret from values.

Adapts the existingSecret pattern from the openab-telegram chart (#873)
to the multi-agent structure of openab, scoped per-agent.

Enables ESO/Vault/SealedSecrets workflows where Slack tokens rotate
without requiring a Helm re-apply.

Behavior:
- existingSecret unset: chart creates Secret with slack tokens (unchanged)
- existingSecret set, slack-only agent: no chart-managed Secret created
- existingSecret set + discord/stt/gateway: chart Secret omits slack keys;
  deployment references existingSecret for slack envs only (dual-secret)

Closes #900

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(helm): address review nits — trim existingSecret, add mixed-adapter and multi-agent tests

- Pipe existingSecret through | trim in openab.slackSecretName helper to
  handle whitespace-only values gracefully
- Add mixed-adapter deployment test verifying Discord refs chart-managed
  Secret while Slack refs existingSecret in the same Deployment
- Add multi-agent scoping test confirming agent A's existingSecret does
  not affect agent B's inline token resolution

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: 超渡法師 <noreply@openab.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closing-soon PR missing Discord Discussion URL — will auto-close in 3 days pending-maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Purpose-built Helm charts per platform (openab-telegram, openab-line, etc.)

2 participants