feat(api): add workingDir to BYO agent deployment spec#1970
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
workingDironByoDeploymentSpec(Go API) and exposes it in CRD schemas (base + Helm templates). - Threads
workingDirthrough deployment resolution into the generated KubernetesContainer.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.
c267d50 to
c0711e0
Compare
Closes kagent-dev#1932 Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
c0711e0 to
81da928
Compare
jmhbh
approved these changes
Jun 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1932
Add
workingDiras an optional string field onByoDeploymentSpec. Maps directly tocontainer.workingDirin the generated Deployment.Changes:
ByoDeploymentSpec.WorkingDir *stringinagent_types.goresolvedDeployment.WorkingDirpopulated inresolveByoDeploymentcontainer.WorkingDirset inmanifest_builder.gomake generate && make manifests