mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
run kubernetes launcher
This commit is contained in:
parent
2fd2ac8c39
commit
9f1b7a1691
1 changed files with 13 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue