theonedev/onedev · error · ExplicitException

OneDev running inside kubernetes cluster does not support wo

Error message

OneDev running inside kubernetes cluster does not support workspaces yet

What it means

ServerShellProvisioner.checkApplicable throws ExplicitException when OneDev is running inside a Kubernetes cluster. Server-shell workspaces (tmux sessions on the OneDev host) are unsupported in k8s deployments.

Source

Thrown at server-plugin/server-plugin-provisioner-servershell/src/main/java/io/onedev/server/plugin/provisioner/servershell/ServerShellProvisioner.java:95

	public void setConcurrency(Integer concurrency) {
		this.concurrency = concurrency;
	}

	@Editable(order=100, name="tmux Executable", placeholder="Use default", description="""
			Optionally specify <a href='https://github.com/tmux/tmux' target='_blank'>tmux</a> executable, 
			for instance <i>/usr/local/bin/tmux</i>. Leave empty to use tmux executable in PATH""")
	public String getTmuxExecutable() {
		return tmuxExecutable;
	}
	
	public void setTmuxExecutable(String tmuxExecutable) {
		this.tmuxExecutable = tmuxExecutable;
	}

	private void checkApplicable() {
		if (OneDev.getK8sService() != null) {
			throw new ExplicitException("OneDev running inside kubernetes cluster does not support workspaces yet");
		}
	}

	@Override
	public void test(None testData, TaskLogger logger) {
		checkApplicable();
		
		testCommands(logger);
		testTmuxAvailability(newTmux(), logger);
	}

	public Commandline newTmux() {
		var tmux = getTmuxExecutable();
		if (tmux == null) 
			tmux = "tmux";
		return new Commandline(tmux);
	}

View on GitHub (pinned to d44925c47c)

Solutions

  1. Run workspaces via k8s-compatible executors instead of server shell
  2. Deploy OneDev outside kubernetes if server shell workspaces are required
  3. Verify the deployment mode — if not truly k8s, check why k8sService is initialized

Example fix

null
Defensive patterns

Strategy: validation

Validate before calling

if (OneDev.getK8sService() != null) { throw new IllegalStateException('Server shell workspaces require OneDev outside kubernetes'); }

Try / catch

try { provisioner.test(testData, logger); } catch (ExplicitException e) { if (e.getMessage().contains('kubernetes')) useK8sNativeExecutor(); else throw e; }

Prevention

When it happens

Trigger: Using the Server Shell provisioner (test() or provision()) on an OneDev instance where OneDev.getK8sService() is non-null.

Common situations: OneDev installed via k8s Helm chart, then configuring server shell workspaces; migrating on-prem configs to a k8s deployment without changing provisioner type.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06). Data as JSON: /api/errors/618a0875b9d95a13. Report an issue: GitHub.