Is there a way to specify a hostPath volume so that it includes the pod's name? For example, something like the following:
volumes:
- name: vol-test
hostPath:
path: /basedir/$(POD_NAME)
type: Directory
Simply using /basedir directly and then have the pod itself query for its name and create the directory doesn't satisfy my needs: I specifically want to map each of my containers' /tmp folders to specific volumes.
I know that something similar works with valueFrom for environment variables (see here), but so far I haven't been able to find anything similar for volumes.
Please let me know if anyone has any ideas. Thanks!