index

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IndexFieldKongCredentialACLReferencesKongConsumer is the index name for KongCredentialACL -> Consumer.
	IndexFieldKongCredentialACLReferencesKongConsumer = "kongCredentialsACLConsumerRef"
	// IndexFieldKongCredentialACLReferencesKongSecret is the index name for KongCredentialACL -> Secret.
	IndexFieldKongCredentialACLReferencesKongSecret = "kongCredentialsACLSecretRef"
)
View Source
const (
	// IndexFieldKongCredentialAPIKeyReferencesKongConsumer is the index name for KongCredentialAPIKey -> Consumer.
	IndexFieldKongCredentialAPIKeyReferencesKongConsumer = "kongCredentialsAPIKeyConsumerRef"
	// IndexFieldKongCredentialAPIKeyReferencesSecret is the index name for KongCredentialAPIKey -> Secret.
	IndexFieldKongCredentialAPIKeyReferencesSecret = "kongCredentialsAPIKeySecretRef"
)
View Source
const (
	// IndexFieldKongCredentialBasicAuthReferencesKongConsumer is the index name for KongCredentialBasicAuth -> Consumer.
	IndexFieldKongCredentialBasicAuthReferencesKongConsumer = "kongCredentialsBasicAuthConsumerRef"
	// IndexFieldKongCredentialBasicAuthReferencesSecret is the index name for KongCredentialBasicAuth -> Secret.
	IndexFieldKongCredentialBasicAuthReferencesSecret = "kongCredentialsBasicAuthSecretRef"
)
View Source
const (
	// IndexFieldKongCredentialHMACReferencesKongConsumer is the index name for KongCredentialHMAC -> Consumer.
	IndexFieldKongCredentialHMACReferencesKongConsumer = "kongCredentialsHMACConsumerRef"
	// IndexFieldKongCredentialHMACReferencesSecret is the index name for KongCredentialHMAC -> Secret.
	IndexFieldKongCredentialHMACReferencesSecret = "kongCredentialsHMACSecretRef"
)
View Source
const (
	// IndexFieldKongCredentialJWTReferencesKongConsumer is the index name for KongCredentialJWT -> Consumer.
	IndexFieldKongCredentialJWTReferencesKongConsumer = "kongCredentialsJWTConsumerRef"
	// IndexFieldKongCredentialJWTReferencesSecret is the index name for KongCredentialJWT -> Secret.
	IndexFieldKongCredentialJWTReferencesSecret = "kongCredentialsJWTSecretRef"
)
View Source
const (
	// KongPluginInstallationsIndex is the key to be used to access the .spec.pluginsToInstall indexed values,
	// in a form of list of namespace/name strings.
	KongPluginInstallationsIndex = "KongPluginInstallations"
	// DataPlaneOnOwnerGatewayIndex is the key to index the DataPlanes based on the owner Gateways.
	DataPlaneOnOwnerGatewayIndex = "DataPlaneOnOwnerGateway"
)
View Source
const (
	// GatewayClassOnGatewayIndex is the name of the index that maps GatewayClass names to Gateways referencing them.
	GatewayClassOnGatewayIndex = "GatewayClassOnGateway"
	// TLSCertificateSecretsOnGatewayIndex maps Secret "namespace/name" to Gateway objects that
	// reference them in listeners.tls.certificateRefs.
	TLSCertificateSecretsOnGatewayIndex = "TLSCertificateSecretsOnGateway"
)
View Source
const (
	// BackendServicesOnHTTPRouteIndex is the name of the index that maps Services to HTTPRoutes
	// referencing them in their backendRefs.
	BackendServicesOnHTTPRouteIndex = "BackendServicesOnHTTPRoute"

	// GatewayOnHTTPRouteIndex is the name of the index that maps Gateways to HTTPRoutes referencing them in their ParentRefs.
	GatewayOnHTTPRouteIndex = "GatewayOnHTTPRoute"

	// KongPluginsOnHTTPRouteIndex is the name of the index that maps KongPlugins to HTTPRoutes referencing them in their filters.
	KongPluginsOnHTTPRouteIndex = "KongPluginsOnHTTPRoute"
)
View Source
const (
	// IndexFieldKongCACertificateOnKonnectGatewayControlPlane is the index field for KongCACertificate -> KonnectGatewayControlPlane.
	IndexFieldKongCACertificateOnKonnectGatewayControlPlane = "kongCACertificateKonnectGatewayControlPlaneRef"
	// IndexFieldKongCACertificateReferencesSecrets is the index field for KongCACertificate -> Secret.
	IndexFieldKongCACertificateReferencesSecrets = "kongCACertificateSecretRef" // #nosec G101
)
View Source
const (
	// IndexFieldKongCertificateOnKonnectGatewayControlPlane is the index field for KongCertificate -> KonnectGatewayControlPlane.
	IndexFieldKongCertificateOnKonnectGatewayControlPlane = "kongCertificateKonnectGatewayControlPlaneRef"
	// IndexFieldKongCertificateReferencesSecrets is the index field for KongCertificate -> Secret.
	IndexFieldKongCertificateReferencesSecrets = "kongCertificateSecretRef"
)
View Source
const (
	// IndexFieldKongConsumerOnKongConsumerGroup is the index field for KongConsumer -> KongConsumerGroup.
	IndexFieldKongConsumerOnKongConsumerGroup = "consumerGroupRef"
	// IndexFieldKongConsumerOnPlugin is the index field for KongConsumer -> KongPlugin.
	IndexFieldKongConsumerOnPlugin = "consumerPluginRef"
	// IndexFieldKongConsumerOnKonnectGatewayControlPlane is the index field for KongConsumer -> KonnectGatewayControlPlane.
	IndexFieldKongConsumerOnKonnectGatewayControlPlane = "consumerKonnectGatewayControlPlaneRef"
	// IndexFieldKongConsumerReferencesSecrets is the index field for Consumer -> Secret.
	IndexFieldKongConsumerReferencesSecrets = "kongConsumerSecretRef"
)
View Source
const (
	// IndexFieldKongConsumerGroupOnPlugin is the index field for KongConsumerGroup -> KongPlugin.
	IndexFieldKongConsumerGroupOnPlugin = "consumerGroupPluginRef"
	// IndexFieldKongConsumerGroupOnKonnectGatewayControlPlane is the index field for KongConsumerGroup -> KonnectGatewayControlPlane.
	IndexFieldKongConsumerGroupOnKonnectGatewayControlPlane = "consumerGroupKonnectGatewayControlPlaneRef"
)
View Source
const (
	// IndexFieldKongDataPlaneClientCertificateOnKonnectGatewayControlPlane is the index field for KongDataPlaneCertificate -> KonnectGatewayControlPlane.
	IndexFieldKongDataPlaneClientCertificateOnKonnectGatewayControlPlane = "dataPlaneCertificateKonnectGatewayControlPlaneRef"

	// IndexFieldKongDataPlaneClientCertificateOnKonnectExtensionOwner is the index field for KongDataPlaneCertificate -> KonnectExtension via the ownership.
	IndexFieldKongDataPlaneClientCertificateOnKonnectExtensionOwner = "dataPlaneCertificateKonnectExtensionOwner"
)
View Source
const (
	// IndexFieldKongKeyOnKongKeySetReference is the index field for KongKey-> KongKeySet.
	IndexFieldKongKeyOnKongKeySetReference = "kongKeySetRef"

	// IndexFieldKongKeyOnKonnectGatewayControlPlane is the index field for KongKey -> KonnectGatewayControlPlane.
	IndexFieldKongKeyOnKonnectGatewayControlPlane = "kongKeyKonnectGatewayControlPlaneRef"
)
View Source
const (
	// IndexFieldKongPluginBindingKongPluginReference is the index field for KongPluginBinding -> KongPlugin.
	IndexFieldKongPluginBindingKongPluginReference = "kongPluginBindingPluginRef"
	// IndexFieldKongPluginBindingKongServiceReference is the index field for KongPluginBinding -> KongService.
	IndexFieldKongPluginBindingKongServiceReference = "kongPluginBindingServiceRef"
	// IndexFieldKongPluginBindingKongRouteReference is the index field for KongPluginBinding -> KongRoute.
	IndexFieldKongPluginBindingKongRouteReference = "kongPluginBindingRouteRef"
	// IndexFieldKongPluginBindingKongConsumerReference is the index field for KongPluginBinding -> KongConsumer.
	IndexFieldKongPluginBindingKongConsumerReference = "kongPluginBindingConsumerRef"
	// IndexFieldKongPluginBindingKongConsumerGroupReference is the index field for KongPluginBinding -> KongConsumerGroup.
	IndexFieldKongPluginBindingKongConsumerGroupReference = "kongPluginBindingConsumerGroupRef"
	// IndexFieldKongPluginBindingKonnectGatewayControlPlane is the index field for KongPluginBinding -> KonnectGatewayControlPlane.
	IndexFieldKongPluginBindingKonnectGatewayControlPlane = "kongPluginBindingKonnectGatewayControlPlaneRef"
)
View Source
const (
	// IndexFieldKongRouteOnReferencedPluginNames is the index field for KongRoute -> KongPlugin.
	IndexFieldKongRouteOnReferencedPluginNames = "kongRouteKongPluginRef"
	// IndexFieldKongRouteOnReferencedKongService is the index field for KongRoute -> KongService.
	IndexFieldKongRouteOnReferencedKongService = "kongRouteKongServiceRef"
	// IndexFieldKongRouteOnKonnectGatewayControlPlane is the index field for KongRoute -> KonnectGatewayControlPlane.
	IndexFieldKongRouteOnKonnectGatewayControlPlane = "kongRouteKonnectGatewayControlPlaneRef"
)
View Source
const (
	// IndexFieldKongServiceOnReferencedPluginNames is the index field for KongService -> KongPlugin.
	IndexFieldKongServiceOnReferencedPluginNames = "kongServiceKongPluginRef"
	// IndexFieldKongServiceOnKonnectGatewayControlPlane is the index field for KongService -> KonnectGatewayControlPlane.
	IndexFieldKongServiceOnKonnectGatewayControlPlane = "kongServiceKonnectGatewayControlPlaneRef"
)
View Source
const (
	// IndexFieldKonnectCloudGatewayDataPlaneGroupConfigurationOnKonnectGatewayControlPlane is the index field for KonnectCloudGatewayDataPlaneGroupConfiguration -> KonnectGatewayControlPlane.
	IndexFieldKonnectCloudGatewayDataPlaneGroupConfigurationOnKonnectGatewayControlPlane = "konnectCloudGatewayDataPlaneGroupConfigurationOnKonnectGatewayControlPlaneRef"
	// IndexFieldKonnectCloudGatewayDataPlaneGroupConfigurationOnKonnectNetworkRef is the index field for KonnectCloudGatewayDataPlaneGroupConfiguration -> KonnectNetwork.
	IndexFieldKonnectCloudGatewayDataPlaneGroupConfigurationOnKonnectNetworkRef = "konnectCloudGatewayDataPlaneGroupConfigurationOnKonnectNetworkRef"
)
View Source
const (
	// IndexFieldKonnectExtensionOnAPIAuthConfiguration is the index field for KonnectExtension -> APIAuthConfiguration.
	IndexFieldKonnectExtensionOnAPIAuthConfiguration = "konnectExtensionAPIAuthConfigurationRef"
	// IndexFieldKonnectExtensionOnSecrets is the index field for KonnectExtension -> Secret.
	IndexFieldKonnectExtensionOnSecrets = "konnectExtensionSecretRef"
	// IndexFieldKonnectExtensionOnKonnectGatewayControlPlane is the index field for KonnectExtension -> KonnectGatewayControlPlane.
	IndexFieldKonnectExtensionOnKonnectGatewayControlPlane = "konnectExtensionKonnectGatewayControlPlaneRef"
)
View Source
const (
	// IndexFieldKonnectGatewayControlPlaneGroupOnMembers is the index field for KonnectGatewayControlPlane -> its members.
	IndexFieldKonnectGatewayControlPlaneGroupOnMembers = "konnectGatewayControlPlaneGroupMembers"

	// IndexFieldKonnectGatewayControlPlaneOnAPIAuthConfiguration is the index field for KonnectGatewayControlPlane -> APIAuthConfiguration.
	IndexFieldKonnectGatewayControlPlaneOnAPIAuthConfiguration = "konnectGatewayControlPlaneAPIAuthConfigurationRef"

	// IndexFieldKonnectGatewayControlPlaneOnKonnectID is the index field for KonnectGatewayControlPlane -> KonnectID.
	IndexFieldKonnectGatewayControlPlaneOnKonnectID = "konnectGatewayControlPlaneKonnectID"
)
View Source
const (
	// DataPlaneNameIndex is the key to be used to access the .spec.dataplaneName indexed values.
	DataPlaneNameIndex = "dataplane"
)
View Source
const (
	// GatewayClassOnGatewayConfigurationIndex is the key to index the GatewayClass
	// based on the referenced GatewayConfiguration.
	GatewayClassOnGatewayConfigurationIndex = "GatewayClassOnGatewayConfiguration"
)
View Source
const (
	// IndexFieldKongKeySetOnKonnectGatewayControlPlane is the index field for KongKeySet -> KonnectGatewayControlPlane.
	IndexFieldKongKeySetOnKonnectGatewayControlPlane = "kongKeySetKonnectGatewayControlPlaneRef"
)
View Source
const (
	// IndexFieldKongSNIOnCertificateRefName is the index field for KongSNI -> Certificate.
	IndexFieldKongSNIOnCertificateRefName = "kongSNICertificateRefName"
)
View Source
const (
	// IndexFieldKongTargetOnReferencedUpstream is the index field for KongTarget -> KongUpstream.
	IndexFieldKongTargetOnReferencedUpstream = "kongTargetUpstreamRef"
)
View Source
const (
	// IndexFieldKongUpstreamOnKonnectGatewayControlPlane is the index field for KongUpstream -> KonnectGatewayControlPlane.
	IndexFieldKongUpstreamOnKonnectGatewayControlPlane = "kongUpstreamKonnectGatewayControlPlaneRef"
)
View Source
const (
	// IndexFieldKongVaultOnKonnectGatewayControlPlane is the index field for KongVault -> KonnectGatewayControlPlane.
	IndexFieldKongVaultOnKonnectGatewayControlPlane = "vaultKonnectGatewayControlPlaneRef"
)
View Source
const (
	// IndexFieldKonnectAPIAuthConfigurationReferencesSecrets is the index field for KonnectAPIAuthConfiguration -> Secret.
	IndexFieldKonnectAPIAuthConfigurationReferencesSecrets = "konnectAPIAuthConfigurationSecretRef" // #nosec G101
)
View Source
const (
	// IndexFieldKonnectCloudGatewayNetworkOnAPIAuthConfiguration is the index field for KonnectCloudGatewayNetwork -> APIAuthConfiguration.
	IndexFieldKonnectCloudGatewayNetworkOnAPIAuthConfiguration = "konnectCloudGatewayNetworkAPIAuthConfigurationRef"
)
View Source
const (
	// IndexFieldKonnectCloudGatewayTransitGatewayOnKonnectNetworkRef is the index field for KonnectCloudGatewayTransitGateway -> KonnectCloudGatewayNetwork.
	IndexFieldKonnectCloudGatewayTransitGatewayOnKonnectNetworkRef = "KonnectCloudGatewayTransitGatewayOnKonnectNetworkRef"
)
View Source
const (
	// KonnectExtensionIndex is the key to be used to access the .spec.extensions indexed values, in a form of list of
	// namespace/name strings. It can be used with object types that support extensions (e.g. DataPlane, ControlPlane,
	// GatewayConfiguration).
	KonnectExtensionIndex = "KonnectExtension"
)

