This repository has been archived by the owner on Feb 18, 2022. It is now read-only.
forked from radanalyticsio/tensorflow-serving-s2i
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yml
127 lines (127 loc) · 3.01 KB
/
deployment.yml
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
---
kind: Template
apiVersion: v1
metadata:
name: tensorflow-server
annotations:
description: Tensorflow Serving server
tags: tf-app
objects:
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: "${APPLICATION_NAME}"
labels:
appTypes: tensorflow-serving-s2i
app: "${APPLICATION_NAME}"
spec:
strategy:
type: Rolling
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- "${APPLICATION_NAME}"
from:
kind: ImageStreamTag
name: "${IMAGESTREAM}"
replicas: ${{REPLICAS}}
selector:
deploymentconfig: "${APPLICATION_NAME}"
template:
metadata:
labels:
deploymentconfig: "${APPLICATION_NAME}"
appTypes: tensorflow-serving-s2i
app: "${APPLICATION_NAME}"
spec:
containers:
- name: "${APPLICATION_NAME}"
image: "${APPLICATION_NAME}:latest"
env:
- name: PORT
value: "${PORT}"
- name: REST_PORT
value: "${REST_PORT}"
- name: MODEL_NAME
value: "${MODEL_NAME}"
- name: RUN_OPTIONS
value: "${RUN_OPTIONS}"
- name: TF_CPP_MIN_VLOG_LEVEL
value: "${TF_CPP_MIN_VLOG_LEVEL}"
- name: FILE_SYSTEM_POLL
value: "${FILE_SYSTEM_POLL}"
ports:
- containerPort: ${{PORT}}
protocol: TCP
- containerPort: ${{REST_PORT}}
protocol: TCP
- apiVersion: v1
kind: Service
metadata:
name: ${APPLICATION_NAME}-grpc
labels:
appTypes: tensorflow-serving-s2i
app: ${APPLICATION_NAME}
spec:
ports:
- name: 8500-tcp
port: 8500
protocol: TCP
targetPort: 8500
selector:
deploymentconfig: ${APPLICATION_NAME}
- kind: Service
apiVersion: v1
metadata:
name: "${APPLICATION_NAME}-rest"
labels:
appTypes: tensorflow-serving-s2i
app: "${APPLICATION_NAME}"
spec:
ports:
- name: "8501-tcp"
protocol: TCP
port: 8501
targetPort: 8501
selector:
deploymentconfig: "${APPLICATION_NAME}"
parameters:
- name: APPLICATION_NAME
description: The name of the application.
value: tf-app-server
from: "[a-zA-Z0-9]{10}"
required: true
- name: REPLICAS
value: "1"
required: true
- name: IMAGESTREAM
description: Name of the Imagestream containing the model
value: tf-cnn-build:latest
required: false
- name: MODEL_NAME
description: 'Name of the model. ex: mnist'
value: mnist
required: false
- name: RUN_OPTIONS
description: Additional options for tensorflow_model_server.
value: ''
required: false
- name: PORT
description: Grpc Port
value: '8500'
required: false
- name: REST_PORT
description: REST port
value: '8501'
required: false
- name: TF_CPP_MIN_VLOG_LEVEL
description: debug level
value: '3'
required: false
- name: FILE_SYSTEM_POLL
description: polling model changes
value: '30'
required: false