-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpipeline_worker.yaml
105 lines (99 loc) · 3.94 KB
/
pipeline_worker.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
104
105
# TODO: max 1 replica supported. there is no feature to set max no of replicas.
# to achieve this, clone the pvc, and set ReadWriteOnce access mode. (?)
# Note: pipeline must have an ExportToSpreadsheet module.
# CellProfiler is quite resource hungry -- if it seems to inexplicably die, its probably ran out of memory.
apiVersion: apps/v1
kind: Deployment
metadata:
name: pipeline-worker
namespace: haste
spec:
selector:
matchLabels:
app: pipeline-worker
replicas: 1
template:
metadata:
name: test
labels:
app: pipeline-worker
spec:
containers:
- name: pipeline-worker
image: benblamey/haste_pipeline_worker:v3
args:
- "--host"
- haste-rabbitmq.haste.svc.cluster.local
- "--config"
- '{
"configs": [
{
"tag": "mikro-testdata-source",
"root_path": "/mnt/mikro-testdata/source/",
"pipeline": "/mnt/mikro-testdata/MeasureImageQuality-TestImages.cppipe",
"storage_policy": "[ [0, 0.25, \"tierD\"], [0.25, 0.50, \"tierC\"], [0.50, 0.75, \"tierB\"], [0.75, 1.01, \"tierA\"] ]",
"interestingness_model": {
"name": "LogisticInterestingnessModel",
"key": ["cellprofiler_output", "ImageQuality_PowerLogLogSlope_myimages"],
"k": -4.5,
"x_0": -1.4
},
"haste_storage_client_config": {
"haste_metadata_server": {
"connection_string": "mongodb://haste-mongodb:27017/streams"
},
"log_level": "DEBUG",
"targets": [
{
"id": "tierA",
"class": "haste_storage_client.storage.storage.MoveToDir",
"config": {
"source_dir": "/mnt/mikro-testdata/source/",
"target_dir": "/mnt/mikro-testdata/target/A/"
}
},
{
"id": "tierB",
"class": "haste_storage_client.storage.storage.MoveToDir",
"config": {
"source_dir": "/mnt/mikro-testdata/source/",
"target_dir": "/mnt/mikro-testdata/target/B/"
}
},
{
"id": "tierC",
"class": "haste_storage_client.storage.storage.MoveToDir",
"config": {
"source_dir": "/mnt/mikro-testdata/source/",
"target_dir": "/mnt/mikro-testdata/target/C/"
}
},
{
"id": "tierD",
"class": "haste_storage_client.storage.storage.MoveToDir",
"config": {
"source_dir": "/mnt/mikro-testdata/source/",
"target_dir": "/mnt/mikro-testdata/target/D/"
}
}
]
}
}
]
}'
imagePullPolicy: Always # we use 'latest' tag, always pull. note: need to delete and re-create deployment for it to happen!
volumeMounts:
- mountPath: "/mnt/mikro-testdata"
name: test-volume
resources:
limits:
cpu: 2000m
memory: 1Gi
requests:
cpu: 1200m
memory: 400Mi
volumes:
- name: test-volume
persistentVolumeClaim:
claimName: mikro-testdata-pvc
restartPolicy: Always