Github user skonto commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22405#discussion_r217170079
  
    --- Diff: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientApplication.scala
 ---
    @@ -254,3 +251,17 @@ private[spark] class KubernetesClientApplication 
extends SparkApplication {
         }
       }
     }
    +
    +private[spark] object KubernetesClientApplication {
    +
    +  def getAppName(conf: SparkConf): String = 
conf.getOption("spark.app.name").getOrElse("spark")
    +
    +  def getResourceNamePrefix(appName: String): String = {
    +    val launchTime = System.currentTimeMillis()
    +    s"$appName-$launchTime"
    +      .toLowerCase
    +      .replaceAll(" +", " ")
    +      .replaceAll("\\s", "-")
    +      .replaceAll("[^A-Za-z0-9\\-]", "")
    --- End diff --
    
    Might be a bit strict but if people want weird names then they should know 
k8s does not accept it and we use the appname for their convenience when they 
list pods.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to