dimberman commented on a change in pull request #3683: [AIRFLOW-2770]
kubernetes: add support for dag folder in the docker i…
URL: https://github.com/apache/incubator-airflow/pull/3683#discussion_r220668743
##########
File path: airflow/contrib/kubernetes/worker_configuration.py
##########
@@ -121,32 +121,19 @@ def _construct_volume(name, claim):
return volume
volumes = [
- _construct_volume(
- dags_volume_name,
- self.kube_config.dags_volume_claim
- ),
_construct_volume(
logs_volume_name,
self.kube_config.logs_volume_claim
)
]
- dag_volume_mount_path = ""
-
- if self.kube_config.dags_volume_claim:
- dag_volume_mount_path = self.worker_airflow_dags
- else:
- dag_volume_mount_path = os.path.join(
- self.worker_airflow_dags,
- self.kube_config.git_subpath
+ if not self.kube_config.dags_in_docker:
+ volumes.append(
+ _construct_volume(
+ dags_volume_name,
+ self.kube_config.dags_volume_claim
+ )
)
- dags_volume_mount = {
- 'name': dags_volume_name,
- 'mountPath': dag_volume_mount_path,
- 'readOnly': True,
- }
- if self.kube_config.dags_volume_subpath:
- dags_volume_mount['subPath'] = self.kube_config.dags_volume_subpath
logs_volume_mount = {
Review comment:
Could we please modify this s.t. users can determine not to use a volume for
logs? Would be great to completely separate the necessity of volumes for
launching.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services