@@ -60,15 +60,22 @@ When you reference the `__dcos_base64__mysecret` secret in your service, the con
60
60
61
61
Once a secret has been added in the secret store,
62
62
you can pass them to Spark with the ` spark.mesos.<task-name>.secret.names ` and
63
- ` spark.mesos.<task-name>.secret.<filenames|envkeys> ` confguration parameters where ` <task-name> ` is either ` driver ` or
63
+ ` spark.mesos.<task-name>.secret.<filenames|envkeys> ` configuration parameters where ` <task-name> ` is either ` driver ` or
64
64
` executor ` . Specifying ` filenames ` or ` envkeys ` will materialize the secret as either a file-based secret or an
65
65
environment variable. These configuration parameters take comma-separated lists that are "zipped" together to make the
66
66
final secret file or environment variable. We recommend using file-based secrets whenever possible as they are more
67
67
secure than environment variables.
68
-
68
+
69
+ ** NOTE** : Secrets are only supported for Mesos containerizer and not for the Docker containerizer.
70
+ To use the Mesos containerizer, add this configuration:
71
+ ```
72
+ --conf spark.mesos.containerizer=mesos
73
+ ```
74
+
69
75
For example to use a secret named ` spark/my-secret-file ` as a file in the driver _ and_ the executors add these configuration
70
76
parameters:
71
77
```
78
+ --conf spark.mesos.containerizer=mesos
72
79
--conf spark.mesos.driver.secret.names=spark/my-secret-file
73
80
--conf spark.mesos.driver.secret.filenames=target-secret-file
74
81
--conf spark.mesos.executor.secret.names=spark/my-secret-file
@@ -78,6 +85,7 @@ this will put the contents of the secret `spark/my-secret-file` in a secure RAM-
78
85
` target-secret-file ` in the driver and executors sandboxes. If you want to use a secret as an environment variable (e.g.
79
86
AWS credentials) you change the configurations to be the following:
80
87
```
88
+ --conf spark.mesos.containerizer=mesos
81
89
--conf spark.mesos.driver.secret.names=/spark/my-aws-secret,/spark/my-aws-key
82
90
--conf spark.mesos.driver.secret.envkeys=AWS_SECRET_ACCESS_KEY,AWS_ACCESS_KEY_ID
83
91
```
@@ -88,6 +96,7 @@ This assumes that your secret access key is stored in a secret named `spark/my-a
88
96
When using a combination of environment and file-based secrets there needs to be an equal number of sinks and secret
89
97
sources (i.e. files and environment variables). For example
90
98
```
99
+ --conf spark.mesos.containerizer=mesos
91
100
--conf spark.mesos.driver.secret.names=/spark/my-secret-file,/spark/my-secret-envvar
92
101
--conf spark.mesos.driver.secret.filenames=target-secret-file,placeholder-file
93
102
--conf spark.mesos.driver.secret.envkeys=PLACEHOLDER,SECRET_ENVVAR
0 commit comments