-
Notifications
You must be signed in to change notification settings - Fork 118
Added service name as prefix to executor pods #14
Added service name as prefix to executor pods #14
Conversation
… apart from kubectl output
@@ -155,7 +155,7 @@ private[spark] class KubernetesClusterSchedulerBackend( | |||
private def allocateNewExecutorPod(): (String, Pod) = { | |||
val executorKubernetesId = UUID.randomUUID().toString.replaceAll("-", "") | |||
val executorId = EXECUTOR_ID_COUNTER.incrementAndGet().toString | |||
val name = s"exec$executorKubernetesId" | |||
val name = s"$kubernetesDriverServiceName-exec$executorKubernetesId" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into name length constraints before while trying to figure out the name. But if this works then I'm fine with this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good point. I'll check the constraints we impose and see if some truncation is needed. IIRC, it's the service names that typically complain about length because they're involved in DNS domain creation.
@@ -155,7 +155,7 @@ private[spark] class KubernetesClusterSchedulerBackend( | |||
private def allocateNewExecutorPod(): (String, Pod) = { | |||
val executorKubernetesId = UUID.randomUUID().toString.replaceAll("-", "") | |||
val executorId = EXECUTOR_ID_COUNTER.incrementAndGet().toString | |||
val name = s"exec$executorKubernetesId" | |||
val name = s"$kubernetesDriverServiceName-exec$executorKubernetesId" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a common convention in k8s for pod names? kebab-case? I might suggest we make this slightly more verbose:
s"$kubernetesDriverServiceName-executor-$executorKubernetesId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the common convention is the kebab-case.
+1 on making the pod name verbose.
@foxish are you good with modifying that podname to have the fuller Any news on the pod name length constraints? |
253 characters for the pod name and 63 characters for service name, which means we should be well within the limits. Will make the change to kebab-case shortly. |
* Added service name as prefix to executor pods to be able to tell them apart from kubectl output * Addressed comments
* Added service name as prefix to executor pods to be able to tell them apart from kubectl output * Addressed comments
* Added service name as prefix to executor pods to be able to tell them apart from kubectl output * Addressed comments
* Added service name as prefix to executor pods to be able to tell them apart from kubectl output * Addressed comments
* Added service name as prefix to executor pods to be able to tell them apart from kubectl output * Addressed comments
Minor change to identify by name, the executor pods created by a particular driver.
/cc @mccheah @ash211