Documentation
¶
Overview ¶
Package operatorutil provides shared utilities for the MCP operator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetCondition ¶
func SetCondition(conditions *[]metav1.Condition, condType ConditionType, ready bool, reason, message string, generation int64)
SetCondition sets a condition in the conditions slice. It updates an existing condition if present, or appends a new one. LastTransitionTime is only updated when the condition's Status actually flips.
func UpdateMCPServerStatus ¶
func UpdateMCPServerStatus(ctx context.Context, c client.Client, obj client.Object, phase, message string, readiness ResourceReadiness) error
UpdateMCPServerStatus updates the status of an MCPServer object with consistent condition handling. It fetches the latest object, updates the status fields and conditions, and applies the update.
Types ¶
type ConditionType ¶
type ConditionType string
ConditionType represents the type of status condition.
const ( // DeploymentReady indicates the deployment is ready. DeploymentReady ConditionType = "DeploymentReady" // ServiceReady indicates the service is ready. ServiceReady ConditionType = "ServiceReady" // IngressReady indicates the ingress is ready. IngressReady ConditionType = "IngressReady" // GatewayReady indicates the gateway configuration and sidecar are ready. GatewayReady ConditionType = "GatewayReady" // PolicyReady indicates policy data for the gateway has been generated. PolicyReady ConditionType = "PolicyReady" // CanaryReady indicates the canary deployment, when configured, is ready. CanaryReady ConditionType = "CanaryReady" )
Click to show internal directories.
Click to hide internal directories.