@task(
pod_template=PodTemplate(
primary_container_name="dumppod",
pod_spec=V1PodSpec(
host_ipc=True,
restart_policy="Never",
service_account="default",
service_account_name="default",
containers=[
V1Container(
name="primary",
image_pull_policy="Always",
resources={"requests": {"cpu": "4", "memory": "12Gi"}},
),
V1Container(
name="dumppod",
image="google/cloud-sdk",
volume_mounts=[
V1VolumeMount(
name="gcs-volume",
mount_path="/mnt/gcs"
)
]
),
],
volumes=[
V1Volume(
name="gcs-volume",
persistent_volume_claim=V1PersistentVolumeClaimVolumeSource(
claim_name="gcs-pvc-flyte"(claim-name)
)
)
],
),
)
)
def use_persistent_volume():
time.sleep(6000)
# Your logic to use the mounted volume
print("Using the mounted volume at /mnt/gcs")
@workflow
def pvc_usando_workflow():
use_persistent_volume()
suppose this is the task config I have
I want to give claim_name while running the flyte workflow instead of hard coding as "gcs-pvc-flyte" how can i achieve this?