No problem! Hope it works :) On Saturday, November 11, 2017, lppier <madst...@gmail.com> wrote:
> Yup I can do that. Was just wondering .. thanks for your help! > > On Friday, 10 November 2017 22:25:42 UTC+8, Rodrigo Campos wrote: >> >> Oh, sorry, Kubernetes users was removed. Adding it back >> >> On Friday, November 10, 2017, Rodrigo Campos <rodr...@gmail.com> wrote: >> >>> So they will create the deployment and you want that user executing that? >>> >>> Then i think this will work: just a template and modify those variables >>> in the fly, and then send the modified yaml. >>> >>> There are some tools for that, but if the case is so simple I'd use just >>> a shell script (with sed or awk). >>> >>> Does that solve it? >>> >>> On Friday, November 10, 2017, lppier <madst...@gmail.com> wrote: >>> >>>> Say I am the linux user with the name "pier" >>>> The volume mount in my pod fileis : >>>> >>>> hostPath: >>>> path: /nfs/data1/home/pier >>>> >>>> >>>> As I have multiple users, I don't want user mounting >>>> /nfs/data1/home/pier all the time, but rather >>>> >>>> /nfs/data1/home/<their_user_name> >>>> >>>> Of course, it would not be too difficult to ask them to edit the pod >>>> yaml themselves. Just wondering whether I can do it for them by using their >>>> linux username in the pod file. >>>> >>>> >>>> On Friday, 10 November 2017 12:16:29 UTC+8, Rodrigo Campos wrote: >>>>> >>>>> Not sure what you mean, probably the answer is "no". But I don't >>>>> understand what you want. >>>>> >>>>> Do you want to replace $USER with what, exactly? The user running what? >>>>> >>>>> What are you trying to do? >>>>> >>>>> It seems like you are mixing things that do not have anything to do >>>>> with each other. But, I might be wrong, can you please elaborate? >>>>> >>>>> On Friday, November 10, 2017, lppier <mads...@gmail.com> wrote: >>>>> >>>>>> Yes, I meant dynamically, like I would $USER in linux. Is it possible? >>>>>> >>>>>> >>>>>> On Friday, 10 November 2017 10:55:58 UTC+8, Rodrigo Campos wrote: >>>>>>> >>>>>>> On Thursday, November 9, 2017, lppier <mads...@gmail.com> wrote: >>>>>>> >>>>>>>> In my pod yaml file, I need to mount the user's current directory >>>>>>>> for use within the container. >>>>>>>> >>>>>>>> - hostPath: >>>>>>>> path: /nfs/data1/home/cys >>>>>>>> >>>>>>>> >>>>>>>> where cys is the user. >>>>>>>> How can I grab the current linux user in the pod spec? I can't seem >>>>>>>> to find any info on this. >>>>>>>> >>>>>>> >>>>>>> What do you mean with "current user"? The user running the pod? That >>>>>>> can be specified in the yaml statically. I can't think of anything >>>>>>> dynamic, >>>>>>> so not sure what you mean :-/ >>>>>>> >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Kubernetes user discussion and Q&A" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to kubernetes-users+unsubscr...@googlegroups.com. >>>>>> To post to this group, send email to kubernetes-users@googlegroups. >>>>>> com. >>>>>> Visit this group at https://groups.google.com/group/kubernetes-users. >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.