Skip to content

fix(helm): decouple [discord] section from botToken presence#403

Merged
thepagent merged 2 commits intoopenabdev:mainfrom
thepagent:fix-helm-discord-config
Apr 16, 2026
Merged

fix(helm): decouple [discord] section from botToken presence#403
thepagent merged 2 commits intoopenabdev:mainfrom
thepagent:fix-helm-discord-config

Conversation

@thepagent
Copy link
Copy Markdown
Collaborator

Issue

Closes #392.
Supersedes #393 (rebased onto current main, removed stale/duplicate Slack section, updated values.yaml).

Reason for this change

The [discord] block in config.toml is conditionally rendered only when ($cfg.discord).botToken is non-empty. This forces users who manage secrets at runtime (e.g., AWS Secrets Manager → K8s Secret → env var) to either:

  1. Pass a dummy token to Helm (confusing)
  2. Pass the real token to Helm (stored in Helm release history — security risk)

The template already hardcodes bot_token = "${DISCORD_BOT_TOKEN}" as a placeholder for runtime expansion, so requiring botToken in Helm values serves no purpose other than gating the block.

Description of changes

configmap.yaml (one-line change):

- {{- if and (ne (toString ($cfg.discord).enabled) "false") ($cfg.discord).botToken }}
+ {{- if ($cfg.discord).enabled }}

values.yaml:

  • Removed botToken from the kiro agent discord section (no longer needed at render time)
  • Updated comment to explain runtime token injection via DISCORD_BOT_TOKEN env var
  • Added enabled: true to all commented-out agent examples (claude, opencode, cursor) so users see the correct pattern

⚠️ Breaking Change

This changes the discord condition from opt-out (enabled defaults to true unless "false") to opt-in (enabled must be explicitly true).

Who is affected: Users who have discord.botToken set but never explicitly set discord.enabled: true. After this change, their [discord] block will not render.

Migration: Add discord.enabled: true to your agent's discord values.

Context

- Change discord condition from requiring botToken to only checking enabled flag
- Remove botToken from kiro agent defaults (injected at runtime via DISCORD_BOT_TOKEN env var)
- Add enabled: true to commented-out agent examples for clarity

Closes openabdev#392
Covers discord/slack enabled flag logic to prevent regressions like openabdev#392.
Uses helm-unittest YAML format instead of bash scripts.
@thepagent thepagent force-pushed the fix-helm-discord-config branch from 7493cec to d253603 Compare April 16, 2026 16:37
@thepagent thepagent merged commit 5c8f979 into openabdev:main Apr 16, 2026
1 check 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.

[Bug] [Helm] Helm chart 0.7.7-beta.1: [discord] section in config.toml depends on botToken being set at render time

1 participant