Skip to content

[FEATURE] Make ModelConfig shareableΒ #1983

Closed as not planned
Closed as not planned

Description

@davidkarlsen

πŸ“‹ Prerequisites

πŸ“ Feature Summary

Add support for referencing a ModelConfig in another namespace

❓ Problem Statement / Motivation

My use-case is to have low-effort declarative agents in various namespaces, which refer to a common ModelConfig provided in my kagent system namespace. Then it is easier for an user to define an agent w/o having to dig up a model and secrets for it.

πŸ’‘ Proposed Solution

Similar to how tools can be shared, add support for namespace references to share to.

πŸ”„ Alternatives Considered

v1alpha1 supported this afaik, but it seems like a bad idea to rely on old api versions

🎯 Affected Service(s)

None

πŸ“š Additional Context

No response

πŸ™‹ Are you willing to contribute?

  • I am willing to submit a PR for this feature

Activity

  1. EItanya commented on Jun 9, 2026

    @EItanya
    Contributor

    I'm actually realizing that this will require some rather large changes. Right now we directly mount secrets to avoid copying/writing the secret materials. However, if secret materials are cross namespace we will need to start writing them to the config rather than mounting them separately.

    @iplay88keys how does this work for the RemoteMCPServer certs which were just added?

  2. iplay88keys commented on Jun 9, 2026

    @iplay88keys
    Contributor

    RemoteMCPServer CA secrets follow the same pattern ModelConfig uses: the secret is mounted by bare name and resolved in the agent pod's namespace. But the controller validates and hashes that secret in the RemoteMCPServer's namespace. AllowedNamespaces only governs who can reference the RemoteMCPServer object.

    I think that highlights a bug in the RemoteMCPServer logic, though. The RemoteMCPServer object can be referenced cross-namespace, but when CA certs try to be mounted, they will either fail or the incorrect certs will be mounted (if there's a matching secret name in the agent's namespace). I think we should disallow cross-namespace RemoteMCPServer attachment as a result. It was different when there were no CA certs, but I don't think we should be copying secret materials across namespaces at this point.

  3. iplay88keys commented on Jun 15, 2026

    @iplay88keys
    Contributor

    I think that highlights a bug in the RemoteMCPServer logic, though. The RemoteMCPServer object can be referenced cross-namespace, but when CA certs try to be mounted, they will either fail or the incorrect certs will be mounted (if there's a matching secret name in the agent's namespace). I think we should disallow cross-namespace RemoteMCPServer attachment as a result. It was different when there were no CA certs, but I don't think we should be copying secret materials across namespaces at this point.

    This aspect has been fixed via this PR.

  4. added
    stale
    on Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions