Skip to content

Commit

Permalink
Volume mount for dag
Browse files Browse the repository at this point in the history
  • Loading branch information
Drew Meyers committed Mar 5, 2024
1 parent b733337 commit 7cf8389
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion airflow/dags/sbg_preprocess_cwl_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,18 @@ def setup(ti=None, **context):
task_id="SBG_Preprocess_CWL",
full_pod_spec=k8s.V1Pod(k8s.V1ObjectMeta(name=("sbg-preprocess-cwl-pod-" + uuid.uuid4().hex))),
pod_template_file=POD_TEMPLATE_FILE,
arguments=["{{ params.cwl_workflow }}", "{{ti.xcom_pull(task_ids='Setup', key='cwl_args')}}"],
arguments=["{{ params.cwl_workflow }}", "{{ti.xcom_pull(task_ids='Setup', key='cwl_args')}}", "/scratch"],
# resources={"request_memory": "512Mi", "limit_memory": "1024Mi"},
dag=dag,
volumes=[
{
"name": "kubernetes-pod-operator-ebs-volume",
"persistentVolumeClaim": {"claimName": "kubernetes-pod-operator-ebs-pvc"},
}
],
volume_mounts=[
{"name": "kubernetes-pod-operator-ebs-volume", "mountPath": "/scratch", "readOnly": False}
],
)

setup_task >> cwl_task

0 comments on commit 7cf8389

Please sign in to comment.