-
Notifications
You must be signed in to change notification settings - Fork 676
Open
Labels
Description
Clean up the agentgateway plugin definitions to reuse kclient between plugin and Status, because they are clients for the same API resource.
Examples:
- https://github.com/kgateway-dev/kgateway/blob/main/pkg/agentgateway/plugins/traffic_plugin.go#L85C32-L85C50
kgateway/internal/kgateway/extensions2/plugins/directresponse/direct_response_plugin.go
Line 49 in 11221e1
col := krt.WrapClient(kclient.NewFilteredDelayed[*v1alpha1.DirectResponse](
This is similar to the pattern we use in the envoy plugins:
return sdk.Plugin{
ContributesPolicies: map[schema.GroupKind]sdk.PolicyPlugin{
wellknown.TrafficPolicyGVK.GroupKind(): {
....
GetPolicyStatus: getPolicyStatusFn(cli),
PatchPolicyStatus: patchPolicyStatusFn(cli),
},
},
Reactions are currently unavailable