run kubernetes launcher

This commit is contained in:
Lee moon soo 2018-11-22 05:33:22 +09:00
parent 2fd2ac8c39
commit 9f1b7a1691

View file

@ -636,13 +636,23 @@ public class InterpreterSetting {
}
public String getLauncherPlugin() {
if (group.equals("spark")) {
return "SparkInterpreterLauncher";
if (isRunningOnKubernetes()) {
return "K8sStandardInterpreterLauncher";
} else {
return "StandardInterpreterLauncher";
if (group.equals("spark")) {
return "SparkInterpreterLauncher";
} else {
return "StandardInterpreterLauncher";
}
}
}
private boolean isRunningOnKubernetes() {
String mode = conf.getK8sMode();
return ("auto".equalsIgnoreCase(mode) && new File("/var/run/secrets/kubernetes.io").exists())
|| "on".equalsIgnoreCase(mode);
}
public boolean isUserAuthorized(List<String> userAndRoles) {
if (!option.permissionIsSet()) {
return true;