-
Notifications
You must be signed in to change notification settings - Fork 3
/
fastflows.yaml
103 lines (103 loc) · 2.24 KB
/
fastflows.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
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
apiVersion: v1
kind: PersistentVolume
metadata:
name: fastflows-volume
labels:
type: local
app: fastflows
spec:
storageClassName: manual
capacity:
storage: 500M
accessModes:
- ReadWriteMany
hostPath:
path: /app/flows
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: fastflows-volume-claim
labels:
app: fastflows
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 500M
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: fastflows
spec:
selector:
matchLabels:
app: fastflows
replicas: 2
template:
metadata:
labels:
app: fastflows
spec:
initContainers:
- name: check-orion-is-ready
image: curlimages/curl
command:
[
"sh",
"-c",
'while [ `curl -fsS http://orion:4200 --silent --output /dev/null"` -ne 200 ]; do sleep 2; done',
]
- name: orion-queue
image: prefecthq/prefect:2.3.0-python3.9
command:
[
"sh",
"-c",
'prefect work-queue create default-queue; r=$?; [ "$r" -gt 0 ] && exit 0; exit 0',
]
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 4200
env:
- name: PREFECT_API_URL
value: http://orion:4200/api
containers:
- name: main
image: geobeyond/fastflows:latest
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 5010
env:
- name: PREFECT__URI
value: http://orion:4200
- name: FLOWS_HOME
value: "/flows"
- name: UVICORN__PORT
value: "5010"
command: ["fastflows", "server"]
volumeMounts:
- mountPath: /flows
name: fastflows-volume
volumes:
- name: fastflows-volume
persistentVolumeClaim:
claimName: fastflows-volume-claim
---
apiVersion: v1
kind: Service
metadata:
name: fastflows
labels:
app: fastflows
spec:
ports:
- name: http
protocol: TCP
port: 5010
targetPort: 5010
selector:
app: fastflows