Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-38802][K8S][TESTS] Add Support for spark.kubernetes.test.(driver|executor)RequestCores #36087

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions resource-managers/kubernetes/integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,22 @@ to the wrapper scripts and using the wrapper scripts will simply set these appro
</td>
<td></td>
</tr>
<tr>
<td><code>spark.kubernetes.test.driverRequestCores</code></td>
<td>
Set cpu resource for each driver pod in test, this is currently only for test on cpu resource limited cluster,
it's not recommended for other scenarios.
</td>
<td></td>
</tr>
<tr>
<td><code>spark.kubernetes.test.executorRequestCores</code></td>
<td>
Set cpu resource for each executor pod in test, this is currently only for test on cpu resource limited cluster,
it's not recommended for other scenarios.
</td>
<td></td>
</tr>
</table>

# Running the Kubernetes Integration Tests with SBT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ class KubernetesSuite extends SparkFunSuite
.set("spark.kubernetes.driver.label.spark-app-locator", appLocator)
.set("spark.kubernetes.executor.label.spark-app-locator", appLocator)
.set(NETWORK_AUTH_ENABLED.key, "true")
sys.props.get(CONFIG_DRIVER_REQUEST_CORES).map { cpu =>
sparkAppConf.set("spark.kubernetes.driver.request.cores", cpu)
}
sys.props.get(CONFIG_EXECUTOR_REQUEST_CORES).map { cpu =>
sparkAppConf.set("spark.kubernetes.executor.request.cores", cpu)
}
if (!kubernetesTestComponents.hasUserSpecifiedNamespace) {
kubernetesTestComponents.createNamespace()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ object TestConstants {
val CONFIG_KEY_IMAGE_TAG_FILE = "spark.kubernetes.test.imageTagFile"
val CONFIG_KEY_IMAGE_REPO = "spark.kubernetes.test.imageRepo"
val CONFIG_KEY_UNPACK_DIR = "spark.kubernetes.test.unpackSparkDir"
val CONFIG_DRIVER_REQUEST_CORES = "spark.kubernetes.test.driverRequestCores"
val CONFIG_EXECUTOR_REQUEST_CORES = "spark.kubernetes.test.executorRequestCores"
}