Variables

This section is empty.

Functions

func GatewayClassOnGateway added in v2.1.1

func GatewayClassOnGateway(o client.Object) []string

GatewayClassOnGateway extracts and returns the GatewayClass name referenced by the given Gateway object.

func GatewayConfigurationOnGatewayClass

func GatewayConfigurationOnGatewayClass(o client.Object) []string

GatewayConfigurationOnGatewayClass returns the index key for the provided GatewayClass object. The index key is in the format "namespace/name" of the referenced GatewayConfiguration. If the GatewayClass does not reference a GatewayConfiguration, nil is returned.

func GatewaysOnHTTPRoute added in v2.1.1

func GatewaysOnHTTPRoute(o client.Object) []string

GatewaysOnHTTPRoute extracts and returns a list of unique Gateway references (in "namespace/name" format) from the ParentRefs of the given HTTPRoute object.

func KongPluginsOnHTTPRoute added in v2.1.1

func KongPluginsOnHTTPRoute(o client.Object) []string

KongPluginsOnHTTPRoute extracts and returns a list of unique KongPlugin references (in "namespace/name" format) from the Filters of the given HTTPRoute object.

func ListObjectsReferencingKonnectExtension

func ListObjectsReferencingKonnectExtension[t ExtendableObjectListT](
	c client.Client,
	objList t,
) handler.TypedMapFunc[*konnectv1alpha2.KonnectExtension, reconcile.Request]

ListObjectsReferencingKonnectExtension returns a handler.MapFunc that lists objects of the given type that reference the given KonnectExtension. It can be used with object types that support extensions (e.g. DataPlane, ControlPlane, GatewayConfiguration).

func OwnerGatewayOnDataPlane

func OwnerGatewayOnDataPlane(o client.Object) []string

OwnerGatewayOnDataPlane indexes the DataPlane based on its owner Gateway reference. It returns a 1 element slice with "namespace/name" of the owner Gateway, or an empty slice if no such owner reference exists.

func SecretOnKongCACertificate added in v2.1.1

func SecretOnKongCACertificate(object client.Object) []string

SecretOnKongCACertificate indexes KongCACertificate by its referenced Secret.

func SecretOnKongCertificate added in v2.1.1

func SecretOnKongCertificate(object client.Object) []string

SecretOnKongCertificate indexes KongCertificate by its referenced Secret.

func TLSCertificateSecretsOnGateway added in v2.1.1

func TLSCertificateSecretsOnGateway(o client.Object) []string

TLSCertificateSecretsOnGateway extracts Secret references (namespace/name) from a Gateway's listeners.tls.certificateRefs.

Types

type DataPlaneFlags

type DataPlaneFlags struct {
	KongPluginInstallationControllerEnabled bool
	KonnectControllersEnabled               bool
	GatewayAPIGatewayControllerEnabled      bool
}

