sentinel

package
v0.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	PlatformNamespace      = platforminventory.PlatformNamespace
	ObservabilityNamespace = platforminventory.ObservabilityNamespace
	LogCollectorNamespace  = platforminventory.LogCollectorNamespace
	OperatorNamespace      = platforminventory.OperatorNamespace
)
View Source
const SessionLocalMaxReplicas int32 = 1

SessionLocalMaxReplicas is the maximum safe replica count for Sentinel deployments that rely on the UI's in-memory session store until shared session storage is implemented.

Variables

Components preserves the historical public status and management surface.

View Source
var SessionLocalDeploymentNames = []string{
	"github.com/mcp-runtime/mcp-runtime/services/ui",
	"mcp-platform-gateway",
}

SessionLocalDeploymentNames lists Sentinel Deployments that must stay at SessionLocalMaxReplicas. Scaling UI or gateway beyond one replica breaks login and /auth/admin-check when requests hit different pods.

Functions

func GetComponentKeys

func GetComponentKeys() []string

GetComponentKeys returns sorted list of all component keys.

func IsAnalyticsComponent

func IsAnalyticsComponent(key string) bool

IsAnalyticsComponent returns true if the component is part of analytics/observability.

func IsCoreComponent

func IsCoreComponent(key string) bool

IsCoreComponent returns true if the component is part of the core Sentinel runtime.

Types

type Component

type Component = platforminventory.Component

Component and PortTarget retain the Sentinel API's existing field names.

func FindComponent

func FindComponent(name string) (*Component, error)

FindComponent finds a component by key or alias.

type ComponentStatus

type ComponentStatus struct {
	Key       string `json:"key"`
	Display   string `json:"display"`
	Namespace string `json:"namespace"`
	Kind      string `json:"kind"`
	Resource  string `json:"resource"`
	Status    string `json:"status"`
	Ready     string `json:"ready"`
	Message   string `json:"message,omitempty"`
}

ComponentStatus represents the runtime status of a component.

func StatusFromWorkload

func StatusFromWorkload(component Component, readyReplicas, desiredReplicas int32, message string) ComponentStatus

StatusFromWorkload creates a ComponentStatus from Kubernetes workload info.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager provides operations for Sentinel stack components. Each component carries its own namespace from the inventory.

func NewManager

func NewManager(clientset kubernetes.Interface) *Manager

NewManager creates a new Sentinel component manager.

func (*Manager) GetAllComponentStatuses

func (m *Manager) GetAllComponentStatuses(ctx context.Context) ([]ComponentStatus, error)

GetAllComponentStatuses returns the status of all components.

func (*Manager) GetComponentLogs

func (m *Manager) GetComponentLogs(ctx context.Context, key string, tailLines int64) ([]string, error)

GetComponentLogs returns logs for a component (for API streaming).

func (*Manager) GetComponentStatus

func (m *Manager) GetComponentStatus(ctx context.Context, key string) (ComponentStatus, error)

GetComponentStatus returns the status of a single component.

func (*Manager) GetCoreComponentStatuses

func (m *Manager) GetCoreComponentStatuses(ctx context.Context) ([]ComponentStatus, error)

GetCoreComponentStatuses returns statuses for core runtime components only.

func (*Manager) RestartAllComponents

func (m *Manager) RestartAllComponents(ctx context.Context) []error

RestartAllComponents restarts all core components.

func (*Manager) RestartComponent

func (m *Manager) RestartComponent(ctx context.Context, key string) error

RestartComponent performs a rolling restart of a component by patching its pod template.

type PortTarget

type PortTarget = platforminventory.PortTarget

func FindPortTarget

func FindPortTarget(name string) (*PortTarget, error)

FindPortTarget finds a component with a port forwarding target.

Jump to

Keyboard shortcuts

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