docs(api): add field descriptions for BYO agent spec#1969
Merged
Conversation
Signed-off-by: Marian Steinbach <marian@giantswarm.io>
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/improves CRD field documentation for agent specs (BYO and Declarative) across generated CRD manifests and the Go API types to make configuration intent clearer.
Changes:
- Add descriptions for
spec.byo/spec.declarativeand multiple nested deployment fields (labels, annotations, env, volumes, etc.). - Clarify BYO deployment semantics (Kubernetes Deployment created for a BYO container image; expected A2A port 8080).
- Propagate these doc changes across both
AgentsandSandboxAgentsCRDs (Helm templates + CRD bases).
Reviewed changes
Copilot reviewed 5 out of 5 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/updates OpenAPI schema description fields for SandboxAgents CRD. |
| helm/kagent-crds/templates/kagent.dev_agents.yaml | Adds/updates OpenAPI schema description fields for Agents CRD. |
| go/api/v1alpha2/agent_types.go | Updates Go type comments that drive CRD schema descriptions. |
| go/api/config/crd/bases/kagent.dev_sandboxagents.yaml | Mirrors the updated schema descriptions in the generated CRD base. |
| go/api/config/crd/bases/kagent.dev_agents.yaml | Mirrors the updated schema descriptions in the generated CRD base. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+60
to
70
| // BYO configures a "bring your own" agent backed by a user-provided | ||
| // container image. Kagent deploys the image and expects it to serve the | ||
| // agent over the A2A protocol on port 8080. | ||
| // Required if type is BYO. | ||
| // +optional | ||
| BYO *BYOAgentSpec `json:"byo,omitempty"` | ||
| // Declarative configures an agent that is fully described by this resource | ||
| // (model, instructions, tools) and runs on one of kagent's built-in runtimes. | ||
| // Required if type is Declarative. | ||
| // +optional | ||
| Declarative *DeclarativeAgentSpec `json:"declarative,omitempty"` |
Comment on lines
+367
to
369
| // Replicas is the number of desired agent pods. Defaults to 1. | ||
| // +optional | ||
| Replicas *int32 `json:"replicas,omitempty"` |
EItanya
approved these changes
Jun 5, 2026
EItanya
left a comment
Contributor
There was a problem hiding this comment.
Thanks so much for the docs help :)
Contributor
Author
|
@EItanya Just scratching my own itch, I wanted to understand the CRD better. :) |
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.
This PR adds doc comments in
go/api/v1alpha2/agent_types.goand regenerates the CRD manifests (make controller-manifests):AgentSpec.BYO/AgentSpec.Declarative— describe the two agent types; for BYO, state the convention that the image must serve the agent over A2A on port 8080 (verified inresolveByoDeployment, this was previously documented nowhere in the CRD)BYOAgentSpec.Deployment— replace the "Trust relationship to the agent." comment, which didn't seemto belong there.ByoDeploymentSpec—image,cmd,argsSharedDeploymentSpec—replicas,imagePullSecrets,volumes,volumeMounts,labels,annotations,env,tolerations,nodeSelectorServiceAccountConfig—labels,annotationsSince
SharedDeploymentSpecis embedded inDeclarativeDeploymentSpecas well, the same comments also fill the identical gaps underspec.declarative.deployment.*, and the SandboxAgent CRD picks them up too.