DataPlaneFlags contains flags that control which indexes are created for the DataPlane object.

type ExtendableObjectListT

ExtendableObjectListT is an interface that defines the list types that can be extended with KonnectExtension objects.

type Option

type Option struct {
	// Object is the object type to index.
	Object client.Object

	// Field is the name of the index to create.
	Field string

	// ExtractValueFn is a function that extracts the value to index on from the object.
	ExtractValueFn client.IndexerFunc
}

Option contains the information needed to set up an index for a field on an object.

func OptionsForControlPlane

func OptionsForControlPlane(konnectControllersEnabled bool) []Option

OptionsForControlPlane returns required Index options for ControlPlane.

func OptionsForCredentialsACL

func OptionsForCredentialsACL() []Option

OptionsForCredentialsACL returns required Index options for KongCredentialACL.

func OptionsForCredentialsAPIKey

func OptionsForCredentialsAPIKey() []Option

OptionsForCredentialsAPIKey returns required Index options for KongCredentialAPIKey.

func OptionsForCredentialsBasicAuth

func OptionsForCredentialsBasicAuth() []Option

OptionsForCredentialsBasicAuth returns required Index options for KongCredentialBasicAuth.

func OptionsForCredentialsHMAC

func OptionsForCredentialsHMAC() []Option

OptionsForCredentialsHMAC returns required Index options for KongCredentialHMAC.

func OptionsForCredentialsJWT

func OptionsForCredentialsJWT() []Option

OptionsForCredentialsJWT returns required Index options for KongCredentialJWT.

func OptionsForDataPlane

func OptionsForDataPlane(flags DataPlaneFlags) []Option

OptionsForDataPlane returns indexing options for the DataPlane object, based on the provided flags.

func OptionsForGateway added in v2.1.1

func OptionsForGateway() []Option

OptionsForGateway returns a slice of Option configured for indexing Gateway objects by GatewayClass name.

func OptionsForGatewayClass

func OptionsForGatewayClass() []Option

OptionsForGatewayClass returns the index options for GatewayClass objects.

func OptionsForGatewayConfiguration

func OptionsForGatewayConfiguration() []Option

OptionsForGatewayConfiguration returns the options for GatewayConfiguration.

func OptionsForHTTPRoute

func OptionsForHTTPRoute() []Option

OptionsForHTTPRoute returns a slice of Option configured for indexing HTTPRoute objects. It sets up the index with the appropriate object type, field, and extraction function.

func OptionsForKongCACertificate

func OptionsForKongCACertificate(cl client.Client) []Option

OptionsForKongCACertificate returns required Index options for KongCACertificate reconciler.

