Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PluginsForFilter ¶
func PluginsForFilter( ctx context.Context, logger logr.Logger, cl client.Client, httpRoute *gwtypes.HTTPRoute, rule gwtypes.HTTPRouteRule, filter gwtypes.HTTPRouteFilter, pRef *gwtypes.ParentReference, ) ([]configurationv1.KongPlugin, error)
PluginsForFilter creates or retrieves KongPlugins for the given HTTPRoute filter.
Workflow:
- If the filter type is ExtensionRef retrieve the referenced KongPlugin.
- Otherwise, translates the filter into one or more plugin configurations.
- For each plugin configuration: - Derives the KongPlugin name using namegen. - Builds a new KongPlugin resource with appropriate name, namespace, labels, annotations, and config. - Calls translator.VerifyAndUpdate to handle existing plugin reconciliation.
- Returns all translated plugins.
Self-managed plugin:
A plugin referenced via ExtensionRef. These are returned as-is without rebuild, annotation modification, or existence checks. The user is responsible for managing the plugin lifecycle.
Parameters:
- ctx: Context for API calls.
- logger: Structured logger.
- cl: Kubernetes client.
- httpRoute: Source HTTPRoute.
- rule: The HTTPRouteRule being processed.
- filter: The HTTPRouteFilter being processed.
- pRef: Parent (Gateway) reference.
Returns:
- kongPlugins: The translated plugin(s).
- err: Any error encountered.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.