surahman commented on pull request #3725: URL: https://github.com/apache/incubator-heron/pull/3725#issuecomment-968090797
Thank you for taking the time to look at this! I think it is important to keep in mind the following key limitations of a `StatefulSet`: * Pod templates are copied verbatim. * Volumes are shared with all Pods. * The same volume mounts are duplicated in matching containers across Pods. * Only way to have unique volumes per pod is to leverage `volumeClaimTemplates`. Please see [***Stable Storage***](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/). If you would like to mount a volume you have already created you need to name it based on the naming convention K8s uses. K8s will initially attempt locating a persistent volume that matches the persistent volume claim, if that fails it attempts to generate a dynamically backed volume. If I proceed to add volumes to the `StatefulSet`, those volumes will be shared in all Pods. To mount a volume in a Pod you need to have a linked Volume in the Pod's spec. We could have some bash trickery that mounts the unique Volume into a container, but that volume will be shared with all other Pods. The long and the short of it is that we will end up right back where we started with the Volume being shared with all Pods. It is bad design to utilize the same CLI parameter to mount both unique and shared volumes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