func OptionsForKongCertificate

func OptionsForKongCertificate(cl client.Client) []Option

OptionsForKongCertificate returns required Index options for KongCertificate reconciler.

func OptionsForKongConsumer

func OptionsForKongConsumer(cl client.Client) []Option

OptionsForKongConsumer returns required Index options for KongConsumer reconciler.

func OptionsForKongConsumerGroup

func OptionsForKongConsumerGroup(cl client.Client) []Option

OptionsForKongConsumerGroup returns required Index options for KongConsumerGroup reconciler.

func OptionsForKongDataPlaneCertificate

func OptionsForKongDataPlaneCertificate(cl client.Client) []Option

OptionsForKongDataPlaneCertificate returns required Index options for KongConsumer reconciler.

func OptionsForKongKey

func OptionsForKongKey(cl client.Client) []Option

OptionsForKongKey returns required Index options for KongKey reconciler.

func OptionsForKongKeySet

func OptionsForKongKeySet(cl client.Client) []Option

OptionsForKongKeySet returns required Index options for KongKeySet reconciler.

func OptionsForKongPluginBinding

func OptionsForKongPluginBinding() []Option

OptionsForKongPluginBinding returns required Index options for KongPluginBinding reconciler.

func OptionsForKongRoute

func OptionsForKongRoute(cl client.Client) []Option

OptionsForKongRoute returns required Index options for KongRoute reconciler.

func OptionsForKongSNI

func OptionsForKongSNI() []Option

OptionsForKongSNI returns required Index options for KongSNI reconciler.

func OptionsForKongService

func OptionsForKongService(cl client.Client) []Option

OptionsForKongService returns required Index options for KongService reconciler.

func OptionsForKongTarget

func OptionsForKongTarget() []Option

OptionsForKongTarget returns required Index options for KongTarget reconciler.

func OptionsForKongUpstream

func OptionsForKongUpstream(cl client.Client) []Option

OptionsForKongUpstream returns required Index options for KongUpstream reconciler.

func OptionsForKongVault

func OptionsForKongVault(cl client.Client) []Option

OptionsForKongVault returns required Index options for KongVault reconciler.

func OptionsForKonnectAPIAuthConfiguration added in v2.1.1

func OptionsForKonnectAPIAuthConfiguration() []Option

OptionsForKonnectAPIAuthConfiguration returns a slice of Option configured for indexing KonnectAPIAuthConfiguration objects. It sets up the index with the appropriate object type, field, and extraction function.

func OptionsForKonnectCloudGatewayDataPlaneGroupConfiguration

func OptionsForKonnectCloudGatewayDataPlaneGroupConfiguration(cl client.Client) []Option

OptionsForKonnectCloudGatewayDataPlaneGroupConfiguration returns required Index options for KonnectCloudGatewayDataPlaneGroupConfiguration reconciler.

func OptionsForKonnectCloudGatewayNetwork

func OptionsForKonnectCloudGatewayNetwork() []Option

OptionsForKonnectCloudGatewayNetwork returns required Index options for KonnectCloudGatewayNetwork reconciler.

func OptionsForKonnectCloudGatewayTransitGateway

func OptionsForKonnectCloudGatewayTransitGateway() []Option

OptionsForKonnectCloudGatewayTransitGateway returns the index options for KonnectCloudGatewayTransitGateway.

func OptionsForKonnectExtension

func OptionsForKonnectExtension() []Option

OptionsForKonnectExtension returns required Index options for KonnectExtension reconciler.

func OptionsForKonnectGatewayControlPlane

func OptionsForKonnectGatewayControlPlane() []Option

OptionsForKonnectGatewayControlPlane returns required Index options for KonnectGatewayControlPlane reconciler.

func (Option) String

func (e Option) String() string

String returns a string representation of the Option.

Jump to

Keyboard shortcuts

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