diegoalvarez-clarity commented on code in PR #70180:
URL: https://github.com/apache/airflow/pull/70180#discussion_r4045779850
##########
chart/tests/helm_tests/airflow_aux/test_airflow_common.py:
##########
@@ -416,6 +416,42 @@ def test_have_all_config_mounts_on_init_containers(self):
for doc in docs:
assert expected_mount in
jmespath.search("spec.template.spec.initContainers[0].volumeMounts", doc)
+ def test_mount_config_as_dir(self):
+ components = [
+ "templates/scheduler/scheduler-deployment.yaml",
+ "templates/workers/worker-deployment.yaml",
+ "templates/api-server/api-server-deployment.yaml",
+ "templates/triggerer/triggerer-deployment.yaml",
+ "templates/dag-processor/dag-processor-deployment.yaml",
+ ]
+ docs = render_chart(
+ values={"mountConfigAsDir": True, "airflowLocalSettings": "# local
settings"},
+ show_only=components,
+ )
+ assert len(docs) == len(components)
+ dir_mount = {"name": "config", "mountPath": "/opt/airflow/config",
"readOnly": True}
+ for doc in docs:
+ mounts =
jmespath.search("spec.template.spec.containers[0].volumeMounts", doc)
+ # airflow.cfg / airflow_local_settings.py are now served from the
mounted directory
+ assert dir_mount in mounts
+ assert not [m for m in mounts if m.get("subPath") in
("airflow.cfg", "airflow_local_settings.py")]
+ # AIRFLOW_CONFIG points Airflow at the config in the mounted
directory
Review Comment:
Removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]