Documentation
¶
Overview ¶
Package-local tool-filter translation: our CRD expresses filtering as glob allow/deny. agentgateway expresses it as CEL rules in AgentgatewayPolicy.spec.backend.mcp.authorization.policy.matchExpressions. This file builds those CEL rules.
Index ¶
Constants ¶
const ( GuardAdapterControllerName = "runtime.agentic-layer.ai/guard-adapter-controller" // AdapterServicePort is the cluster port exposed by the per-Guard adapter Service. // It maps to containerPort 9001 inside the adapter pod. AdapterServicePort = 80 )
const ToolGatewayAgentgatewayControllerName = "runtime.agentic-layer.ai/tool-gateway-agentgateway-controller"
const ToolRouteAgentgatewayControllerName = "runtime.agentic-layer.ai/toolroute-agentgateway-controller"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentgatewayConfig ¶ added in v0.2.1
type AgentgatewayConfig struct {
Tracing *AgentgatewayTracing `json:"tracing,omitempty"`
}
AgentgatewayConfig represents the agentgateway config structure.
type AgentgatewayRawConfig ¶ added in v0.2.1
type AgentgatewayRawConfig struct {
Config *AgentgatewayConfig `json:"config,omitempty"`
}
AgentgatewayRawConfig represents the agentgateway raw configuration structure. Reference: https://raw.githubusercontent.com/agentgateway/agentgateway/refs/heads/main/schema/config.json
type AgentgatewayTracing ¶ added in v0.2.1
type AgentgatewayTracing struct {
// OtlpEndpoint is required. The OTLP exporter endpoint.
OtlpEndpoint string `json:"otlpEndpoint"`
// OtlpProtocol is the protocol to use for OTLP export. Must be "grpc" or "http". Default is "grpc".
OtlpProtocol string `json:"otlpProtocol,omitempty"`
// Headers are additional headers to send with OTLP requests.
Headers map[string]string `json:"headers,omitempty"`
// Path is the OTLP path. Default is /v1/traces
Path string `json:"path,omitempty"`
// RandomSampling determines the amount of random sampling.
// Random sampling will initiate a new trace span if the incoming request does not have a trace already.
// This should be a float between 0.0-1.0 (0-100%) or true/false. Defaults to 'false'.
RandomSampling interface{} `json:"randomSampling,omitempty"`
// ClientSampling determines the amount of client sampling.
// Client sampling determines whether to initiate a new trace span if the incoming request does have a trace already.
// This should be a float between 0.0-1.0 (0-100%) or true/false. Defaults to 'true'.
ClientSampling interface{} `json:"clientSampling,omitempty"`
}
AgentgatewayTracing represents the tracing configuration for agentgateway. Reference: https://raw.githubusercontent.com/agentgateway/agentgateway/refs/heads/main/schema/config.json ($defs.RawTracing)
type GuardReconciler ¶ added in v0.4.0
type GuardReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder kevents.EventRecorder
AdapterImage string // operator flag --guardrail-adapter-image
}
GuardReconciler reconciles a Guard object into its adapter triple (Deployment + ConfigMap + Service) in the Guard's own namespace.
func (*GuardReconciler) SetupWithManager ¶ added in v0.4.0
func (r *GuardReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager registers the reconciler.
type ToolGatewayReconciler ¶
type ToolGatewayReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder kevents.EventRecorder
}
ToolGatewayReconciler reconciles a ToolGateway object
func (*ToolGatewayReconciler) Reconcile ¶
func (r *ToolGatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*ToolGatewayReconciler) SetupWithManager ¶
func (r *ToolGatewayReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ToolRouteReconciler ¶ added in v0.3.0
type ToolRouteReconciler struct {
client.Client
Scheme *runtime.Scheme
Recorder kevents.EventRecorder
}
ToolRouteReconciler reconciles a ToolRoute object.
func (*ToolRouteReconciler) Reconcile ¶ added in v0.3.0
Reconcile keeps the AgentgatewayBackend, HTTPRoute, and (optionally) AgentgatewayPolicy for a ToolRoute in sync with the spec, and mirrors the reconciliation outcome to the ToolRoute status (Ready condition + URL).
func (*ToolRouteReconciler) SetupWithManager ¶ added in v0.3.0
func (r *ToolRouteReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager. Watching ToolGateway ensures a ToolRoute that was blocked on a missing gateway is re-reconciled once that gateway appears, without requiring periodic requeue. Watching ToolServer ensures ToolRoutes are reconciled when their referenced ToolServer's port/path changes, keeping AgentgatewayBackends up to date.