|
| 1 | +# Migrating to `configToml` |
| 2 | + |
| 3 | +`configToml` lets you write `config.toml` directly instead of relying on the |
| 4 | +Helm-rendered path (`slack.*`, `discord.*`, `pool.*`, etc. in `values.yaml`). |
| 5 | +The Helm-rendered path is deprecated and unmaintained — see the tracking |
| 6 | +issue for its removal timeline: https://github.com/openabdev/openab/issues/1278 |
| 7 | + |
| 8 | +For the platform-agnostic option (works identically on Kubernetes, ECS, |
| 9 | +Zeabur, and AgentCore Runtime — no chart required), see `configUrl` instead: |
| 10 | +[`docs/adr/configurl-over-helm-rendering.md`](adr/configurl-over-helm-rendering.md). `configToml` is the |
| 11 | +Kubernetes/Helm-only convenience for users not yet on external config storage. |
| 12 | + |
| 13 | +## Why |
| 14 | + |
| 15 | +The old path was a ~350-line TOML serializer written in Helm template language. |
| 16 | +Every new config field required a chart release. The rendered output was invisible |
| 17 | +to users without running `helm template`. `configToml` is a direct pass-through — |
| 18 | +what you write is what gets deployed. |
| 19 | + |
| 20 | +## Two ways to set `configToml` |
| 21 | + |
| 22 | +**Inline** — paste TOML directly into `values.yaml`: |
| 23 | + |
| 24 | +```yaml |
| 25 | +agents: |
| 26 | + kiro: |
| 27 | + configToml: | |
| 28 | + [discord] |
| 29 | + bot_token = "${DISCORD_BOT_TOKEN}" |
| 30 | +``` |
| 31 | +
|
| 32 | +**As-is from a standalone file** — keep `config.toml` as a real file (full IDE |
| 33 | +syntax highlighting / TOML schema validation) and load it verbatim with Helm's |
| 34 | +built-in `--set-file`: |
| 35 | + |
| 36 | +```bash |
| 37 | +helm upgrade openab openab/openab \ |
| 38 | + --set-file agents.kiro.configToml=./config.toml |
| 39 | +``` |
| 40 | + |
| 41 | +`--set-file` reads the file's raw content and assigns it as a string to |
| 42 | +`agents.kiro.configToml`, merging the same way `--set` does. No chart changes |
| 43 | +needed — this is the recommended way to keep `config.toml` WYSIWYG-editable. |
| 44 | + |
| 45 | +## Before → After |
| 46 | + |
| 47 | +### Slack |
| 48 | + |
| 49 | +**Before:** |
| 50 | +```yaml |
| 51 | +agents: |
| 52 | + claude: |
| 53 | + slack: |
| 54 | + enabled: true |
| 55 | + existingSecret: openab |
| 56 | + assistantMode: true |
| 57 | + allowUserMessages: "mentions" |
| 58 | + allowedChannels: |
| 59 | + - "C01234567" |
| 60 | + allowedUsers: |
| 61 | + - "U01234567" |
| 62 | + pool: |
| 63 | + maxSessions: 10 |
| 64 | + sessionTtlHours: 24 |
| 65 | + reactions: |
| 66 | + enabled: true |
| 67 | + removeAfterReply: false |
| 68 | + command: claude-agent-acp |
| 69 | + workingDir: /home/node |
| 70 | + secretEnv: |
| 71 | + - name: ANTHROPIC_API_KEY |
| 72 | + secretName: openab |
| 73 | + secretKey: ANTHROPIC_API_KEY |
| 74 | +``` |
| 75 | + |
| 76 | +**After:** |
| 77 | +```yaml |
| 78 | +agents: |
| 79 | + claude: |
| 80 | + secretEnv: |
| 81 | + - name: ANTHROPIC_API_KEY |
| 82 | + secretName: openab |
| 83 | + secretKey: ANTHROPIC_API_KEY |
| 84 | + - name: SLACK_BOT_TOKEN |
| 85 | + secretName: openab |
| 86 | + secretKey: slack-bot-token |
| 87 | + - name: SLACK_APP_TOKEN |
| 88 | + secretName: openab |
| 89 | + secretKey: slack-app-token |
| 90 | + configToml: | |
| 91 | + [slack] |
| 92 | + bot_token = "${SLACK_BOT_TOKEN}" |
| 93 | + app_token = "${SLACK_APP_TOKEN}" |
| 94 | + allowed_channels = ["C01234567"] |
| 95 | + allowed_users = ["U01234567"] |
| 96 | + allow_user_messages = "mentions" |
| 97 | + assistant_mode = true |
| 98 | +
|
| 99 | + [agent] |
| 100 | + command = "claude-agent-acp" |
| 101 | + working_dir = "/home/node" |
| 102 | + inherit_env = ["ANTHROPIC_API_KEY"] |
| 103 | +
|
| 104 | + [pool] |
| 105 | + max_sessions = 10 |
| 106 | + session_ttl_hours = 24 |
| 107 | +
|
| 108 | + [reactions] |
| 109 | + enabled = true |
| 110 | + remove_after_reply = false |
| 111 | +``` |
| 112 | + |
| 113 | +### Discord |
| 114 | + |
| 115 | +**Before:** |
| 116 | +```yaml |
| 117 | +agents: |
| 118 | + kiro: |
| 119 | + discord: |
| 120 | + botToken: "${DISCORD_BOT_TOKEN}" |
| 121 | + allowedChannels: |
| 122 | + - "123456789012345678" |
| 123 | + allowedUsers: |
| 124 | + - "987654321098765432" |
| 125 | + command: kiro-cli |
| 126 | +``` |
| 127 | + |
| 128 | +**After:** |
| 129 | +```yaml |
| 130 | +agents: |
| 131 | + kiro: |
| 132 | + secretEnv: |
| 133 | + - name: DISCORD_BOT_TOKEN |
| 134 | + secretName: my-secret |
| 135 | + secretKey: discord-bot-token |
| 136 | + configToml: | |
| 137 | + [discord] |
| 138 | + bot_token = "${DISCORD_BOT_TOKEN}" |
| 139 | + allowed_channels = ["123456789012345678"] |
| 140 | + allowed_users = ["987654321098765432"] |
| 141 | +
|
| 142 | + [agent] |
| 143 | + command = "kiro-cli" |
| 144 | +``` |
| 145 | + |
| 146 | +## Secrets |
| 147 | + |
| 148 | +Secrets must still be injected via `secretEnv` — they render as `valueFrom.secretKeyRef` |
| 149 | +in the Deployment and are available as environment variables. Reference them in |
| 150 | +`configToml` as `${VAR_NAME}` placeholders exactly as before. |
| 151 | + |
| 152 | +## Tip: see your current rendered config |
| 153 | + |
| 154 | +Before migrating, check what your current `config.toml` looks like: |
| 155 | + |
| 156 | +```bash |
| 157 | +kubectl exec -it deployment/<your-agent> -- cat /etc/openab/config.toml |
| 158 | +``` |
| 159 | + |
| 160 | +Use that output as the starting point for your `configToml` value. |
0 commit comments