Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,7 @@ config:
# For Airflow 1.10
rbac: 'True'
celery:
flower_url_prefix: '{{ .Values.ingress.flower.path }}'
flower_url_prefix: '{{ ternary "" .Values.ingress.flower.path (eq .Values.ingress.flower.path "/") }}'
worker_concurrency: 16
scheduler:
standalone_dag_processor: '{{ ternary "True" "False" .Values.dagProcessor.enabled }}'
Expand Down
32 changes: 32 additions & 0 deletions helm_tests/airflow_aux/test_configmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,35 @@ def test_pod_template_is_templated(self):

pod_template_file = jmespath.search('data."pod_template_file.yaml"', docs[0])
assert "mylabel: release-name" in pod_template_file

def test_default_flower_url_prefix(self):
docs = render_chart(
values={
"executor": "CeleryExecutor",
},
show_only=["templates/configmaps/configmap.yaml"],
)
expected = "flower_url_prefix = "
found = False
cfg = jmespath.search('data."airflow.cfg"', docs[0])
for item in cfg.split("\n"):
if item == expected:
found = True

assert found is True

def test_overriden_flower_url_prefix(self):
docs = render_chart(
values={"executor": "CeleryExecutor", "ingress": {"flower": {"path": "/overriden-path"}}},
show_only=["templates/configmaps/configmap.yaml"],
)

expected = "flower_url_prefix = /overriden-path"
found = False

cfg = jmespath.search('data."airflow.cfg"', docs[0])
for item in cfg.split("\n"):
if item == expected:
found = True

assert found is True