-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudrun.yaml
58 lines (58 loc) · 1.7 KB
/
cloudrun.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
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
annotations:
name: sandbox-quickjs
spec:
template:
metadata:
annotations:
autoscaling.knative.dev/maxScale: '2'
run.googleapis.com/startup-cpu-boost: 'true'
run.googleapis.com/container-dependencies: "{sandbox-quickjs: [ingress-sidecar]}"
spec:
containerConcurrency: 50
timeoutSeconds: 120
containers:
#Sidecar container for ingress traffic
- image: eu.gcr.io/preparsed/sandbox-quickjs-ingress:latest
name: ingress-sidecar # Name your sidecar container
ports:
- name: http1 # Name your sidecar port
containerPort: 8080 # Add your sidecar port here
env:
- name: API_HOST
value: "localhost"
- name: API_PORT
value: "8081"
resources:
limits:
cpu: 300m
memory: 128Mi
startupProbe:
initialDelaySeconds: 0
timeoutSeconds: 30
periodSeconds: 240
failureThreshold: 1
tcpSocket:
port: 8080
livenessProbe:
initialDelaySeconds: 30
timeoutSeconds: 30
periodSeconds: 240
failureThreshold: 1
httpGet:
path: /api/health
port: 8080
#Main container for sandbox executor application
- image: eu.gcr.io/preparsed/sandbox-quickjs:latest
name: sandbox-quickjs # Name your main container
env:
- name: HOST
value: "localhost"
- name: PORT
value: "8081"
resources:
limits:
cpu: 700m
memory: 256Mi