-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathnode-template.yaml
67 lines (67 loc) · 1.94 KB
/
node-template.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
apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
name: queue-{{ model_name }}
spec:
protocol: v2
name: queue-{{ model_name }}
annotations:
proxy.istio.io/config: |
terminationDrainDuration: {{ distrpution_time }}s
predictors:
- name: queue-{{ model_name }}
annotations:
seldon.io/no-engine: "true"
componentSpecs:
- spec:
terminationGracePeriodSeconds: {{ distrpution_time }}
# nodeSelector:
# router-node: "true"
containers:
- image: sdghafouri/queue:queue
name: queue-{{ model_name }}
imagePullPolicy: Always
resources:
requests:
cpu: '{{ cpu_request }}'
memory: '{{ memory_request }}'
limits:
cpu: '{{ cpu_limit }}'
memory: '{{ memory_limit }}'
env:
- name: MODEL_NAME
value: {{ model_name }}
- name: LAST_NODE
value: '{{ last_node }}'
- name: MLSERVER_MODEL_MAX_BATCH_SIZE
value: '{{ max_batch_size }}'
- name: MLSERVER_MODEL_MAX_BATCH_TIME
value: '{{ max_batch_time }}'
- name: MLSERVER_PARALLEL_WORKERS
value: "0"
- name: DROP_LIMIT
value: '{{drop_limit}}'
- name: LOGS_ENABLED
value: '{{ logs_enabled }}'
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 0
periodSeconds: 1
successThreshold: 1
tcpSocket:
port: 9000
timeoutSeconds: 1
lifecycle:
preStop:
exec:
command:
- /bin/sh
- -c
- /bin/sleep {{ distrpution_time }}
replicas: 1
graph:
name: queue-{{ model_name }}
type: MODEL
children: []
labels:
sidecar.istio.io/inject: "true"