Documentation
¶
Index ¶
Constants ¶
const ( NamespaceArg = "namespace" KeyArg = "key" ValueArg = "value" NameArg = "name" EnabledArg = "enabled" PropertiesArg = "properties" )
Arguments for the config tools.
const ( // VerboseArg enables verbose mode for the deployment job. VerboseArg = "verbose" // DryRunArg runs the deployment job on dry-run. DryRunArg = "dry-run" // ForceArg forces the recreation of the deployment job. ForceArg = "force" )
const ( // AwaitingConfigurationPhase first step, the cluster is not configured yet. AwaitingConfigurationPhase = "AWAITING_CONFIGURATION" // AwaitingIntegrationsPhase second step, the cluster doesn't have the // required integrations configured yet. AwaitingIntegrationsPhase = "AWAITING_INTEGRATIONS" // ReadyToDeployPhase third step, the cluster is ready to deploy. It's // configured and has all required integrations in place. ReadyToDeployPhase = "READY_TO_DEPLOY" // DeployingPhase fourth step, the installer is currently deploying the // dependencies, Helm charts. DeployingPhase = "DEPLOYING" // CompletedPhase final step, the installation process is complete, and the // cluster is ready. CompletedPhase = "COMPLETED" // InstallerErrorPhase indicates an error occurred while trying to determine // the installer's operational status (e.g., failed to get job state). InstallerErrorPhase = "INSTALLER_ERROR" )
const (
NamesArg = "names"
)
Arguments for the integration tools.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigTools ¶
type ConfigTools struct {
// contains filtered or unexported fields
}
ConfigTools represents a set of tools for managing the configuration in a Kubernetes cluster via MCP tools. Each tool is a function that handles a specific role in the configuration lifecycle. Analogous to the "config" subcommand it uses the ConfigManager to manage the configuration in the cluster.
func NewConfigTools ¶
func NewConfigTools( appCtx *api.AppContext, logger *slog.Logger, cfs *chartfs.ChartFS, kube k8s.Interface, cm *config.ConfigMapManager, ) (*ConfigTools, error)
NewConfigTools instantiates a new ConfigTools.
func (*ConfigTools) Init ¶
func (c *ConfigTools) Init(s *server.MCPServer)
Init registers the ConfigTools on the provided MCP server instance.
type DeployTools ¶
type DeployTools struct {
// contains filtered or unexported fields
}
DeployTools represents the tools used for deploying the components using the installer on a container image, and running in the cluster, using a Kubernetes Job.
func NewDeployTools ¶
func NewDeployTools( appName string, cm *config.ConfigMapManager, topologyBuilder *resolver.TopologyBuilder, job *installer.Job, image string, ) *DeployTools
NewDeployTools creates a new DeployTools instance.
func (*DeployTools) Init ¶
func (d *DeployTools) Init(mcpServer *server.MCPServer)
Init registers the deployment tools on the MCP server.
type IntegrationTools ¶
type IntegrationTools struct {
// contains filtered or unexported fields
}
func NewIntegrationTools ¶
func NewIntegrationTools( appName string, cliName string, integrationCmd *cobra.Command, cm *config.ConfigMapManager, im *integrations.Manager, ) *IntegrationTools
func (*IntegrationTools) Init ¶
func (i *IntegrationTools) Init(s *server.MCPServer)
Init registers the integration management tools with the MCP server. These tools allow users to list available integrations, scaffold their configurations, and check their current status.
type Interface ¶
type Interface interface {
// Init decorates the MCP server with the tool declaration.
Init(*server.MCPServer)
}
Interface represents the MCP tools in the project.
type MCPToolsBuilder ¶
type MCPToolsBuilder func(MCPToolsContext) ([]Interface, error)
MCPToolsBuilder is a function that creates MCP tools given a context. Consumers can provide custom builders to customize which tools are registered.
type MCPToolsContext ¶
type MCPToolsContext struct {
*runcontext.RunContext
AppContext *api.AppContext // application identity
Flags *flags.Flags // global flags
IntegrationManager *integrations.Manager // integrations manager
Image string // installer's container image
}
MCPToolsContext holds the dependencies needed to create MCP tools. This context is populated by the framework and passed to the builder function. The logger is automatically configured to write to io.Discard because MCP server uses STDIO for protocol communication. Any output to stdout/stderr will corrupt the MCP protocol messages.
func NewMCPToolsContext ¶
func NewMCPToolsContext( appCtx *api.AppContext, runCtx *runcontext.RunContext, f *flags.Flags, integrationManager *integrations.Manager, image string, ) MCPToolsContext
NewMCPToolsContext creates a new MCPToolsContext with a logger configured for MCP server operation.
type NotesTool ¶
type NotesTool struct {
// contains filtered or unexported fields
}
NotesTool a MCP tool to provide connection instructions for products. These products must be completely deployed before its "NOTES.txt" is generated.
func NewNotesTool ¶
type StatusTool ¶
type StatusTool struct {
// contains filtered or unexported fields
}
StatusTool represents the MCP tool that's responsible to report the current installer status in the cluster.
func NewStatusTool ¶
func NewStatusTool( appName string, cm *config.ConfigMapManager, tb *resolver.TopologyBuilder, job *installer.Job, ) *StatusTool
NewStatusTool creates a new StatusTool instance.
func (*StatusTool) Init ¶
func (s *StatusTool) Init(mcpServer *server.MCPServer)
Init registers the status tool.
type TopologyTool ¶
type TopologyTool struct {
// contains filtered or unexported fields
}
TopologyTool represents the MCP tool that's responsible to report the dependency topology of the installer based on the cluster configuration and Helm charts.
func NewTopologyTool ¶
func NewTopologyTool( appName string, cfs *chartfs.ChartFS, cm *config.ConfigMapManager, tb *resolver.TopologyBuilder, ) *TopologyTool
NewTopologyTool instantiates a new TopologyTool.
func (*TopologyTool) Init ¶
func (t *TopologyTool) Init(s *server.MCPServer)