Support custom YAML for the driver pod spec #38
Description
We started with our base implementation, which hard-codes the pod spec to have specific fields. We then thought of the idea of supporting custom labels. However, there's plenty of things on an arbitrary user's application that could be useful to customize, such as ports and mounted volumes.
This issue therefore proposes that we support users providing arbitrary YAML files that describe the pod, or at least any modifications and augmentations they would like to make. We need to be careful when considering the API and expectations here. One mode of operation could be, the user specifies a custom file for the pod via —driver-pod-spec-file
or an equivalent SparkConf. We can then take the user's pod spec and augment it with whatever is missing - for example, adding the Spark UI and REST submission server ports which are required for Spark.
The tricky part is the fact that the user has to specify that the container is running the Spark driver submission server, and that this container is the one that needs the custom ports open. Thus we should probably support adding —driver-container
that must be set if the custom pod spec is set, so that we know which container we need to adjust to add the missing ports, etc. I don't know if there is any way we can make this easy to use, but in a sense usability seems to be a secondary issue here - I anticipate this will primarily be used for specific off-roading "power-user" scenarios.