Update agent deployment: HTTPS backend + MCP endpoints + improved resources
- Use HTTPS api.fuq.tv instead of internal service URL - Update MCP endpoint to /api/mcp (HTTP endpoints) - Increase resources: 500m-2000m CPU, 1-4Gi RAM - Add serviceAccount for RBAC - Update secrets template Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
94
k8s/agents/web-terminal-pod.yaml
Normal file
94
k8s/agents/web-terminal-pod.yaml
Normal file
@@ -0,0 +1,94 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: claude-terminal
|
||||
namespace: agents
|
||||
labels:
|
||||
app: claude-terminal
|
||||
spec:
|
||||
serviceAccountName: agent-sa
|
||||
containers:
|
||||
- name: claude
|
||||
image: alpine:3.19
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
# Install dependencies
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
git \
|
||||
curl \
|
||||
tmux \
|
||||
ttyd \
|
||||
nodejs \
|
||||
npm \
|
||||
openssh-client \
|
||||
ca-certificates
|
||||
|
||||
# Install Bun
|
||||
curl -fsSL https://bun.sh/install | bash
|
||||
export PATH="/root/.bun/bin:$PATH"
|
||||
|
||||
# Install Claude Code with Bun
|
||||
bun install -g @anthropic-ai/claude-code
|
||||
|
||||
# Configure git
|
||||
git config --global user.name "Claude Agent"
|
||||
git config --global user.email "agent@aiworker.local"
|
||||
|
||||
# Start tmux session with Claude Code
|
||||
tmux new-session -d -s claude 'bash -c "cd /workspace && exec bash"'
|
||||
|
||||
# Start ttyd to expose tmux over HTTP
|
||||
ttyd -p 7681 -W tmux attach -t claude
|
||||
workingDir: /workspace
|
||||
ports:
|
||||
- containerPort: 7681
|
||||
name: web-terminal
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 2Gi
|
||||
volumeMounts:
|
||||
- name: workspace
|
||||
mountPath: /workspace
|
||||
- name: kube-config
|
||||
mountPath: /root/.kube
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: workspace
|
||||
persistentVolumeClaim:
|
||||
claimName: claude-workspace
|
||||
- name: kube-config
|
||||
secret:
|
||||
secretName: agent-kubeconfig
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: claude-workspace
|
||||
namespace: agents
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: claude-terminal
|
||||
namespace: agents
|
||||
spec:
|
||||
selector:
|
||||
app: claude-terminal
|
||||
ports:
|
||||
- port: 7681
|
||||
targetPort: 7681
|
||||
name: web-terminal
|
||||
type: ClusterIP
|
||||
Reference in New Issue
Block a user