Documentation
¶
Index ¶
- Variables
- func DeploymentDesiredReplicas(d appsv1.Deployment, defaultReplicas int32) int32
- func DeploymentReady(d appsv1.Deployment, defaultReplicas int32) bool
- func PublicMCPEndpoint(mcpServer mcpv1alpha1.MCPServer) string
- type ListServersOptions
- type ListServersResult
- type Manager
- func (m *Manager) ApplyServer(ctx context.Context, server *mcpv1alpha1.MCPServer) (*mcpv1alpha1.MCPServer, error)
- func (m *Manager) DeleteServer(ctx context.Context, namespace, name string) error
- func (m *Manager) GetServer(ctx context.Context, namespace, name string) (*mcpv1alpha1.MCPServer, error)
- func (m *Manager) GetServerInfo(ctx context.Context, namespace, name string) (ServerInfo, error)
- func (m *Manager) ListServers(ctx context.Context, namespace string) (ListServersResult, error)
- func (m *Manager) ListServersWithOptions(ctx context.Context, namespace string, opts ListServersOptions) (ListServersResult, error)
- type ServerDeploymentStatus
- type ServerInfo
Constants ¶
This section is empty.
Variables ¶
var MCPServerGVR = mcpv1alpha1.GroupVersion.WithResource(mcpv1alpha1.MCPServerResource)
MCPServerGVR is the dynamic-client resource identity for MCPServer objects.
Functions ¶
func DeploymentDesiredReplicas ¶
func DeploymentDesiredReplicas(d appsv1.Deployment, defaultReplicas int32) int32
DeploymentDesiredReplicas returns the desired replica count, using defaultReplicas when the Deployment does not set spec.replicas.
func DeploymentReady ¶
func DeploymentReady(d appsv1.Deployment, defaultReplicas int32) bool
DeploymentReady reports whether the Deployment has the desired number of ready replicas.
func PublicMCPEndpoint ¶
func PublicMCPEndpoint(mcpServer mcpv1alpha1.MCPServer) string
PublicMCPEndpoint returns the public MCP endpoint path or URL for a server. The operator publishes the canonical URL in status.url, derived with the same scheme, host, and path rules the ingress and gateway use; that value wins. The fallback covers servers the operator has not reconciled yet.
Types ¶
type ListServersOptions ¶
type ListServersResult ¶
type ListServersResult struct {
Servers []ServerInfo
CRDError error
UsedDeploymentFallback bool
}
ListServersResult contains MCPServer summaries and metadata about fallback behavior used while reading them.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager reads and mutates MCP Runtime control-plane resources in Kubernetes.
func (*Manager) ApplyServer ¶
func (m *Manager) ApplyServer(ctx context.Context, server *mcpv1alpha1.MCPServer) (*mcpv1alpha1.MCPServer, error)
ApplyServer creates or updates an MCPServer resource.
func (*Manager) DeleteServer ¶
DeleteServer deletes one MCPServer resource.
func (*Manager) GetServer ¶
func (m *Manager) GetServer(ctx context.Context, namespace, name string) (*mcpv1alpha1.MCPServer, error)
GetServer retrieves one MCPServer resource.
func (*Manager) GetServerInfo ¶
GetServerInfo retrieves one MCPServer and joins it with its backing Deployment readiness when the Deployment is available.
func (*Manager) ListServers ¶
ListServers lists MCPServer resources in namespace and joins them with the readiness of their stable backing Deployments. If the MCPServer resource is unavailable, it falls back to legacy managed Deployments.
func (*Manager) ListServersWithOptions ¶
func (m *Manager) ListServersWithOptions(ctx context.Context, namespace string, opts ListServersOptions) (ListServersResult, error)
ListServersWithOptions lists MCPServer resources in namespace using optional Kubernetes list filters.
type ServerDeploymentStatus ¶
ServerDeploymentStatus summarizes readiness for the Deployment that backs an MCPServer.
func StatusForDeployment ¶
func StatusForDeployment(d appsv1.Deployment) ServerDeploymentStatus
StatusForDeployment summarizes Deployment readiness in the format used by runtime server listings.
type ServerInfo ¶
type ServerInfo struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
UID string `json:"uid,omitempty"`
TeamID string `json:"team_id,omitempty"`
Image string `json:"image,omitempty"`
ImageTag string `json:"imageTag,omitempty"`
Description string `json:"description,omitempty"`
Ready string `json:"ready"`
Status string `json:"status"`
Labels map[string]string `json:"labels,omitempty"`
Age string `json:"age"`
Endpoint string `json:"endpoint,omitempty"`
GatewayEnabled bool `json:"-"`
ServicePort int32 `json:"servicePort,omitempty"`
Generation int64 `json:"generation,omitempty"`
Tools []mcpv1alpha1.ToolConfig `json:"tools,omitempty"`
Prompts []mcpv1alpha1.InventoryItem `json:"prompts"`
Resources []mcpv1alpha1.InventoryItem `json:"resources"`
Tasks []mcpv1alpha1.InventoryItem `json:"tasks"`
}
ServerInfo is the control-plane projection of an MCPServer and its backing workload status.
func ServerInfoFromMCPServer ¶
func ServerInfoFromMCPServer(mcpServer mcpv1alpha1.MCPServer, deploymentStatus ServerDeploymentStatus) ServerInfo
ServerInfoFromMCPServer projects an MCPServer plus optional Deployment status into the control-plane server summary shape.