95 lines
2.4 KiB
YAML
95 lines
2.4 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: agent-runtime-config
|
|
namespace: swarm-system
|
|
data:
|
|
ORCHESTRATOR_URL: "ws://orchestrator-service:8000"
|
|
WORKSPACE_DIR: "/workspace"
|
|
GIT_REPO_URL: "git://git-test-server.swarm-system.svc.cluster.local/swarm-test.git"
|
|
GIT_BASE_BRANCH: "main"
|
|
AGENT_CAPABILITIES: "code_generation,git,python,filesystem,file-operations,editing,validation,verification,shell,reporting,repository-inspection"
|
|
ENABLE_SUBTASK_HANDOFF: "false"
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: agent-full
|
|
namespace: swarm-system
|
|
labels:
|
|
app: agent-full
|
|
component: worker
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: agent-full
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: agent-full
|
|
component: worker
|
|
spec:
|
|
serviceAccountName: orchestrator-sa
|
|
containers:
|
|
- name: agent
|
|
image: python:3.11-slim
|
|
command:
|
|
- /bin/bash
|
|
- -c
|
|
- |
|
|
set -euxo pipefail
|
|
apt-get update
|
|
apt-get install -y git
|
|
pip install --no-cache-dir -r /app/agent/requirements.txt
|
|
cd /app
|
|
python -m agent.main
|
|
envFrom:
|
|
- configMapRef:
|
|
name: agent-runtime-config
|
|
env:
|
|
- name: AGENT_ID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: OPENAI_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: openai-api-key
|
|
key: api-key
|
|
- name: OPENAI_API_BASE
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: openai-api-key
|
|
key: api-base
|
|
optional: true
|
|
- name: OPENAI_MODEL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: openai-api-key
|
|
key: model
|
|
optional: true
|
|
- name: PYTHONUNBUFFERED
|
|
value: "1"
|
|
- name: DEBIAN_FRONTEND
|
|
value: noninteractive
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 1Gi
|
|
volumeMounts:
|
|
- name: agent-source
|
|
mountPath: /app/agent
|
|
- name: workspace
|
|
mountPath: /workspace
|
|
volumes:
|
|
- name: agent-source
|
|
configMap:
|
|
name: agent-source
|
|
- name: workspace
|
|
emptyDir: {}
|
|
restartPolicy: Always
|