Skip to content

Commit 1d871ca

Browse files
committed
Add first version of example celery resource
1 parent 8922419 commit 1d871ca

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

deploy/cr.yaml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ kind: Celery
33
metadata:
44
name: example-celery-obj
55
spec:
6-
common:
7-
appName: celery-crd-example
8-
celeryApp: 'app:celery_app'
9-
image: example-image
6+
image: example-image
7+
imagePullPolicy: Never
8+
appName: celery-example
9+
celeryApp: 'app:celery_app'
10+
celeryVersion: "4.X"
11+
workerReplicas: 3
12+
flowerReplicas: 2
1013
workerSpec:
11-
numOfWorkers: 2
12-
queues: celery # default queue name
13-
logLevel: debug
14-
concurrency: 2
14+
args: [ "--loglevel", "INFO", "-Ofair", "-Q", "celery", "-c", "2" ]
1515
resources:
1616
requests:
1717
cpu: "100m"
@@ -20,20 +20,23 @@ spec:
2020
cpu: "200m"
2121
memory: "128Mi"
2222
flowerSpec:
23-
replicas: 1
23+
service:
24+
metadata:
25+
name: celery-example-flower
26+
namespace: default
27+
labels:
28+
app: celery-example-flower
29+
spec:
30+
type: NodePort
31+
ports:
32+
- port: 5555
33+
protocol: TCP
34+
selector:
35+
run: celery-example-flower
2436
resources:
2537
requests:
2638
cpu: "100m"
2739
memory: "64Mi"
2840
limits:
2941
cpu: "200m"
30-
memory: "128Mi"
31-
scaleTargetRef:
32-
- kind: worker
33-
minReplicas: 2
34-
maxReplicas: 5
35-
metrics:
36-
- name: message_queue
37-
target:
38-
type: length
39-
averageValue: 100
42+
memory: "128Mi"

0 commit comments

Comments
 (0)