Documentation
¶
Overview ¶
Package catalogmigration converts standalone legacy MCP resources to vMCPs before controllers and API traffic start.
Index ¶
Constants ¶
const ( // MigrationName is the durable gateway marker and part of the stable destination IDs. MigrationName = "standalone_mcp_to_vmcp" // OwnerProfileName grants a workspace owner access to its shared resources. OwnerProfileName = "owner" )
Variables ¶
This section is empty.
Functions ¶
func AppendRuleProfile ¶
func AppendRuleProfile(profiles []types.VMCPProfile, rule v1.AccessControlRule) []types.VMCPProfile
AppendRuleProfile grants a rule's subjects every component. A rule without subjects grants no one access, so it adds no profile. Profiles are named for the rule's display name; the rule name is used when the display name is empty, already taken, or reserved for the workspace owner. Duplicate profile names fail validation and abort the migration, so a taken rule name is suffixed.
func Cleanup ¶
Cleanup runs on every startup after the one-time migration has succeeded. Keep finalizers so normal controller cleanup can retire credentials/runtimes.
func MigrateFilters ¶
func MigrateFilters(ctx context.Context, client kclient.Client, namespace string, targets, sources []types.Resource, catalogs []string) error
MigrateFilters replaces direct legacy references while retaining catalog and wildcard scopes, which still apply to other resources. Retries also remove sources from filters that already contain a destination.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}