Documentation
¶
Index ¶
- func BindingForGRPCPluginAndRoute(ctx context.Context, logger logr.Logger, cl client.Client, ...) (kongPluginBinding *configurationv1alpha1.KongPluginBinding, err error)
- func BindingForGRPCPluginAndService(ctx context.Context, logger logr.Logger, cl client.Client, ...) (kongPluginBinding *configurationv1alpha1.KongPluginBinding, err error)
- func BindingForPluginAndRoute(ctx context.Context, logger logr.Logger, cl client.Client, ...) (kongPluginBinding *configurationv1alpha1.KongPluginBinding, err error)
- func BindingForPluginAndService(ctx context.Context, logger logr.Logger, cl client.Client, ...) (kongPluginBinding *configurationv1alpha1.KongPluginBinding, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindingForGRPCPluginAndRoute ¶ added in v2.3.0
func BindingForGRPCPluginAndRoute( ctx context.Context, logger logr.Logger, cl client.Client, grpcRoute *gwtypes.GRPCRoute, pRef *gwtypes.ParentReference, cp *commonv1alpha1.ControlPlaneRef, pluginName string, routeName string, ) (kongPluginBinding *configurationv1alpha1.KongPluginBinding, err error)
BindingForGRPCPluginAndRoute creates or updates a KongPluginBinding for the given plugin and GRPCRoute-derived KongRoute. Mirrors BindingForPluginAndRoute for GRPCRoute.
func BindingForGRPCPluginAndService ¶ added in v2.3.0
func BindingForGRPCPluginAndService( ctx context.Context, logger logr.Logger, cl client.Client, grpcRoute *gwtypes.GRPCRoute, pRef *gwtypes.ParentReference, cp *commonv1alpha1.ControlPlaneRef, pluginName string, serviceName string, ) (kongPluginBinding *configurationv1alpha1.KongPluginBinding, err error)
BindingForGRPCPluginAndService creates or updates a KongPluginBinding for the given plugin and GRPCRoute-derived KongService. Mirrors BindingForPluginAndService for GRPCRoute.
func BindingForPluginAndRoute ¶
func BindingForPluginAndRoute( ctx context.Context, logger logr.Logger, cl client.Client, httpRoute *gwtypes.HTTPRoute, pRef *gwtypes.ParentReference, cp *commonv1alpha1.ControlPlaneRef, pluginName string, routeName string, ) (kongPluginBinding *configurationv1alpha1.KongPluginBinding, err error)
BindingForPluginAndRoute creates or updates a KongPluginBinding for the given plugin and route.
The function performs the following operations: 1. Generates the KongPluginBinding name using the namegen package 2. Checks if a KongPluginBinding with that name already exists in the cluster 3. If it exists, updates the KongPluginBinding annotations to include the current HTTPRoute 4. If it doesn't exist, creates a new KongPluginBinding 5. Returns the KongPluginBinding resource for use by the caller
Parameters:
- ctx: The context for API calls and cancellation
- logger: Logger for structured logging
- cl: Kubernetes client for API operations
- httpRoute: The HTTPRoute resource from which the KongPluginBinding is derived
- pRef: The parent reference (Gateway) for the HTTPRoute
- cp: The control plane reference for the KongPluginBinding
- pluginName: The name of the KongPlugin to bind
- routeName: The name of the KongRoute to bind to
Returns:
- kongPluginBinding: The created or updated KongPluginBinding resource
- err: Any error that occurred during the process
func BindingForPluginAndService ¶ added in v2.2.0
func BindingForPluginAndService( ctx context.Context, logger logr.Logger, cl client.Client, httpRoute *gwtypes.HTTPRoute, pRef *gwtypes.ParentReference, cp *commonv1alpha1.ControlPlaneRef, pluginName string, serviceName string, ) (kongPluginBinding *configurationv1alpha1.KongPluginBinding, err error)
BindingForPluginAndService creates or updates a KongPluginBinding for the given plugin and service.
Types ¶
This section is empty.