forked from openkruise/agents
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsandboxset.yaml
More file actions
71 lines (71 loc) · 2.05 KB
/
Copy pathsandboxset.yaml
File metadata and controls
71 lines (71 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Note: Currently, OpenKruise Agent Runtime is not yet released. To use E2B related features, you need to manually inject
# the E2B envd component into the sandbox container for now
# 1. Inject the envd component into the sandbox container through the preview version of the agent-runtime image and emptyDir volume mount
# 2. Start envd through the sandbox container's postStart hook
apiVersion: agents.kruise.io/v1alpha1
kind: SandboxSet
metadata:
name: code-interpreter
namespace: default
annotations:
e2b.agents.kruise.io/should-init-envd: "true"
spec:
replicas: 2
template:
spec:
initContainers:
- name: init
image: openkruise/agent-runtime:preview-v0.0.2
volumeMounts:
- name: envd-volume
mountPath: /mnt/envd
env:
- name: ENVD_DIR
value: /mnt/envd
restartPolicy: Always
containers:
- name: sandbox
image: e2bdev/code-interpreter:latest
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 1
memory: 1Gi
env:
- name: PORT
value: "49999"
- name: ENVD_DIR
value: /mnt/envd
volumeMounts:
- name: envd-volume
mountPath: /mnt/envd
lifecycle:
postStart:
exec:
command:
- bash
- /mnt/envd/envd-run.sh
startupProbe:
failureThreshold: 20
httpGet:
path: /health
port: 49999
initialDelaySeconds: 1
periodSeconds: 2
timeoutSeconds: 1
ImagePullPolicy: IfNotPresent
terminationGracePeriodSeconds: 1
volumes:
- name: envd-volume
emptyDir: { }
volumeClaimTemplates:
- metadata:
name: www
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: "alicloud-disk-ssd"
resources:
requests:
storage: 10Gi