Kubernetes Volumes - Dynamic path
As of kubernetes 1.17 this is supported using subPathExpr. See https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath-expanded-environment for details.
An alpha feature that might help is available in kubernetes 1.11. I haven't tested it, but it apparently allows something like:
volumeMounts:
- mountPath: /var/log
name: logs
subPathFrom:
fieldRef:
fieldPath: metadata.name
volumes:
- name: logs
hostPath:
path: /var/logs/apps/