Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions charts/openab/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ Agents deployed:
{{- range $name, $cfg := .Values.agents }}
{{- if ne (include "openab.agentEnabled" $cfg) "false" }}
• {{ $name }} ({{ $cfg.command }})
{{- if not (or (and ($cfg.discord).enabled ($cfg.discord).botToken) (and ($cfg.slack).enabled ($cfg.slack).botToken)) }}
⚠️ No bot token provided. Create the secret manually:
{{- if not (or (and (ne (toString ($cfg.discord).enabled) "false") ($cfg.discord).botToken) (and ($cfg.slack).enabled ($cfg.slack).botToken)) }}
⚠️ No bot token provided. Set one via Helm values or create the secret manually:
kubectl create secret generic {{ include "openab.agentFullname" (dict "ctx" $ "agent" $name) }} \
--from-literal=discord-bot-token="YOUR_DISCORD_TOKEN"
--from-literal=discord-bot-token="YOUR_TOKEN" # for Discord
# --from-literal=slack-bot-token="YOUR_TOKEN" # for Slack
{{- end }}

{{- if and ($cfg.discord).enabled ($cfg.discord).botToken }}
{{- if and (ne (toString ($cfg.discord).enabled) "false") ($cfg.discord).botToken }}
Discord: ✅ configured
{{- end }}
{{- if and ($cfg.slack).enabled ($cfg.slack).botToken }}
Expand Down
2 changes: 1 addition & 1 deletion charts/openab/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- include "openab.labels" $d | nindent 4 }}
data:
config.toml: |
{{- if and ($cfg.discord).enabled ($cfg.discord).botToken }}
{{- if and (ne (toString ($cfg.discord).enabled) "false") ($cfg.discord).botToken }}
[discord]
bot_token = "${DISCORD_BOT_TOKEN}"
{{- range $cfg.discord.allowedChannels }}
Expand Down
2 changes: 1 addition & 1 deletion charts/openab/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
{{- if and ($cfg.discord).enabled ($cfg.discord).botToken }}
{{- if and (ne (toString ($cfg.discord).enabled) "false") ($cfg.discord).botToken }}
- name: DISCORD_BOT_TOKEN
valueFrom:
secretKeyRef:
Expand Down
2 changes: 1 addition & 1 deletion charts/openab/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- range $name, $cfg := .Values.agents }}
{{- if ne (include "openab.agentEnabled" $cfg) "false" }}
{{- $hasDiscord := and ($cfg.discord).enabled ($cfg.discord).botToken }}
{{- $hasDiscord := and (ne (toString ($cfg.discord).enabled) "false") ($cfg.discord).botToken }}
{{- $hasSlack := and ($cfg.slack).enabled (or ($cfg.slack).botToken ($cfg.slack).appToken) }}
{{- $hasStt := and ($cfg.stt).enabled ($cfg.stt).apiKey }}
{{- if or $hasDiscord $hasSlack $hasStt }}
Expand Down
Loading