kcppaths

package
v0.2.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package kcppaths is the single source of truth for the railgrid kcp workspace topology. It has no internal dependencies so every layer (bootstrap, provisioner, admin, controllers, proxy) can import it without cycles.

Topology:

root:railgrid
  providers:<provider>        platform provider sub-workspaces (parent stays universal)
  tenants:<uuid>              tenant fleet (org workspaces)
    <ws>:<edge>               team + edge workspaces
    providers:<provider>      ORG-OWNED (BYO) provider sub-workspaces
  system
    controllers               ALL platform APIExports + APIResourceSchemas
    providers                 Provider + CatalogEntry OBJECTS
    tenants                   User/Organization/Membership CR OBJECTS

The naming is symmetric: `providers` + `system:providers` are the provider workspaces vs. their objects; `tenants` + `system:tenants` are the tenant workspaces vs. their objects.

Org-owned providers mirror the platform layout one level down: the well-known `providers` child of an Org workspace is a plain `universal` workspace, exactly like root:railgrid:providers, so each provider under it can use the SAME restricted `provider` WorkspaceType (which requires a universal parent). That symmetry is deliberate — it lets the provider install path (provider-sdk/install, the SA mint, CatalogEntry self-registration) run unchanged against an org-owned provider.

Index

Constants

View Source
const (
	// Root is the railgrid root workspace.
	Root = "root:railgrid"

	// ProvidersParent is the parent of per-provider sub-workspaces. It is NOT
	// where APIExports or Provider/CatalogEntry objects live anymore — only the
	// sub-workspaces root:railgrid:providers:<name> hang off it.
	ProvidersParent = Root + ":providers"

	// TenantsParent is the parent of per-tenant (organization) workspaces. The
	// tenant *fleet* (org/team/edge workspaces) lives here.
	TenantsParent = Root + ":tenants"

	// System groups the platform-internal workspaces.
	System = Root + ":system"

	// SystemControllers holds ALL platform APIExports + APIResourceSchemas
	// (core / railgrid / tenancy / providers / admin .railgrid.ai). Every
	// consumer binds the exports from here.
	SystemControllers = System + ":controllers"

	// SystemProviders holds the Provider + CatalogEntry OBJECTS (and the
	// builtin CatalogEntries). The catalog + provisioning controllers target it.
	SystemProviders = System + ":providers"

	// SystemTenants holds the User / Organization / Membership CR OBJECTS
	// (replaces the former root:railgrid:users). NOT the tenant workspaces.
	SystemTenants = System + ":tenants"

	// OrgProvidersWorkspaceName is the well-known child of an Org workspace
	// that parents that Org's own (BYO) provider sub-workspaces. It is a
	// reserved name: team workspaces are UUID-named, so it cannot collide.
	OrgProvidersWorkspaceName = "providers"
)

Variables

This section is empty.

Functions

func OrgPath

func OrgPath(orgUUID string) string

OrgPath returns the tenant workspace path for an org by UUID: root:railgrid:tenants:<uuid>.

func OrgProviderPath

func OrgProviderPath(orgUUID, name string) string

OrgProviderPath returns the sub-workspace path for one org-owned provider: root:railgrid:tenants:<uuid>:providers:<name>.

func OrgProvidersParent

func OrgProvidersParent(orgUUID string) string

OrgProvidersParent returns the well-known parent of an Org's own provider sub-workspaces: root:railgrid:tenants:<uuid>:providers.

func ProviderPath

func ProviderPath(name string) string

ProviderPath returns the sub-workspace path for a provider by name: root:railgrid:providers:<name>.

func SplitOrgProviderPath

func SplitOrgProviderPath(path string) (orgUUID, name string, ok bool)

SplitOrgProviderPath reports whether path names an org-owned provider workspace (root:railgrid:tenants:<org>:providers:<name>) and, if so, returns the owning org UUID and the provider name.

This is the inverse the catalog layer needs: a CatalogEntry is observed by logical cluster, and the only way to tell an org-owned provider from a platform one — and to attribute it to an org — is the workspace path it lives in. Nothing on the entry itself is trustworthy for this, because the provider's own `init` writes it.

func WorkspacePath

func WorkspacePath(orgUUID, wsUUID string) string

WorkspacePath returns the team workspace path within a tenant org: root:railgrid:tenants:<uuid>:<ws>.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL