config

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 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 ConfigureKongPluginRelatedEnvVars

func ConfigureKongPluginRelatedEnvVars(kongPluginNames []string) []corev1.EnvVar

ConfigureKongPluginRelatedEnvVars returns the environment variables needed for configuring the Kong Gateway with the provided Kong Plugin names. If kongPluginNames is nil or empty, nil is returned. Kong will use bundled plugins by default if we do not override `KONG_PLUGINS`.

func DisableAdminAPI added in v2.4.0

func DisableAdminAPI(env map[string]string)

DisableAdminAPI turns off the Kong Admin API listener and drops the related admin TLS/mTLS settings from the given env map. It mutates env in place, so callers must not pass a shared map.

func EnvVarMapToSlice

func EnvVarMapToSlice(envMap map[string]string) []corev1.EnvVar

EnvVarMapToSlice converts a map[string]string to a slice of environment variables. Note: this function should be used only when the env var slice is made of simple key-value pairs. in case of more complex env vars, don't rely on maps.

func FillContainerEnvs

func FillContainerEnvs(existing []corev1.EnvVar, podTemplateSpec *corev1.PodTemplateSpec, containerName string, envSet []corev1.EnvVar)

FillContainerEnvMap updates the environment variables in the provided PodTemplateSpec's container by taking a slice of env vars as an input.

func KongDefaults

func KongDefaults(family ipfamily.IPFamily) (map[string]string, error)

KongDefaults returns the baseline Kong proxy configuration options needed for the proxy to function, with its listen addresses rendered for the given IP family. It returns an error for ipfamily.Auto and any unrecognized family (see ListenValue).

func KongInKonnectDefaults

func KongInKonnectDefaults(
	dpLabels map[string]konnectv1alpha2.DataPlaneLabelValue,
	konnectExtensionStatus konnectv1alpha2.KonnectExtensionStatus,
) (map[string]string, error)

KongInKonnectDefaults returns the map of Konnect-related env vars properly configured. It returns an error when a value the selected template renders cannot be used.

func ListenValue added in v2.4.0

func ListenValue(family ipfamily.IPFamily, port int, options ...string) (string, error)

ListenValue renders a Kong listen value for the given port, bound to the wildcard address(es) of the given IP family.

It returns an error for ipfamily.Auto and any unrecognized family: the IP family must be resolved to a concrete value (see ipfamily.Resolve) before listen values are rendered, because silently assuming a concrete family (e.g. IPv4) would render DataPlanes' Kong listens unreachable on clusters of a different family.

Types

This section is empty.

Jump to

Keyboard shortcuts

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