EG version upgrade to 1.3
[ealt-edge.git] / example-apps / PDD / pcb-defect-detection / pcb-be-k8s.yaml
1 # Copyright 2020 Huawei Technologies Co., Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 ---
15 apiVersion: apps/v1
16 kind: Deployment
17 metadata:
18   name: pcbdefdet-be
19 spec:
20   replicas: 1
21   selector:
22     matchLabels:
23       app: pcbdefdet
24   template:
25     metadata:
26       labels:
27         app: pcbdefdet
28     spec:
29       containers:
30         - name: pcbdefdet-be
31           image: ealtedge/pcbdefdet-be
32           ports:
33             - containerPort: 9991
34           volumeMounts:
35             - name: host-path-storage
36               mountPath: "/usr/app/data/pretrained_weights"
37             - name: host-path-storage
38               mountPath: "/usr/app/output/trained_weights/FPN_Res101_0117_OHEM"
39       volumes:
40         - name: host-path-storage
41           persistentVolumeClaim:
42             claimName: host-path-claim
43
44 ---
45 apiVersion: v1
46 kind: PersistentVolume
47 metadata:
48   name: host-path-pv
49   labels:
50     type: local
51 spec:
52   storageClassName: manual
53   capacity:
54     storage: 2Gi
55   accessModes:
56     - ReadWriteOnce
57   hostPath:
58     path: "/root/pcb-def-det/model/"
59
60 ---
61 apiVersion: v1
62 kind: PersistentVolumeClaim
63 metadata:
64   name: host-path-claim
65 spec:
66   storageClassName: manual
67   accessModes:
68     - ReadWriteOnce
69   resources:
70     requests:
71       storage: 2Gi
72
73 # backup-be serice
74 ---
75 apiVersion: v1
76 kind: Service
77 metadata:
78   name: pcbdefdet-be
79 spec:
80   selector:
81     app: pcbdefdet
82   type: NodePort
83   ports:
84     - port: 9991
85       name: service-port
86       nodePort: 30281