Skip to content

Commit

Permalink
feat: add flower host
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Aug 20, 2024
1 parent b7c3e1e commit b3e3e49
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tutorcelery/patches/caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% if CELERY_FLOWER and CELERY_FLOWER_PUBLIC %}
# flower
{{ CELERY_FLOWER_HOST }}{$default_site_port} {
import proxy "flower:5555"
}
{% endif %}
1 change: 1 addition & 0 deletions tutorcelery/patches/k8s-deployments
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ spec:
image: {{CELERY_FLOWER_DOCKER_IMAGE}}
ports:
- containerPort: 5555
name: metrics
env:
- name: CELERY_BROKER_URL
value: redis://{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ OPENEDX_CELERY_REDIS_DB }}
Expand Down
16 changes: 16 additions & 0 deletions tutorcelery/patches/k8s-services
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% if CELERY_FLOWER %}
---
apiVersion: v1
kind: Service
metadata:
name: flower
labels:
app.kubernetes.io/name: flower
spec:
type: ClusterIP
ports:
- port: 5555
protocol: TCP
selector:
app.kubernetes.io/name: flower
{% endif %}
1 change: 1 addition & 0 deletions tutorcelery/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
("CELERY_LMS_EXPLICIT_QUEUES", {}),
("CELERY_CMS_EXPLICIT_QUEUES", {}),
("CELERY_FLOWER", False),
("CELERY_FLOWER_PUBLIC", False),
("CELERY_FLOWER_HOST", "flower.{{LMS_HOST}}"),
("CELERY_FLOWER_DOCKER_IMAGE", "docker.io/mher/flower:2.0.1"),
("CELERY_MULTIQUEUE_ENABLED", False),
Expand Down

0 comments on commit b3e3e49

Please sign in to comment.