plugin

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

func RequestTerminationForBackendNotFound added in v2.2.0

func RequestTerminationForBackendNotFound(
	ctx context.Context,
	logger logr.Logger,
	cl client.Client,
	httpRoute *gwtypes.HTTPRoute,
	pRef *gwtypes.ParentReference,
	serviceName string,
) (*configurationv1.KongPlugin, error)

RequestTerminationForBackendNotFound creates a plugin that converts Kong's default 503 for backend-less services into the Gateway API conformance-required 500 response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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