plugin

package
v2.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

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:

  1. If the filter type is ExtensionRef retrieve the referenced KongPlugin.
  2. Otherwise, translates the filter into one or more plugin configurations.
  3. 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.
  4. 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL