You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by mccheah <gi...@git.apache.org> on 2018/07/31 22:07:04 UTC
[GitHub] spark pull request #21884: [SPARK-24960][K8S] explicitly expose ports on dri...
Github user mccheah commented on a diff in the pull request:
https://github.com/apache/spark/pull/21884#discussion_r206699070
--- Diff: resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/features/BasicDriverFeatureStepSuite.scala ---
@@ -87,6 +87,10 @@ class BasicDriverFeatureStepSuite extends SparkFunSuite {
assert(configuredPod.container.getImage === "spark-driver:latest")
assert(configuredPod.container.getImagePullPolicy === CONTAINER_IMAGE_PULL_POLICY)
+ val expectedPortNames = Set(DRIVER_PORT_NAME, BLOCK_MANAGER_PORT_NAME, UI_PORT_NAME)
+ val foundPortNames = configuredPod.container.getPorts.asScala.map(port => port.getName).toSet
--- End diff --
Better to be safer here and check the protocol and the target port numbers. You can just compare against a list of expected `ContainerPort` objects - Kubernetes objects in our Java API have been good about giving us sane `equals` implementations.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org