argoproj-labs / hera

Hera makes Python code easy to orchestrate on Argo Workflows through native Python integrations. It lets you construct and submit your Workflows entirely in Python. ⭐️ Remember to star!
https://hera.rtfd.io
Apache License 2.0
602 stars 106 forks source link

Add LocalVolume to supported volume types #1019

Open p53 opened 7 months ago

p53 commented 7 months ago

Is your feature request related to a problem? Please describe. we would like to use local volumes

Describe the solution you'd like mount local instance storage

Describe alternatives you've considered alternative can be hostPath altough it is not safe alternative and has also some other drawbacks

Additional context Add any other context or screenshots about the feature request here.

flaviuvadan commented 7 months ago

Hey @p53! Thanks for the submission. When you say local do you mean your local machine disk mounted to a pod running in minikube on your local machine as well?

p53 commented 7 months ago

@flaviuvadan hi, i mean https://kubernetes.io/docs/concepts/storage/volumes/#local

jeongukjae commented 3 weeks ago

I think it is already possible if you create PersistentVolume that is mounted to host path, bind it with PersistentVolumeClaim, and use that PVC's name in the workflow. i.e.Workflow(..., volumes=[m.Volume(... persistent_volume_claim={"claim_name": "{PVC NAME}"})], ...)

Following examples may help.

p53 commented 3 weeks ago

@jeongukjae local volume and hostPath are not same thing see https://stackoverflow.com/a/63492933, https://vocon-it.com/2018/12/20/kubernetes-local-persistent-volumes/

jeongukjae commented 3 weeks ago

@p53 Yep, those are different thing. You can use either ways with PV.

Otherwise, can I get your detailed scenarios that should be solved?

p53 commented 3 weeks ago

but then i need to create PV/PVC externally and then mount it with VolumeMount right? We want to use local volumes created on instance store on AWS instances for GPU jobs