On 07/19/2016 01:10 PM, Rodrigo Campos wrote:
> Yes, it's not supported.
> 
> The alternative I see is making /etc/passwd a Symlink. So, you mount the
> secret in /etc/secret/ (to say something) and the container image has a
> Symlink pointing /etc/passwd to /etc/secret/passwd.
Well that will work, but I do not control all the container images which
users will run. So having option to project the file can help. This is
useful not only for passwd case but other configuration cases too where
a program except the config file to a certain directory path with other
files in that dir.

Any plans to add this feature.

- Gurvinder
> 
> On Tuesday, July 19, 2016, Gurvinder Singh
> <[email protected] <mailto:[email protected]>>
> wrote:
> 
>     I am trying to project a file e.g. /opt/passwd under /opt dir, but
>     currently neither secret or configmap appears to support projecting
>     a file under already populated dir, I can't access other contents
>     under it. The only content I found is /opt/passwd in this case.
>     Below is the example when using secret
> 
>     apiVersion: v1
>     kind: Pod
>     metadata:
>       name: busybox
>     spec:
>       containers:
>       - name: busybox
>         image: busybox
>         command:
>           - sleep
>           - "3600"
>         volumeMounts:
>           - name: passwd
>             mountPath: /opt
>       volumes:
>         - name: passwd
>           secret:
>             secretName: proj-passwd
>             items:
>               - key: passwd
>                 path: passwd
> 
>     The idea is project it under /etc/passwd but when I use /etc as
>     mountPath container won't start due to nothing else being there
>     except "passwd" file.
> 
>     -- 
>     You received this message because you are subscribed to the Google
>     Groups "Containers at Google" group.
>     To unsubscribe from this group and stop receiving emails from it,
>     send an email to [email protected].
>     To post to this group, send email to [email protected].
>     Visit this group at https://groups.google.com/group/google-containers.
>     For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Containers at Google" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/google-containers.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Containers at Google" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-containers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to