I have a requirement where I have to read information about pods such as podname, attachedvolume name etc and pass it onto the DockerFile which will write this information inside the container configuration files. This docker image is part of the same pod spec which will get downloaded.
If you need to pass information about pod into a configuration file you can use environment variables or Downward API.