title: How to pass environment variables to spark driver in cluster mode with spark-submit
body: <p><code>spark-submit</code> allows to configure the executor environment variables with <code>--conf spark.executorEnv.FOO=bar</code>, and the Spark REST API allows to pass some environment variables with the <code>environmentVariables</code> field.
  Unfortunately I've found nothing similar to configure the environment variable of the driver when submitting the driver with <code>spark-submit</code> in cluster mode:</p>
  
  <pre><code>spark-submit --deploy-mode cluster myapp.jar
  </code></pre>
  
  <p>Is it possible to set the environment variables of the driver with <code>spark-submit</code> in cluster mode?</p>