kubeflow / spark-operator

Kubernetes operator for managing the lifecycle of Apache Spark applications on Kubernetes.
Apache License 2.0
2.8k stars 1.38k forks source link

[FEATURE] Truncate Webui Service name #2300

Closed BCantos17 closed 4 days ago

BCantos17 commented 3 weeks ago

What feature you would like to be added?

Truncate the service name of the web ui if the name reaches the character limit of 63

Why is this needed?

Kubernetes has a character limit for the names of their service and will fail to create if the limit is reached

Describe the solution you would like

Either truncate the name similar as seen in this file _helper.tpl file or what we see in spark kubernetes core

Describe alternatives you have considered

No response

Additional context

No response

Love this feature?

Give it a 👍 We prioritize the features with most 👍

jacobsalway commented 3 weeks ago

/assign @jacobsalway

I'll take on this feature request. I've run into the same issue internally pre 2.0 and copied the logic that Spark core uses https://github.com/apache/spark/blob/b6c569fe4d702e91c47ed7848b3c5cc173e59b19/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesConf.scala#L102-L116

leticiasss commented 2 weeks ago

Is there any update on this feature?

jacobsalway commented 2 weeks ago

@leticiasss I've raised a pull request that should fix this issue.