dongjoon-hyun commented on a change in pull request #35943:
URL: https://github.com/apache/spark/pull/35943#discussion_r832783294
##########
File path:
resource-managers/kubernetes/core/src/test/scala/org/apache/spark/deploy/k8s/KubernetesConfSuite.scala
##########
@@ -244,4 +244,10 @@ class KubernetesConfSuite extends SparkFunSuite {
assert(KubernetesConf.getAppNameLabel("a" * 64) === "a" * 63)
assert(KubernetesConf.getAppNameLabel("a" * 253) === "a" * 63)
}
+
+ test("SPARK-38630: K8s label value should start and end with alphanumeric") {
+ assert(KubernetesConf.getAppNameLabel("-hello-") === "hello")
+ assert(KubernetesConf.getAppNameLabel("a" * 62 + "-aaa") === "a" * 62)
+ assert(KubernetesConf.getAppNameLabel("-" + "a" * 63) === "a" * 62)
Review comment:
The above two cases happen after `StringUtils.abbreviate`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]