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.
On Tuesday, July 19, 2016, Gurvinder Singh <[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] > <javascript:_e(%7B%7D,'cvml','google-containers%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[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.
