Reamer commented on a change in pull request #4174: URL: https://github.com/apache/zeppelin/pull/4174#discussion_r692950413
########## File path: zeppelin-plugins/launcher/k8s-standard/src/main/java/org/apache/zeppelin/interpreter/launcher/K8sRemoteInterpreterProcess.java ########## @@ -287,10 +288,15 @@ Properties getTemplateBindings(String userName) { k8sProperties.put("zeppelin.k8s.interpreter.rpc.portRange", getInterpreterPortRange()); k8sProperties.put("zeppelin.k8s.server.rpc.service", intpEventServerHost); k8sProperties.put("zeppelin.k8s.server.rpc.portRange", intpEventServerPort); - if (ownerUID() != null && ownerName() != null) { + + String serverNamespace = K8sUtils.getCurrentK8sNamespace(); + String interpreterNamespace = getInterpreterNamespace(); + //Set the owner reference (zeppelin-server pod) for garbage collection when zeppelin server and the zeppelin interpreter is in the same namespace (Kubernetes cannot specify an owner in different namespace). + if (ownerUID() != null && ownerName() != null && serverNamespace != null && serverNamespace.equals(interpreterNamespace)) { Review comment: `K8sUtils.getCurrentK8sNamespace()` can return `null`. Please use [`StringUtils.equals`](https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html#equals-java.lang.CharSequence-java.lang.CharSequence-) -- 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: dev-unsubscr...@zeppelin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org