File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{{- range $name, $cfg := .Values.agents }}
22{{- if ne (include "openab.agentEnabled" $cfg) "false" }}
33{{- $d := dict "ctx" $ "agent" $name "cfg" $cfg }}
4+ {{- $command := include "openab.agentCommand" $d | trim }}
5+ {{- $args := include "openab.agentArgs" $d | trim }}
6+ {{- $workingDir := include "openab.agentWorkingDir" $d | trim }}
47---
58apiVersion : v1
69kind : ConfigMap
2023 allowed_channels = [{{ range $i, $ch := $cfg.discord.allowedChannels }}{{ if $i }}, {{ end }}"{{ $ch }}"{{ end }}]
2124
2225 [agent]
23- command = "{{ $cfg. command }}"
24- args = {{ if $cfg. args }}{{ $cfg.args | toJson }}{{ else }}[]{{ end }}
25- working_dir = "{{ $cfg. workingDir | default "/home/agent" }}"
26+ command = "{{ $command }}"
27+ args = {{ $ args }}
28+ working_dir = "{{ $workingDir }}"
2629 {{- if $cfg.env }}
2730 env = { {{ range $k, $v := $cfg.env }}{{ $k }} = "{{ $v }}", {{ end }} }
2831 {{- end }}
Original file line number Diff line number Diff line change 22{{- if ne (include "openab.agentEnabled" $cfg) "false" }}
33{{- $d := dict "ctx" $ "agent" $name "cfg" $cfg }}
44{{- $pvcEnabled := not (eq (include "openab.persistenceEnabled" $cfg) "false") }}
5+ {{- $workingDir := include "openab.agentWorkingDir" $d | trim }}
56---
67apiVersion : apps/v1
78kind : Deployment
4647 key : discord-bot-token
4748 {{- end }}
4849 - name : HOME
49- value : {{ $cfg. workingDir | default "/home/agent" }}
50+ value : {{ $workingDir | quote }}
5051 {{- range $k, $v := $cfg.env }}
5152 - name : {{ $k }}
5253 value : {{ $v | quote }}
@@ -65,11 +66,11 @@ spec:
6566 readOnly : true
6667 {{- if $pvcEnabled }}
6768 - name : data
68- mountPath : {{ $cfg. workingDir | default "/home/agent" }}
69+ mountPath : {{ $workingDir | quote }}
6970 {{- end }}
7071 {{- if $cfg.agentsMd }}
7172 - name : config
72- mountPath : {{ $cfg. workingDir | default "/home/agent" }}/AGENTS.md
73+ mountPath : {{ printf "%s/AGENTS.md" $ workingDir | quote }}
7374 subPath : AGENTS.md
7475 {{- end }}
7576 {{- with $cfg.nodeSelector }}
You can’t perform that action at this time.
0 commit comments