-
Notifications
You must be signed in to change notification settings - Fork 29
/
bee-code-interpreter.yaml
74 lines (74 loc) · 1.52 KB
/
bee-code-interpreter.yaml
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
72
73
74
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: code-interpreter-sa
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: pod-manager-role
rules:
- apiGroups: [ "" ]
resources: [ "pods", "pods/exec" ]
verbs: [ "*" ]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: pod-manager-binding
subjects:
- kind: ServiceAccount
name: code-interpreter-sa
roleRef:
kind: Role
name: pod-manager-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Pod
metadata:
name: code-interpreter
labels:
app: code-interpreter
spec:
serviceAccountName: code-interpreter-sa
containers:
- name: code-interpreter
image: icr.io/i-am-bee/bee-code-interpreter:0.0.27
ports:
- containerPort: 50051
- containerPort: 8000
env:
- name: APP_EXECUTOR_IMAGE
value: icr.io/i-am-bee/bee-code-executor:0.0.27
- name: APP_FILE_STORAGE_PATH
value: /storage
- name: APP_EXECUTOR_POD_QUEUE_TARGET_LENGTH
value: "1"
volumeMounts:
- name: storage-volume
mountPath: /storage
volumes:
- name: storage-volume
hostPath:
path: /storage
type: Directory
---
apiVersion: v1
kind: Service
metadata:
name: code-interpreter-service
spec:
type: NodePort
ports:
- port: 50051
targetPort: 50051
nodePort: 30051
name: grpc
- port: 50081
targetPort: 8000
nodePort: 30081
name: http
selector:
app: code-interpreter