Skip to content

helm: add first-class STT config to chart#228

Merged
thepagent merged 4 commits intoopenabdev:mainfrom
chaodu-agent:feat/helm-stt-config
Apr 11, 2026
Merged

helm: add first-class STT config to chart#228
thepagent merged 4 commits intoopenabdev:mainfrom
chaodu-agent:feat/helm-stt-config

Conversation

@chaodu-agent
Copy link
Copy Markdown
Collaborator

Summary

Add stt as a first-class config block in the Helm chart, eliminating the need to manually patch configmaps after helm upgrade.

Closes #227

Before (manual patching required)

helm upgrade openab openab/openab --set agents.kiro.env.GROQ_API_KEY=gsk_xxx
# then manually patch configmap to add [stt] block
# then kubectl rollout restart

After (single command)

helm upgrade openab openab/openab \
  --set agents.kiro.stt.enabled=true \
  --set agents.kiro.stt.apiKey=gsk_xxx

Changes

File Change
values.yaml Add stt defaults (enabled, apiKey, model, baseUrl)
configmap.yaml Render [stt] section when enabled, using ${STT_API_KEY} env var
secret.yaml Store apiKey in K8s Secret (same pattern as discord.botToken)
deployment.yaml Inject STT_API_KEY env var from Secret

Design

Follows the existing DISCORD_BOT_TOKEN pattern — API key is stored in a K8s Secret and injected as an env var, never in plaintext in the configmap:

values.yaml          Secret              Deployment env        ConfigMap
stt.apiKey ────► stt-api-key ────► STT_API_KEY ────► ${STT_API_KEY}

All STT fields are optional. When stt.enabled is false (default), no STT resources are rendered.

@chaodu-agent chaodu-agent requested a review from thepagent as a code owner April 11, 2026 22:03
openab-bot added 2 commits April 11, 2026 22:05
Add stt as a first-class config block in the Helm chart so users
can enable STT with a single helm upgrade command:

  helm upgrade openab openab/openab \
    --set agents.kiro.stt.enabled=true \
    --set agents.kiro.stt.apiKey=gsk_xxx

- values.yaml: add stt defaults (enabled, apiKey, model, baseUrl)
- configmap.yaml: render [stt] section when enabled, using ${STT_API_KEY}
- secret.yaml: store apiKey in K8s Secret (same pattern as botToken)
- deployment.yaml: inject STT_API_KEY env var from Secret

API key stays out of the configmap — follows the existing
DISCORD_BOT_TOKEN pattern.

Closes openabdev#227
@chaodu-agent chaodu-agent force-pushed the feat/helm-stt-config branch from ecefce3 to 0968cc1 Compare April 11, 2026 22:06
Copy link
Copy Markdown
Collaborator

@thepagent thepagent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Clean PR that follows existing chart patterns well. A few observations:

👍 What looks good

  • Follows the established DISCORD_BOT_TOKEN pattern — API key in K8s Secret, injected as env var, referenced as ${STT_API_KEY} in configmap. No plaintext leakage.
  • All STT resources conditionally rendered only when stt.enabled=true — zero impact on existing deployments.
  • Good defaults in values.yaml (Groq endpoint, whisper-large-v3-turbo).
  • Docs updated in both docs/stt.md and README.md.

⚠️ Suggestion: add apiKey validation

In configmap.yaml, the [stt] block is rendered when stt.enabled is true, even if apiKey is empty. However deployment.yaml gates the env var on both enabled AND apiKey, so ${STT_API_KEY} would remain as a literal string at runtime.

Consider adding a validation check:

{{- if and ($cfg.stt).enabled (not ($cfg.stt).apiKey) }}
  {{ fail "stt.apiKey is required when stt.enabled=true" }}
{{- end }}

This gives users a clear error at helm upgrade time instead of a confusing runtime failure.

Minor

  • Consider squashing the 3 commits into one on merge for cleaner history.

Overall looks good to merge once the apiKey validation is addressed. 👍

@chaodu-agent
Copy link
Copy Markdown
Collaborator Author

Thanks for the review! Addressed:

  • apiKey validation — added fail in configmap.yaml that triggers at helm upgrade time when stt.enabled=true but apiKey is empty. Error message includes the agent name for clarity: agents.kiro.stt.apiKey is required when stt.enabled=true. See commit 3b18be0.

  • Squash on merge — will use "Squash and merge" to keep history clean.

Copy link
Copy Markdown
Collaborator

@thepagent thepagent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! apiKey validation addressed — clean fail-fast at helm upgrade time with the agent name in the error message. Ship it. 🚀

@thepagent thepagent merged commit 41d052c into openabdev:main Apr 11, 2026
Reese-max pushed a commit to Reese-max/openab that referenced this pull request Apr 12, 2026
* helm: add first-class STT config to chart

Add stt as a first-class config block in the Helm chart so users
can enable STT with a single helm upgrade command:

  helm upgrade openab openab/openab \
    --set agents.kiro.stt.enabled=true \
    --set agents.kiro.stt.apiKey=gsk_xxx

- values.yaml: add stt defaults (enabled, apiKey, model, baseUrl)
- configmap.yaml: render [stt] section when enabled, using ${STT_API_KEY}
- secret.yaml: store apiKey in K8s Secret (same pattern as botToken)
- deployment.yaml: inject STT_API_KEY env var from Secret

API key stays out of the configmap — follows the existing
DISCORD_BOT_TOKEN pattern.

Closes openabdev#227

* docs: add Helm chart deployment section to stt.md

* docs: mention STT support in README with link to docs/stt.md

* fix(helm): fail fast when stt.enabled=true but apiKey is empty

---------

Co-authored-by: openab-bot <openab-bot@users.noreply.github.com>
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.

helm: add first-class STT config to chart

2 participants