Documentation
¶
Index ¶
Constants ¶
const ( LabelKeyApp = "app" LabelKeyMCPServer = "mcp-server" )
Kubernetes label keys reserved and applied by the operator on managed workloads.
const ( ReconcilePhaseValidation = "validation" ReconcilePhaseDeployment = "deployment" ReconcilePhaseService = "service" )
ReconcilePhase is the value for the "phase" label on mcpserver_reconcile_phase_duration_seconds.
const ( // ConditionTypeAccepted indicates the MCPServer configuration is valid. ConditionTypeAccepted = "Accepted" // ConditionTypeReady indicates the MCPServer is ready to serve requests. ConditionTypeReady = "Ready" )
Condition types for MCPServer status.
const ( ReasonValid = "Valid" ReasonInvalid = "Invalid" ReasonUnknown = "Unknown" )
Reasons for Accepted condition.
const ( ReasonAvailable = "Available" ReasonConfigurationInvalid = "ConfigurationInvalid" ReasonScaledToZero = "ScaledToZero" ReasonInitializing = "Initializing" )
Reasons for Ready condition.
const ( WaitingReasonImagePullBackOff = "ImagePullBackOff" WaitingReasonErrImagePull = "ErrImagePull" WaitingReasonCrashLoopBackOff = "CrashLoopBackOff" WaitingReasonCreateContainerConfigError = "CreateContainerConfigError" )
Container waiting reasons from Kubernetes pod status.
const ManagedWorkloadName = "mcp-server"
ManagedWorkloadName is the standard app label value and name of the main container in operator-created Deployments.
const MetricReasonReconcileError = "ReconcileError"
MetricReasonReconcileError is the `reason` label on deployment/service failure counters when the corresponding reconcile step returns an error.
const (
TerminatedReasonOOMKilled = "OOMKilled"
)
Container terminated reasons from Kubernetes pod status.
Variables ¶
var ErrNilMap = errors.New("destination map not initialized")
var MCPClientVersion = "v0.1.0"
MCPClientVersion is the version sent during MCP handshake. Bump with releases.
Functions ¶
This section is empty.
Types ¶
type MCPServerReconciler ¶
type MCPServerReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder events.EventRecorder
MCPDialer func(ctx context.Context, url string) (*mcpv1alpha1.MCPServerInfo, error) // nil = use real MCP handshake
APIReader client.Reader
}
MCPServerReconciler reconciles a MCPServer object
func (*MCPServerReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.23.1/pkg/reconcile
func (*MCPServerReconciler) SetupWithManager ¶
func (r *MCPServerReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ValidationError ¶ added in v0.2.0
ValidationError represents a permanent configuration validation error. These errors indicate the MCPServer configuration is invalid and should not be retried.
func (*ValidationError) Error ¶ added in v0.2.0
func (e *ValidationError) Error() string