Documentation
¶
Overview ¶
Package workloadintentobserver independently observes Kubernetes MCPServer CR conditions and raw Deployment readiness, reporting monotonic observer_epoch health transitions back to Platform API without mutating desired intent, execution receipts, or River jobs.
Index ¶
Constants ¶
const ( ConditionDeploymentReady = "DeploymentReady" ConditionServiceReady = "ServiceReady" ConditionIngressReady = "IngressReady" ConditionGatewayReady = "GatewayReady" ConditionPolicyReady = "PolicyReady" ConditionCanaryReady = "CanaryReady" )
Operator condition types matching internal/operator/conditions.go.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterReader ¶
type ClusterReader interface {
GetMCPServer(ctx context.Context, namespace, name string) (*mcpv1alpha1.MCPServer, bool, error)
GetDeployment(ctx context.Context, namespace, name string) (*appsv1.Deployment, bool, error)
}
ClusterReader reads live Kubernetes MCPServer CRs and raw Deployments.
type KubeClusterReader ¶
type KubeClusterReader struct {
// contains filtered or unexported fields
}
KubeClusterReader implements ClusterReader against Kubernetes dynamic and core clients.
func NewKubeClusterReader ¶
func NewKubeClusterReader(dyn dynamic.Interface, cs kubernetes.Interface) *KubeClusterReader
NewKubeClusterReader constructs a Kubernetes-backed ClusterReader.
func (*KubeClusterReader) GetDeployment ¶
func (r *KubeClusterReader) GetDeployment(ctx context.Context, namespace, name string) (*appsv1.Deployment, bool, error)
func (*KubeClusterReader) GetMCPServer ¶
func (r *KubeClusterReader) GetMCPServer(ctx context.Context, namespace, name string) (*mcpv1alpha1.MCPServer, bool, error)
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer evaluates live Kubernetes state for ServerIntents and DeploymentIntents and records health transitions fenced by observer_epoch.
func New ¶
func New(platform PlatformClient, cluster ClusterReader, cfg Config) *Observer
New creates an Observer.
type PlatformClient ¶
type PlatformClient interface {
ClaimWorkloadObserverLease(ctx context.Context, clusterKey, observerID string) (apikit.WorkloadObserverLeaseResponse, error)
ListServerIntents(ctx context.Context) ([]apikit.ServerIntent, error)
RecordServerIntentObservation(ctx context.Context, serverID string, req apikit.ServerIntentObservationRequest) (apikit.WorkloadStatusObservation, error)
ListDeploymentIntents(ctx context.Context) ([]apikit.DeploymentIntent, error)
RecordDeploymentIntentObservation(ctx context.Context, deploymentID string, req apikit.DeploymentIntentObservationRequest) (apikit.WorkloadStatusObservation, error)
}
PlatformClient defines the Platform API operations needed by Observer.