Documentation
¶
Overview ¶
Package platforminventory defines component identity, ownership and placement. It does not provision resources or authorize namespace access.
Index ¶
- Constants
- func CredentialOwner(key string) (string, bool)
- func CredentialPlacement(key string) (namespace, name string, ok bool)
- func OwnerNamespaces() map[Owner]string
- func ServiceHost(key string, port int) (string, error)
- type Capability
- type Component
- type CredentialSet
- type Dependency
- type Owner
- type PortTarget
Constants ¶
const ( PlatformNamespace = "mcp-platform" ObservabilityNamespace = "mcp-observability" LogCollectorNamespace = mcpdefaults.LogCollectorNamespace OperatorNamespace = "github.com/mcp-runtime/mcp-runtime" // The namespace is the location; the name marks the copy as shared. SharedConfigName = "mcp-shared-config" // SharedDataPriorityClass outranks SharedServicesPriorityClass during eviction. // Both are cluster-scoped and used by more than one namespace. )
const LegacyCredentialSecret = "mcp-sentinel-secrets" // #nosec G101 -- Kubernetes object name
Variables ¶
This section is empty.
Functions ¶
func CredentialOwner ¶
CredentialOwner returns the authoritative Secret for a key. For shared API auth keys platform-api is the owner; the remaining API/UI copies are derived.
func CredentialPlacement ¶
CredentialPlacement returns the namespace and Secret that own a key.
func OwnerNamespaces ¶
OwnerNamespaces returns a copy of the install placement.
Types ¶
type Capability ¶
type Capability string
const ( Control Capability = "control" Telemetry Capability = "telemetry" Routing Capability = "routing" Persistent Capability = "persistent" NodeLogs Capability = "node-logs" Optional Capability = "optional" External Capability = "external" )
type Component ¶
type Component struct {
Owner Owner `json:"-"`
Capabilities []Capability `json:"-"`
Dependencies []Dependency `json:"-"`
Sentinel bool `json:"-"`
Key string
Display string
Namespace string
Kind string
Resource string
Label string
Aliases []string
PortTarget *PortTarget
}
Component identifies a stable platform component independently of placement.
func Catalog ¶
func Catalog() []Component
Catalog returns an independent copy, including nested metadata.
func SentinelComponents ¶
SentinelComponents preserves the existing management surface. Image-only, optional authentication and database components are deliberately not added to restart-all or to the public status response by inventory consolidation.
type CredentialSet ¶
CredentialSet defines the exact keys delivered to its consumers. Shared keys have one authoritative set; setup synchronizes only explicitly listed copies. This metadata describes consumption, not authorization to read Secrets.
func CredentialSets ¶
func CredentialSets() []CredentialSet
CredentialSets returns copies safe for callers to modify.
func (CredentialSet) Namespace ¶
func (set CredentialSet) Namespace() string
Namespace returns the install namespace for a credential set from its first consumer. A set with no consumer stays with the platform owner.
type Dependency ¶
Dependency describes a service relationship, not rollout order. Optional dependencies must not block the control plane during telemetry outages.