Skip to content

feat(api): add workingDir to BYO agent deployment spec#1970

Merged
jmhbh merged 1 commit into
kagent-dev:mainfrom
mesutoezdil:feat/byo-agent-workingdir
Jun 6, 2026
Merged

feat(api): add workingDir to BYO agent deployment spec#1970
jmhbh merged 1 commit into
kagent-dev:mainfrom
mesutoezdil:feat/byo-agent-workingdir

Conversation

@mesutoezdil
Copy link
Copy Markdown
Contributor

Closes #1932

Add workingDir as an optional string field on ByoDeploymentSpec. Maps directly to container.workingDir in the generated Deployment.

spec:
  type: BYO
  byo:
    deployment:
      image: oven/bun:1.2-alpine
      workingDir: /app

Changes:

  • ByoDeploymentSpec.WorkingDir *string in agent_types.go
  • resolvedDeployment.WorkingDir populated in resolveByoDeployment
  • container.WorkingDir set in manifest_builder.go
  • CRD and Helm chart updated via make generate && make manifests

Copilot AI review requested due to automatic review settings June 5, 2026 19:53
@github-actions github-actions Bot added the enhancement New feature or request label Jun 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for configuring a container working directory for BYO agent deployments, wiring the new field through the API, CRDs, and manifest translation.

Changes:

  • Introduces workingDir on ByoDeploymentSpec (Go API) and exposes it in CRD schemas (base + Helm templates).
  • Threads workingDir through deployment resolution into the generated Kubernetes Container.WorkingDir.
  • Updates both Agents and SandboxAgents CRDs to include the new schema property.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
helm/kagent-crds/templates/kagent.dev_sandboxagents.yaml Adds workingDir to the Helm-rendered SandboxAgents CRD schema.
helm/kagent-crds/templates/kagent.dev_agents.yaml Adds workingDir to the Helm-rendered Agents CRD schema.
go/core/internal/controller/translator/agent/manifest_builder.go Sets corev1.Container.WorkingDir from the resolved deployment.
go/core/internal/controller/translator/agent/deployments.go Resolves ByoDeploymentSpec.WorkingDir into the deployment model.
go/api/v1alpha2/agent_types.go Adds WorkingDir to ByoDeploymentSpec.
go/api/config/crd/bases/kagent.dev_sandboxagents.yaml Adds workingDir to the generated SandboxAgents CRD schema.
go/api/config/crd/bases/kagent.dev_agents.yaml Adds workingDir to the generated Agents CRD schema.
Files not reviewed (1)
  • go/api/v1alpha2/zz_generated.deepcopy.go: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go/core/internal/controller/translator/agent/deployments.go Outdated
Comment thread go/api/v1alpha2/agent_types.go Outdated
@mesutoezdil mesutoezdil force-pushed the feat/byo-agent-workingdir branch 2 times, most recently from c267d50 to c0711e0 Compare June 5, 2026 19:57
Closes kagent-dev#1932

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
@mesutoezdil mesutoezdil force-pushed the feat/byo-agent-workingdir branch from c0711e0 to 81da928 Compare June 5, 2026 19:59
@jmhbh jmhbh merged commit 14d6840 into kagent-dev:main Jun 6, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Allow setting workingDir on BYO Agent deployment

3 participants