Repository navigation
feat(controller): let embedding controllers register reference kinds - #3630
codyhartsook wants to merge 4 commits into
Conversation
67029dd to
7a7964d
Compare
ad0d241 to
be8d132
Compare
7a7964d to
b7d924e
Compare
Signed-off-by: Cody Hartsook <cody.hartsook@solo.io>
Signed-off-by: Cody Hartsook <cody.hartsook@solo.io>
Signed-off-by: Cody Hartsook <cody.hartsook@solo.io>
Signed-off-by: Cody Hartsook <cody.hartsook@solo.io>
b7d924e to
9ee9028
Compare
daf10d2 to
11c092b
Compare
| return key, ptr.Deref(krt.FetchOne(ctx, servers, krt.FilterObjectName(key)), nil), nil | ||
| } | ||
| return key, nil, fmt.Errorf("resolve MCP server %q: %w %s", key, ErrInvalidKind, kind) | ||
| } |
There was a problem hiding this comment.
Different MCP kinds with the same namespace/name produce identical runtime names, causing Codex and Claude compilation to fail. This needs to distinguish registered kinds while preserving built-in names.
| Install the regenerated CRDs **before** you upgrade the controller or apply | ||
| namespace-qualified manifests. Older schemas can prune the namespace fields. | ||
|
|
||
| Manifests and stored objects from v1.0.x work unchanged and keep their revision |
There was a problem hiding this comment.
these updates do not belong to the cross-namespace-ref arch doc. we can drop the noise
| // ObjectReference is the v1.0.x name of ModelConfigReference. | ||
| // | ||
| // Deprecated: use ModelConfigReference. | ||
| type ObjectReference = ModelConfigReference |
There was a problem hiding this comment.
why do we need to preserve the older ref type through an alias? it's also odd for a generic ObjectReference to alias to a Model specific type
| // | ||
| // Deprecated: use Group. | ||
| // +optional | ||
| APIGroup *string `json:"apiGroup,omitempty"` |
There was a problem hiding this comment.
nit: Move optional fields to the bottom, and deprecated to the very end
There was a problem hiding this comment.
should use a const for status values
|
Closing for now. Nothing in this repo needs the extension point yet, so the typed references in #3604 stand on their own. |
Description
Builds on #3604, which lets references name a
groupandkindbut resolves only the built-in kinds.app.Options.ReferenceKindslets an embedding controller register more, each as a collection of its objects projected toRemoteMCPServerorModelConfig. Withexample.com/ToolServerregistered, a template can name one:server{name: search}RemoteMCPServernamedsearch, as today{group: example.com, kind: ToolServer, name: search}ToolServernamedsearch, projected to aRemoteMCPServerInvalidKind, as todayCompilers, egress and revisions only see the projected object, and provenance records
ToolServerbecause the projection setsTypeMeta. Registering a built-in kind fails at startup. It's a callback because the collections need kagent's kube client and krt options, which exist only insideRun.How a registered kind resolves
flowchart LR embedder["Embedding controller"] -->|ReferenceKinds| runtime["NewRuntime"] runtime -->|collections by group and kind| fetch["fetchModel / fetchMCPServer"] template["AgentTemplate reference"] -->|group, kind, name| fetch fetch -->|built-in kind| builtin["Built-in collection"] fetch -->|registered kind| projected["Projected collection"] fetch -->|other kind| invalid["InvalidKind"] builtin --> compile["Compilers, egress, revisions"] projected --> compileChange Type
Changelog
Validation
make lint, and thetranslatorandcontrollersuites, including envtest.