zwangsheng commented on code in PR #5695:
URL: https://github.com/apache/kyuubi/pull/5695#discussion_r1398578910
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/util/KubernetesUtils.scala:
##########
@@ -137,6 +137,8 @@ object KubernetesUtils extends Logging {
lazy val resolvedResourceName = s"kyuubi-${getResourceNamePrefix(appName,
engineRefId)}-driver"
if (forciblyRewrite || resolvedResourceName.length >
DRIVER_POD_NAME_MAX_LENGTH) {
s"kyuubi-$engineRefId-driver"
+ } else if (appName.contains(engineRefId)){
+ getResourceNamePrefix(appName, "driver")
} else {
resolvedResourceName
}
Review Comment:
```suggestion
val resourceNamePrefix = if (appName.contains(engineRefId)) {
getResourceNamePrefix(appName, "")
} else {
getResourceNamePrefix(appName, engineRefId)
}
val resolvedResourceName = if (resourceNamePrefix.startsWith("kyuubi")) {
s"$resourceNamePrefix-driver"
} else {
s"kyuubi-$resourceNamePrefix-driver"
}
if (resolvedResourceName.length <= DRIVER_POD_NAME_MAX_LENGTH) {
resolvedResourceName
} else {
s"kyuubi-$engineRefId-driver"
}
```
--
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]