dataplane

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: 28 Imported by: ? 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

View Source
const (
	// ControllerName is the name used for logging and event recording.
	ControllerName = "aigw-dataplane"

	// DefaultIngressPort is the default port exposed by the AI Gateway ingress listener.
	DefaultIngressPort int32 = 8443

	// DefaultAdminPort is the default port exposed by the AI Gateway Admin API
	// listener, SSL-terminated. Only exposed when the AIGatewayDataPlane
	// references an OnPremAIGateway.
	DefaultAdminPort int32 = 8444

	// AdminServiceNameSuffix is appended to the AIGatewayDataPlane name to
	// form the admin Service name.
	AdminServiceNameSuffix = "-admin"

	// KonnectCertVolumeName is the name of the volume that holds the Konnect mTLS certificate.
	KonnectCertVolumeName = shareddataplane.KonnectCertVolumeName

	// KonnectCertMountPath is the path where the Konnect certificate Secret is mounted in the AI Gateway container.
	KonnectCertMountPath = shareddataplane.KonnectCertMountPath

	// AdminCertVolumeName is the name of the volume that holds the Admin API TLS server certificate.
	AdminCertVolumeName = shareddataplane.AdminCertVolumeName

	// AdminCertMountPath is the path where the Admin API certificate Secret is mounted in the AI Gateway container.
	AdminCertMountPath = shareddataplane.AdminCertMountPath
)
View Source
const (
	// EnvKongClusterControlPlane is the AI Gateway environment variable for the Konnect control plane endpoint (host[:port][/path]).
	EnvKongClusterControlPlane = "KONG_CLUSTER_CONTROL_PLANE"
	// EnvKongClusterServerName is the AI Gateway environment variable for the Konnect control plane TLS server name.
	EnvKongClusterServerName = "KONG_CLUSTER_SERVER_NAME"
	// EnvKongClusterTelemetryEndpoint is the AI Gateway environment variable for the Konnect telemetry endpoint (host:port[/path]).
	EnvKongClusterTelemetryEndpoint = "KONG_CLUSTER_TELEMETRY_ENDPOINT"
	// EnvKongClusterTelemetryServerName is the AI Gateway environment variable for the Konnect telemetry TLS server name.
	EnvKongClusterTelemetryServerName = "KONG_CLUSTER_TELEMETRY_SERVER_NAME"
	// EnvClientCertPath is the AI Gateway environment variable for the Konnect mTLS client certificate path.
	EnvClientCertPath = "KONG_CLUSTER_CERT"
	// EnvKonnectClientCertKey is the AI Gateway environment variable for the Konnect mTLS client key path.
	EnvKonnectClientCertKey = "KONG_CLUSTER_CERT_KEY"
	// EnvKongAdminListen is the AI Gateway environment variable for the Admin API listener.
	EnvKongAdminListen = "KONG_ADMIN_LISTEN"
	// EnvKongAdminSSLCert is the AI Gateway environment variable for the Admin API TLS server certificate path.
	EnvKongAdminSSLCert = "KONG_ADMIN_SSL_CERT"
	// EnvKongAdminSSLCertKey is the AI Gateway environment variable for the Admin API TLS server key path.
	EnvKongAdminSSLCertKey = "KONG_ADMIN_SSL_CERT_KEY"
	// EnvKongKonnectMode is the AI Gateway environment variable toggling Konnect mode.
	EnvKongKonnectMode = "KONG_KONNECT_MODE"
	// EnvKongNginxAdminSSLClientCertificate is the AI Gateway environment variable for the CA
	// that the Admin API listener verifies client certificates against.
	EnvKongNginxAdminSSLClientCertificate = "KONG_NGINX_ADMIN_SSL_CLIENT_CERTIFICATE"
	// EnvKongNginxAdminSSLVerifyClient is the AI Gateway environment variable enabling
	// client certificate verification on the Admin API listener.
	EnvKongNginxAdminSSLVerifyClient = "KONG_NGINX_ADMIN_SSL_VERIFY_CLIENT"
	// EnvKongLicenseData is the AI Gateway environment variable carrying the raw
	// Kong Enterprise license JSON, propagated from the KongLicense resource.
	// A value supplied via a PodTemplateSpec overlay does not win over this env
	// var: DeploymentConfig.ReassertEnvVars drops the overlay's conflicting
	// entry before MergeObjects (see owned_deployment.go).
	EnvKongLicenseData = "KONG_LICENSE_DATA"
)

Variables

This section is empty.

Functions

func RequiredHardcodedEnvVars

func RequiredHardcodedEnvVars() []corev1.EnvVar

RequiredHardcodedEnvVars returns a slice of corev1.EnvVar containing the required variables to boot and connect the AI Gateway to Konnect.

func RequiredOnPremEnvVars added in v2.4.0

func RequiredOnPremEnvVars() []corev1.EnvVar

RequiredOnPremEnvVars returns a slice of corev1.EnvVar containing the required variables to boot the AI Gateway with an on-prem control plane (an OnPremAIGateway) that pushes configuration to the DataPlane's Admin API: no Konnect connectivity and no cluster (hybrid) role. The Admin API listener itself (KONG_ADMIN_LISTEN and its TLS certificate) is wired by buildAIGatewayEnvVars only when the admin certificate Secret has been provisioned, so the SSL listener is never announced without a certificate.

Types

type Reconciler

type Reconciler struct {
	client.Client

	// LoggingMode controls the format of log output.
	LoggingMode logging.Mode

	ClusterCASecretName      string
	ClusterCASecretNamespace string
	SecretLabelSelector      string
	CertTTL                  time.Duration

	// TypeConverter is injected via the TypeConverterProvider at controller
	// registration time.  It is used for both diff-before-apply and
	// structured-merge-diff based PodTemplateSpec merging.
	TypeConverter managedfields.TypeConverter

	// LicenseGetter, when non-nil, provides the effective Kong license
	// (from the KongLicense resource): it is propagated to the gateway
	// Deployment as the KONG_LICENSE_DATA env var and reported in the
	// LicenseValid status condition.
	LicenseGetter shareddataplane.LicenseGetter
	// contains filtered or unexported fields
}

Reconciler reconciles an AIGatewayDataPlane object.

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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