Skip to content

Commit fd9f7da

Browse files
committedNov 26, 2024·
Add flower celery web monitor app
1 parent 70a6702 commit fd9f7da

File tree

4 files changed

+77
-1
lines changed

4 files changed

+77
-1
lines changed
 

‎helm/servicex/templates/app/ingress.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ spec:
2727
backend:
2828
service:
2929
name: {{ .Release.Name }}-servicex-app
30-
port:
30+
port:
3131
number: 8000
32+
{{- if .Values.flower.enabled }}
33+
- path: /flower
34+
pathType: Prefix
35+
backend:
36+
service:
37+
name: {{ .Release.Name }}-flower
38+
port:
39+
number: 8000
40+
{{- end }}
41+
3242
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
{{- if .Values.flower.enabled }}
3+
apiVersion: apps/v1
4+
kind: Deployment
5+
metadata:
6+
name: {{ $.Release.Name }}-flower
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app: {{ $.Release.Name }}-flower
12+
template:
13+
metadata:
14+
labels:
15+
app: {{ $.Release.Name }}-flower
16+
spec:
17+
containers:
18+
- name: {{ $.Release.Name }}-flower
19+
image: {{ .Values.flower.image }}:{{ .Values.flower.tag }}
20+
tty: true
21+
stdin: true
22+
imagePullPolicy: {{ .Values.flower.pullPolicy }}
23+
env:
24+
{{- if .Values.secrets }}
25+
- name: RMQ_PASS
26+
valueFrom:
27+
secretKeyRef:
28+
name: {{ .Values.secrets }}
29+
key: rabbitmq-password
30+
- name: BROKER_URL
31+
value: amqp://user:$(RMQ_PASS)@{{ .Release.Name }}-rabbitmq:5672/?heartbeat=9000
32+
{{- else }}
33+
- name: BROKER_URL
34+
value: amqp://user:{{ .Values.rabbitmq.auth.password }}@{{ .Release.Name }}-rabbitmq:5672/%2F
35+
{{- end }}
36+
37+
command: [ "/bin/sh" ]
38+
args: [ "-c", "celery --broker $BROKER_URL flower --purge_offline_workers=60" ]
39+
40+
ports:
41+
- containerPort: 5555
42+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
{{- if .Values.flower.enabled }}
3+
apiVersion: v1
4+
kind: Service
5+
metadata:
6+
name: {{ .Release.Name }}-flower
7+
spec:
8+
ports:
9+
- port: 8000
10+
targetPort: 5555
11+
name: "tcp"
12+
protocol: TCP
13+
selector:
14+
app: {{ .Release.Name }}-flower
15+
type: ClusterIP
16+
{{- end }}

‎helm/servicex/values.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,11 @@ dataLifecycle:
203203
# See https://www.geeksforgeeks.org/date-command-linux-examples/#4-how-to-display-past-dates
204204
# for examples
205205
retention: "7 days ago"
206+
207+
# Flower is a web based tool for monitoring and administrating Celery clusters.
208+
# It can be used to inspect tasks, view graphs and logs, restart workers, and more.
209+
flower:
210+
enabled: true
211+
image: mher/flower
212+
tag: master
213+
pullPolicy: Always

0 commit comments

Comments
 (0)
Please sign in to comment.