Documentation ¶
Index ¶
- Constants
- func KongCACertificateReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongCertificateReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongConsumerGroupReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongConsumerReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongDataPlaneClientCertificateReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongKeyReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongKeySetReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongPluginBindingReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongRouteReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongSNIReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongServiceReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongTargetReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongUpstreamReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KongVaultReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func KonnectGatewayControlPlaneReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
- func ReconciliationWatchOptionsForEntity[T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T]](cl client.Client, ent TEnt) []func(*ctrl.Builder) *ctrl.Builder
- type EntityWithControlPlaneRef
- type ForeignRelations
- type ForeignRelationsGroupedByControlPlane
- type KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) Build() *configurationv1alpha1.KongPluginBinding
- func (b *KongPluginBindingBuilder) WithConsumerGroupTarget(cg string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithConsumerTarget(consumer string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithControlPlaneRef(ref *configurationv1alpha1.ControlPlaneRef) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithControlPlaneRefKonnectNamespaced(name string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithGenerateName(name string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithName(name string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithNamespace(namespace string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithOwnerReference(owner client.Object, scheme *runtime.Scheme) (*KongPluginBindingBuilder, error)
- func (b *KongPluginBindingBuilder) WithPluginRef(pluginName string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithRouteTarget(routeName string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithServiceTarget(serviceName string) *KongPluginBindingBuilder
- type KongPluginReconciler
- type KonnectAPIAuthConfigurationReconciler
- type KonnectEntityPluginBindingFinalizerReconciler
- type KonnectEntityReconciler
- type KonnectEntityReconcilerOption
- func WithKonnectEntitySyncPeriod[T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T]](d time.Duration) KonnectEntityReconcilerOption[T, TEnt]
- func WithKonnectMaxConcurrentReconciles[T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T]](maxConcurrent uint) KonnectEntityReconcilerOption[T, TEnt]
- type ReconciliationIndexOption
- func IndexOptionsForCredentialsACL() []ReconciliationIndexOption
- func IndexOptionsForCredentialsAPIKey() []ReconciliationIndexOption
- func IndexOptionsForCredentialsBasicAuth() []ReconciliationIndexOption
- func IndexOptionsForCredentialsHMAC() []ReconciliationIndexOption
- func IndexOptionsForCredentialsJWT() []ReconciliationIndexOption
- func IndexOptionsForKongCACertificate() []ReconciliationIndexOption
- func IndexOptionsForKongCertificate() []ReconciliationIndexOption
- func IndexOptionsForKongConsumer() []ReconciliationIndexOption
- func IndexOptionsForKongConsumerGroup() []ReconciliationIndexOption
- func IndexOptionsForKongDataPlaneCertificate() []ReconciliationIndexOption
- func IndexOptionsForKongKey() []ReconciliationIndexOption
- func IndexOptionsForKongKeySet() []ReconciliationIndexOption
- func IndexOptionsForKongPluginBinding() []ReconciliationIndexOption
- func IndexOptionsForKongRoute() []ReconciliationIndexOption
- func IndexOptionsForKongSNI() []ReconciliationIndexOption
- func IndexOptionsForKongService() []ReconciliationIndexOption
- func IndexOptionsForKongTarget() []ReconciliationIndexOption
- func IndexOptionsForKongUpstream() []ReconciliationIndexOption
- func IndexOptionsForKongVault() []ReconciliationIndexOption
- func IndexOptionsForKonnectGatewayControlPlane() []ReconciliationIndexOption
- type ReferencedControlPlaneDoesNotExistError
- type ReferencedKongCertificateDoesNotExist
- type ReferencedKongCertificateIsBeingDeleted
- type ReferencedKongConsumerDoesNotExist
- type ReferencedKongConsumerIsBeingDeleted
- type ReferencedKongKeySetDoesNotExist
- type ReferencedKongKeySetIsBeingDeleted
- type ReferencedKongServiceIsBeingDeleted
- type ReferencedKongUpstreamDoesNotExist
- type ReferencedKongUpstreamIsBeingDeleted
- type Rel
Constants ¶
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" )
const ( // IndexFieldKongConsumerGroupOnPlugin is the index field for KongConsumerGroup -> KongPlugin. IndexFieldKongConsumerGroupOnPlugin = "consumerGroupPluginRef" // IndexFieldKongConsumerGroupOnKonnectGatewayControlPlane is the index field for KongConsumerGroup -> KonnectGatewayControlPlane. IndexFieldKongConsumerGroupOnKonnectGatewayControlPlane = "consumerGroupKonnectGatewayControlPlaneRef" )
const ( // IndexFieldKongKeyOnKongKeySetReference is the index field for KongKey-> KongKeySet. IndexFieldKongKeyOnKongKeySetReference = "kongKeySetRef" // IndexFieldKongKeyOnKonnectGatewayControlPlane is the index field for KongKey -> KonnectGatewayControlPlane. IndexFieldKongKeyOnKonnectGatewayControlPlane = "kongKeyKonnectGatewayControlPlaneRef" )
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" )
const ( // IndexFieldKongRouteOnReferencedPluginNames is the index field for KongRoute -> KongPlugin. IndexFieldKongRouteOnReferencedPluginNames = "kongRouteKongPluginRef" // IndexFieldKongRouteOnReferencedKongService is the index field for KongRoute -> KongService. IndexFieldKongRouteOnReferencedKongService = "kongRouteKongServiceRef" )
const ( // IndexFieldKongServiceOnReferencedPluginNames is the index field for KongService -> KongPlugin. IndexFieldKongServiceOnReferencedPluginNames = "kongServiceKongPluginRef" // IndexFieldKongServiceOnKonnectGatewayControlPlane is the index field for KongService -> KonnectGatewayControlPlane. IndexFieldKongServiceOnKonnectGatewayControlPlane = "kongServiceKonnectGatewayControlPlaneRef" )
const ( // IndexFieldKonnectGatewayControlPlaneGroupOnMembers is the index field for KonnectGatewayControlPlane -> its members. IndexFieldKonnectGatewayControlPlaneGroupOnMembers = "konnectGatewayControlPlaneGroupMembers" // IndexFieldKonnectGatewayControlPlaneOnAPIAuthConfiguration is the index field for KonnectGatewayControlPlane -> APIAuthConfiguration. IndexFieldKonnectGatewayControlPlaneOnAPIAuthConfiguration = "konnectGatewayControlPlaneAPIAuthConfigurationRef" )
const ( // SecretTokenKey is the key used to store the token in the Secret. SecretTokenKey = "token" // SecretCredentialLabel is the label used to identify Secrets holding // KonnectAPIAuthConfiguration tokens. SecretCredentialLabel = "konghq.com/credential" //nolint:gosec // SecretCredentialLabelValueKonnect is the value of the label used to // identify Secrets holding KonnectAPIAuthConfiguration tokens. SecretCredentialLabelValueKonnect = "konnect" )
const (
// IndexFieldKongCACertificateOnKonnectGatewayControlPlane is the index field for KongCACertificate -> KonnectGatewayControlPlane.
IndexFieldKongCACertificateOnKonnectGatewayControlPlane = "kongCACertificateKonnectGatewayControlPlaneRef"
)
const (
// IndexFieldKongCertificateOnKonnectGatewayControlPlane is the index field for KongCertificate -> KonnectGatewayControlPlane.
IndexFieldKongCertificateOnKonnectGatewayControlPlane = "kongCertificateKonnectGatewayControlPlaneRef"
)
const (
// IndexFieldKongCredentialACLReferencesKongConsumer is the index name for KongCredentialACL -> Consumer.
IndexFieldKongCredentialACLReferencesKongConsumer = "kongCredentialsACLConsumerRef"
)
const (
// IndexFieldKongCredentialAPIKeyReferencesKongConsumer is the index name for KongCredentialAPIKey -> Consumer.
IndexFieldKongCredentialAPIKeyReferencesKongConsumer = "kongCredentialsAPIKeyConsumerRef"
)
const (
// IndexFieldKongCredentialBasicAuthReferencesKongConsumer is the index name for KongCredentialBasicAuth -> Consumer.
IndexFieldKongCredentialBasicAuthReferencesKongConsumer = "kongCredentialsBasicAuthConsumerRef"
)
const (
// IndexFieldKongCredentialHMACReferencesKongConsumer is the index name for KongCredentialHMAC -> Consumer.
IndexFieldKongCredentialHMACReferencesKongConsumer = "kongCredentialsHMACConsumerRef"
)
const (
// IndexFieldKongCredentialJWTReferencesKongConsumer is the index name for KongCredentialJWT -> Consumer.
IndexFieldKongCredentialJWTReferencesKongConsumer = "kongCredentialsJWTConsumerRef"
)
const (
// IndexFieldKongDataPlaneClientCertificateOnKonnectGatewayControlPlane is the index field for KongDataPlaneCertificate -> KonnectGatewayControlPlane.
IndexFieldKongDataPlaneClientCertificateOnKonnectGatewayControlPlane = "dataPlaneCertificateKonnectGatewayControlPlaneRef"
)
const (
// IndexFieldKongKeySetOnKonnectGatewayControlPlane is the index field for KongKeySet -> KonnectGatewayControlPlane.
IndexFieldKongKeySetOnKonnectGatewayControlPlane = "kongKeySetKonnectGatewayControlPlaneRef"
)
const (
// IndexFieldKongSNIOnCertificateRefNmae is the index field for KongSNI -> Certificate.
IndexFieldKongSNIOnCertificateRefNmae = "kongSNICertificateRefName"
)
const (
// IndexFieldKongTargetOnReferencedUpstream is the index field for KongTarget -> KongUpstream.
IndexFieldKongTargetOnReferencedUpstream = "kongTargetUpstreamRef"
)
const (
// IndexFieldKongUpstreamOnKonnectGatewayControlPlane is the index field for KongUpstream -> KonnectGatewayControlPlane.
IndexFieldKongUpstreamOnKonnectGatewayControlPlane = "kongUpstreamKonnectGatewayControlPlaneRef"
)
const (
// IndexFieldKongVaultOnKonnectGatewayControlPlane is the index field for KongVault -> KonnectGatewayControlPlane.
IndexFieldKongVaultOnKonnectGatewayControlPlane = "vaultKonnectGatewayControlPlaneRef"
)
const ( // KonnectCleanupFinalizer is the finalizer that is added to the Konnect // entities when they are created in Konnect, and which is removed when // the CR and Konnect entity are deleted. KonnectCleanupFinalizer = "gateway.konghq.com/konnect-cleanup" )
const ( // MaxConcurrentReconciles is the maximum number of concurrent reconciles // that the controller will allow. MaxConcurrentReconciles = 8 )
Variables ¶
This section is empty.
Functions ¶
func KongCACertificateReconciliationWatchOptions ¶
func KongCACertificateReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
KongCACertificateReconciliationWatchOptions returns the watch options for the KongCACertificate.
func KongCertificateReconciliationWatchOptions ¶
func KongCertificateReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
KongCertificateReconciliationWatchOptions returns the watch options for the KongCertificate.
func KongConsumerGroupReconciliationWatchOptions ¶
func KongConsumerGroupReconciliationWatchOptions( cl client.Client, ) []func(*ctrl.Builder) *ctrl.Builder
KongConsumerGroupReconciliationWatchOptions returns the watch options for the KongConsumerGroup.
func KongConsumerReconciliationWatchOptions ¶
func KongConsumerReconciliationWatchOptions( cl client.Client, ) []func(*ctrl.Builder) *ctrl.Builder
KongConsumerReconciliationWatchOptions returns the watch options for the KongConsumer.
func KongDataPlaneClientCertificateReconciliationWatchOptions ¶
func KongDataPlaneClientCertificateReconciliationWatchOptions(cl client.Client) []func(*ctrl.Builder) *ctrl.Builder
KongDataPlaneClientCertificateReconciliationWatchOptions returns the watch options for the KongDataPlaneClientCertificate.
func KongKeyReconciliationWatchOptions ¶
KongKeyReconciliationWatchOptions returns the watch options for the KongKey.
func KongKeySetReconciliationWatchOptions ¶
KongKeySetReconciliationWatchOptions returns the watch options for the KongKeySet.
func KongPluginBindingReconciliationWatchOptions ¶
func KongPluginBindingReconciliationWatchOptions( cl client.Client, ) []func(*ctrl.Builder) *ctrl.Builder
KongPluginBindingReconciliationWatchOptions returns the watch options for the KongPluginBinding.
func KongRouteReconciliationWatchOptions ¶
KongRouteReconciliationWatchOptions returns the watch options for the KongRoute.
func KongSNIReconciliationWatchOptions ¶
KongSNIReconciliationWatchOptions returns the watch options for the KongSNI.
func KongServiceReconciliationWatchOptions ¶
KongServiceReconciliationWatchOptions returns the watch options for the KongService.
func KongTargetReconciliationWatchOptions ¶
KongTargetReconciliationWatchOptions returns the watch options for the KongTarget.
func KongUpstreamReconciliationWatchOptions ¶
func KongUpstreamReconciliationWatchOptions( cl client.Client, ) []func(*ctrl.Builder) *ctrl.Builder
KongUpstreamReconciliationWatchOptions returns the watch options for the KongUpstream.
func KongVaultReconciliationWatchOptions ¶
KongVaultReconciliationWatchOptions returns the watch options for KongVault.
func KonnectGatewayControlPlaneReconciliationWatchOptions ¶
func KonnectGatewayControlPlaneReconciliationWatchOptions( cl client.Client, ) []func(*ctrl.Builder) *ctrl.Builder
KonnectGatewayControlPlaneReconciliationWatchOptions returns the watch options for the KonnectGatewayControlPlane.
func ReconciliationWatchOptionsForEntity ¶
func ReconciliationWatchOptionsForEntity[ T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T], ]( cl client.Client, ent TEnt, ) []func(*ctrl.Builder) *ctrl.Builder
ReconciliationWatchOptionsForEntity returns the watch options for the given Konnect entity type.
Types ¶
type EntityWithControlPlaneRef ¶
EntityWithControlPlaneRef is an interface for entities that have a ControlPlaneRef.
type ForeignRelations ¶
type ForeignRelations struct { Consumer []configurationv1.KongConsumer ConsumerGroup []configurationv1beta1.KongConsumerGroup Route []configurationv1alpha1.KongRoute Service []configurationv1alpha1.KongService }
ForeignRelations contains all the relations between Kong entities and KongPlugin.
func (*ForeignRelations) GetCombinations ¶
func (relations *ForeignRelations) GetCombinations() []Rel
GetCombinations returns all possible combinations of relations.
NOTE: This is heavily based on the implementation in the Kong Ingress Controller: https://github.com/Kong/kubernetes-ingress-controller/blob/ee797b4e84bd176526af32ab6db54f16ee9c245b/internal/util/relations_test.go
TODO: https://github.com/Kong/gateway-operator/pull/659 The combinations created here should be reconsidered. Specifically the Service + Route combination which currently creates 2 separate relations targeting Service and Route independently. This most likely should create 2 relations targeting Service and Service+Route.
func (*ForeignRelations) GroupByControlPlane ¶
func (relations *ForeignRelations) GroupByControlPlane( ctx context.Context, cl client.Client, ) (ForeignRelationsGroupedByControlPlane, error)
GetCombinations groups all the entities by ControlPlane. NOTE: currently only supports Konnect ControlPlane which is referenced by a konnectNamespacedRef.
type ForeignRelationsGroupedByControlPlane ¶
type ForeignRelationsGroupedByControlPlane map[types.NamespacedName]ForeignRelations
ForeignRelationsGroupedByControlPlane is a map of ForeignRelations grouped by ControlPlane.
func (ForeignRelationsGroupedByControlPlane) GetCombinations ¶
func (f ForeignRelationsGroupedByControlPlane) GetCombinations() map[types.NamespacedName][]Rel
GetCombinations returns all possible combinations of relations grouped by ControlPlane.
type KongPluginBindingBuilder ¶
type KongPluginBindingBuilder struct {
// contains filtered or unexported fields
}
KongPluginBindingBuilder helps to build KongPluginBinding objects.
func NewKongPluginBindingBuilder ¶
func NewKongPluginBindingBuilder() *KongPluginBindingBuilder
NewKongPluginBindingBuilder creates a new KongPluginBindingBuilder.
func (*KongPluginBindingBuilder) Build ¶
func (b *KongPluginBindingBuilder) Build() *configurationv1alpha1.KongPluginBinding
Build returns the KongPluginBinding.
func (*KongPluginBindingBuilder) WithConsumerGroupTarget ¶
func (b *KongPluginBindingBuilder) WithConsumerGroupTarget(cg string) *KongPluginBindingBuilder
WithConsumerGroupTarget sets the consumer group target of the KongPluginBinding.
func (*KongPluginBindingBuilder) WithConsumerTarget ¶
func (b *KongPluginBindingBuilder) WithConsumerTarget(consumer string) *KongPluginBindingBuilder
WithConsumerTarget sets the consumer target of the KongPluginBinding.
func (*KongPluginBindingBuilder) WithControlPlaneRef ¶
func (b *KongPluginBindingBuilder) WithControlPlaneRef(ref *configurationv1alpha1.ControlPlaneRef) *KongPluginBindingBuilder
WithControlPlaneRef sets the control plane reference of the KongPluginBinding. NOTE: Users have to ensure that the ControlPlaneRef that's set here is the same across all the KongPluginBinding targets.
func (*KongPluginBindingBuilder) WithControlPlaneRefKonnectNamespaced ¶
func (b *KongPluginBindingBuilder) WithControlPlaneRefKonnectNamespaced(name string) *KongPluginBindingBuilder
WithControlPlaneRefKonnectNamespaced sets the control plane reference of the KongPluginBinding. NOTE: Users have to ensure that the ControlPlaneRef that's set here is the same across all the KongPluginBinding targets.
func (*KongPluginBindingBuilder) WithGenerateName ¶
func (b *KongPluginBindingBuilder) WithGenerateName(name string) *KongPluginBindingBuilder
WithGenerateName sets the generate name of the KongPluginBinding.
func (*KongPluginBindingBuilder) WithName ¶
func (b *KongPluginBindingBuilder) WithName(name string) *KongPluginBindingBuilder
WithName sets the name of the KongPluginBinding.
func (*KongPluginBindingBuilder) WithNamespace ¶
func (b *KongPluginBindingBuilder) WithNamespace(namespace string) *KongPluginBindingBuilder
WithNamespace sets the namespace of the KongPluginBinding.
func (*KongPluginBindingBuilder) WithOwnerReference ¶
func (b *KongPluginBindingBuilder) WithOwnerReference(owner client.Object, scheme *runtime.Scheme) (*KongPluginBindingBuilder, error)
WithOwnerReference sets the owner reference of the KongPluginBinding.
func (*KongPluginBindingBuilder) WithPluginRef ¶
func (b *KongPluginBindingBuilder) WithPluginRef(pluginName string) *KongPluginBindingBuilder
WithPluginRef sets the plugin reference of the KongPluginBinding.
func (*KongPluginBindingBuilder) WithRouteTarget ¶
func (b *KongPluginBindingBuilder) WithRouteTarget(routeName string) *KongPluginBindingBuilder
WithRouteTarget sets the route target of the KongPluginBinding.
func (*KongPluginBindingBuilder) WithServiceTarget ¶
func (b *KongPluginBindingBuilder) WithServiceTarget(serviceName string) *KongPluginBindingBuilder
WithServiceTarget sets the service target of the KongPluginBinding.
type KongPluginReconciler ¶
type KongPluginReconciler struct {
// contains filtered or unexported fields
}
KongPluginReconciler reconciles a KongPlugin object.
func NewKongPluginReconciler ¶
func NewKongPluginReconciler( developmentMode bool, client client.Client, ) *KongPluginReconciler
NewKongPluginReconciler creates a new KongPluginReconciler.
func (*KongPluginReconciler) Reconcile ¶
func (r *KongPluginReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile reconciles a KongPlugin object. The purpose of this reconciler is to handle annotations on Kong entities objects that reference KongPlugin objects. As a result of such annotations, KongPluginBinding objects are created and managed by the controller.
func (*KongPluginReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type KonnectAPIAuthConfigurationReconciler ¶
type KonnectAPIAuthConfigurationReconciler struct {
// contains filtered or unexported fields
}
KonnectAPIAuthConfigurationReconciler reconciles a KonnectAPIAuthConfiguration object.
func NewKonnectAPIAuthConfigurationReconciler ¶
func NewKonnectAPIAuthConfigurationReconciler( sdkFactory sdkops.SDKFactory, developmentMode bool, client client.Client, ) *KonnectAPIAuthConfigurationReconciler
NewKonnectAPIAuthConfigurationReconciler creates a new KonnectAPIAuthConfigurationReconciler.
func (*KonnectAPIAuthConfigurationReconciler) Reconcile ¶
func (r *KonnectAPIAuthConfigurationReconciler) Reconcile( ctx context.Context, req ctrl.Request, ) (ctrl.Result, error)
Reconcile reconciles a KonnectAPIAuthConfiguration object.
func (*KonnectAPIAuthConfigurationReconciler) SetupWithManager ¶
func (r *KonnectAPIAuthConfigurationReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type KonnectEntityPluginBindingFinalizerReconciler ¶
type KonnectEntityPluginBindingFinalizerReconciler[ T constraints.SupportedKonnectEntityPluginReferenceableType, TEnt constraints.EntityType[T], ] struct { DevelopmentMode bool Client client.Client }
KonnectEntityPluginBindingFinalizerReconciler reconciles Konnect entities that may be referenced by KongPluginBinding. It uses the generic type constraints to constrain the supported types.
func NewKonnectEntityPluginReconciler ¶
func NewKonnectEntityPluginReconciler[ T constraints.SupportedKonnectEntityPluginReferenceableType, TEnt constraints.EntityType[T], ]( developmentMode bool, client client.Client, ) *KonnectEntityPluginBindingFinalizerReconciler[T, TEnt]
NewKonnectEntityPluginReconciler returns a new KonnectEntityPluginReconciler for the given Konnect entity type.
func (*KonnectEntityPluginBindingFinalizerReconciler[T, TEnt]) Reconcile ¶
func (r *KonnectEntityPluginBindingFinalizerReconciler[T, TEnt]) Reconcile( ctx context.Context, req ctrl.Request, ) (ctrl.Result, error)
Reconcile reconciles the Konnect entity that can be set as KongPluginBinding target. It reconciles only entities that are referenced by managed KongPluginBindings, i.e. those that are created by the controller out of konghq.com/plugins annotations.
Its purpose is to:
- check if the entity is marked for deletion and mark KongPluginBindings that reference it.
- add a finalizer to the entity if there are KongPluginBindings referencing it. This finalizer designates that this entity needs to have its KongPluginBindings removed upon deletion
- remove the finalizer if all KongPluginBindings referencing it are removed.
func (*KonnectEntityPluginBindingFinalizerReconciler[T, TEnt]) SetupWithManager ¶
func (r *KonnectEntityPluginBindingFinalizerReconciler[T, TEnt]) SetupWithManager( ctx context.Context, mgr ctrl.Manager, ) error
SetupWithManager sets up the controller with the given manager.
type KonnectEntityReconciler ¶
type KonnectEntityReconciler[T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T]] struct { DevelopmentMode bool Client client.Client SyncPeriod time.Duration MaxConcurrentReconciles uint // contains filtered or unexported fields }
KonnectEntityReconciler reconciles a Konnect entities. It uses the generic type constraints to constrain the supported types.
func NewKonnectEntityReconciler ¶
func NewKonnectEntityReconciler[ T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T], ]( sdkFactory sdkops.SDKFactory, developmentMode bool, client client.Client, opts ...KonnectEntityReconcilerOption[T, TEnt], ) *KonnectEntityReconciler[T, TEnt]
NewKonnectEntityReconciler returns a new KonnectEntityReconciler for the given Konnect entity type.
func (*KonnectEntityReconciler[T, TEnt]) Reconcile ¶
func (r *KonnectEntityReconciler[T, TEnt]) Reconcile( ctx context.Context, req ctrl.Request, ) (ctrl.Result, error)
Reconcile reconciles the given Konnect entity.
func (*KonnectEntityReconciler[T, TEnt]) SetupWithManager ¶
func (r *KonnectEntityReconciler[T, TEnt]) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
SetupWithManager sets up the controller with the given manager.
type KonnectEntityReconcilerOption ¶
type KonnectEntityReconcilerOption[ T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T], ] func(*KonnectEntityReconciler[T, TEnt])
KonnectEntityReconcilerOption is a functional option for the KonnectEntityReconciler.
func WithKonnectEntitySyncPeriod ¶
func WithKonnectEntitySyncPeriod[T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T]]( d time.Duration, ) KonnectEntityReconcilerOption[T, TEnt]
WithKonnectEntitySyncPeriod sets the sync period for the reconciler.
func WithKonnectMaxConcurrentReconciles ¶
func WithKonnectMaxConcurrentReconciles[T constraints.SupportedKonnectEntityType, TEnt constraints.EntityType[T]]( maxConcurrent uint, ) KonnectEntityReconcilerOption[T, TEnt]
WithKonnectMaxConcurrentReconciles sets the max concurrent reconciles for the reconciler.
type ReconciliationIndexOption ¶
type ReconciliationIndexOption struct { IndexObject client.Object IndexField string ExtractValue client.IndexerFunc }
ReconciliationIndexOption contains required options of index for a kind of object required for reconciliation.
func IndexOptionsForCredentialsACL ¶
func IndexOptionsForCredentialsACL() []ReconciliationIndexOption
IndexOptionsForCredentialsACL returns required Index options for KongCredentialACL.
func IndexOptionsForCredentialsAPIKey ¶
func IndexOptionsForCredentialsAPIKey() []ReconciliationIndexOption
IndexOptionsForCredentialsAPIKey returns required Index options for KongCredentialAPIKey.
func IndexOptionsForCredentialsBasicAuth ¶
func IndexOptionsForCredentialsBasicAuth() []ReconciliationIndexOption
IndexOptionsForCredentialsBasicAuth returns required Index options for KongCredentialBasicAuth.
func IndexOptionsForCredentialsHMAC ¶
func IndexOptionsForCredentialsHMAC() []ReconciliationIndexOption
IndexOptionsForCredentialsHMAC returns required Index options for KongCredentialHMAC.
func IndexOptionsForCredentialsJWT ¶
func IndexOptionsForCredentialsJWT() []ReconciliationIndexOption
IndexOptionsForCredentialsJWT returns required Index options for KongCredentialJWT.
func IndexOptionsForKongCACertificate ¶
func IndexOptionsForKongCACertificate() []ReconciliationIndexOption
IndexOptionsForKongCACertificate returns required Index options for KongCACertificate reconclier.
func IndexOptionsForKongCertificate ¶
func IndexOptionsForKongCertificate() []ReconciliationIndexOption
IndexOptionsForKongCertificate returns required Index options for KongCertificate reconclier.
func IndexOptionsForKongConsumer ¶
func IndexOptionsForKongConsumer() []ReconciliationIndexOption
IndexOptionsForKongConsumer returns required Index options for KongConsumer reconciler.
func IndexOptionsForKongConsumerGroup ¶
func IndexOptionsForKongConsumerGroup() []ReconciliationIndexOption
IndexOptionsForKongConsumerGroup returns required Index options for KongConsumerGroup reconciler.
func IndexOptionsForKongDataPlaneCertificate ¶
func IndexOptionsForKongDataPlaneCertificate() []ReconciliationIndexOption
IndexOptionsForKongDataPlaneCertificate returns required Index options for KongConsumer reconciler.
func IndexOptionsForKongKey ¶
func IndexOptionsForKongKey() []ReconciliationIndexOption
IndexOptionsForKongKey returns required Index options for KongKey reconclier.
func IndexOptionsForKongKeySet ¶
func IndexOptionsForKongKeySet() []ReconciliationIndexOption
IndexOptionsForKongKeySet returns required Index options for KongKeySet reconclier.
func IndexOptionsForKongPluginBinding ¶
func IndexOptionsForKongPluginBinding() []ReconciliationIndexOption
IndexOptionsForKongPluginBinding returns required Index options for KongPluginBinding reconclier.
func IndexOptionsForKongRoute ¶
func IndexOptionsForKongRoute() []ReconciliationIndexOption
IndexOptionsForKongRoute returns required Index options for KongRoute reconciler.
func IndexOptionsForKongSNI ¶
func IndexOptionsForKongSNI() []ReconciliationIndexOption
IndexOptionsForKongSNI returns required Index options for KongSNI reconciler.
func IndexOptionsForKongService ¶
func IndexOptionsForKongService() []ReconciliationIndexOption
IndexOptionsForKongService returns required Index options for KongService reconciler.
func IndexOptionsForKongTarget ¶
func IndexOptionsForKongTarget() []ReconciliationIndexOption
IndexOptionsForKongTarget returns required Index options for KongTarget reconciler.
func IndexOptionsForKongUpstream ¶
func IndexOptionsForKongUpstream() []ReconciliationIndexOption
IndexOptionsForKongUpstream returns required Index options for KongUpstream reconciler.
func IndexOptionsForKongVault ¶
func IndexOptionsForKongVault() []ReconciliationIndexOption
IndexOptionsForKongVault returns required Index options for KongVault reconciler.
func IndexOptionsForKonnectGatewayControlPlane ¶
func IndexOptionsForKonnectGatewayControlPlane() []ReconciliationIndexOption
IndexOptionsForKonnectGatewayControlPlane returns required Index options for KonnectGatewayControlPlane reconciler.
type ReferencedControlPlaneDoesNotExistError ¶
type ReferencedControlPlaneDoesNotExistError struct { Reference types.NamespacedName Err error }
ReferencedControlPlaneDoesNotExistError is an error type that is returned when a Konnect entity references a KonnectGatewayControlPlane that does not exist.
func (ReferencedControlPlaneDoesNotExistError) Error ¶
func (e ReferencedControlPlaneDoesNotExistError) Error() string
Error implements the error interface.
func (ReferencedControlPlaneDoesNotExistError) Unwrap ¶
func (e ReferencedControlPlaneDoesNotExistError) Unwrap() error
Unwrap returns the underlying error.
type ReferencedKongCertificateDoesNotExist ¶
type ReferencedKongCertificateDoesNotExist struct { Reference types.NamespacedName Err error }
ReferencedKongCertificateDoesNotExist is an error type that is returned when a Konnect entity references a Kong Certificate which does not exist.
func (ReferencedKongCertificateDoesNotExist) Error ¶
func (e ReferencedKongCertificateDoesNotExist) Error() string
Error implements the error interface.
type ReferencedKongCertificateIsBeingDeleted ¶
type ReferencedKongCertificateIsBeingDeleted struct { Reference types.NamespacedName DeletionTimestamp time.Time }
ReferencedKongCertificateIsBeingDeleted is an error type that is returned when a Konnect entity references a Kong Certificate which is being deleted.
func (ReferencedKongCertificateIsBeingDeleted) Error ¶
func (e ReferencedKongCertificateIsBeingDeleted) Error() string
Error implements the error interface.
type ReferencedKongConsumerDoesNotExist ¶
type ReferencedKongConsumerDoesNotExist struct { Reference types.NamespacedName Err error }
ReferencedKongConsumerDoesNotExist is an error type that is returned when the referenced KongConsumer does not exist.
func (ReferencedKongConsumerDoesNotExist) Error ¶
func (e ReferencedKongConsumerDoesNotExist) Error() string
Error implements the error interface.
type ReferencedKongConsumerIsBeingDeleted ¶
type ReferencedKongConsumerIsBeingDeleted struct { Reference types.NamespacedName DeletionTimestamp time.Time }
ReferencedKongConsumerIsBeingDeleted is an error type that is returned when a Konnect entity references a Kong Consumer which is being deleted.
func (ReferencedKongConsumerIsBeingDeleted) Error ¶
func (e ReferencedKongConsumerIsBeingDeleted) Error() string
Error implements the error interface.
type ReferencedKongKeySetDoesNotExist ¶
type ReferencedKongKeySetDoesNotExist struct { Reference types.NamespacedName Err error }
ReferencedKongKeySetDoesNotExist is an error type that is returned when a Konnect entity references a KongKeySet which does not exist.
func (ReferencedKongKeySetDoesNotExist) Error ¶
func (e ReferencedKongKeySetDoesNotExist) Error() string
Error implements the error interface.
type ReferencedKongKeySetIsBeingDeleted ¶
type ReferencedKongKeySetIsBeingDeleted struct { Reference types.NamespacedName DeletionTimestamp time.Time }
ReferencedKongKeySetIsBeingDeleted is an error type that is returned when a Konnect entity references a KongKeySet which is being deleted.
func (ReferencedKongKeySetIsBeingDeleted) Error ¶
func (e ReferencedKongKeySetIsBeingDeleted) Error() string
Error implements the error interface.
type ReferencedKongServiceIsBeingDeleted ¶
type ReferencedKongServiceIsBeingDeleted struct {
Reference types.NamespacedName
}
ReferencedKongServiceIsBeingDeleted is an error type that is returned when a Konnect entity references a Kong Service which is being deleted.
func (ReferencedKongServiceIsBeingDeleted) Error ¶
func (e ReferencedKongServiceIsBeingDeleted) Error() string
Error implements the error interface.
type ReferencedKongUpstreamDoesNotExist ¶
type ReferencedKongUpstreamDoesNotExist struct { Reference types.NamespacedName Err error }
ReferencedKongUpstreamDoesNotExist is an error type that is returned when a Konnect entity references a Kong Upstream which does not exist.
func (ReferencedKongUpstreamDoesNotExist) Error ¶
func (e ReferencedKongUpstreamDoesNotExist) Error() string
Error implements the error interface.
type ReferencedKongUpstreamIsBeingDeleted ¶
type ReferencedKongUpstreamIsBeingDeleted struct { Reference types.NamespacedName DeletionTimestamp time.Time }
ReferencedKongUpstreamIsBeingDeleted is an error type that is returned when a Konnect entity references a Kong Upstream which is being deleted.
func (ReferencedKongUpstreamIsBeingDeleted) Error ¶
func (e ReferencedKongUpstreamIsBeingDeleted) Error() string
Error implements the error interface.
Source Files ¶
- errors.go
- index.go
- index_credentials_acl.go
- index_credentials_apikey.go
- index_credentials_basicauth.go
- index_credentials_hmac.go
- index_credentials_jwt.go
- index_kongcacertificate.go
- index_kongcertificate.go
- index_kongconsumer.go
- index_kongconsumergroup.go
- index_kongdataplanecertificate.go
- index_kongkey.go
- index_kongkeyset.go
- index_kongpluginbinding.go
- index_kongroute.go
- index_kongservice.go
- index_kongtarget.go
- index_kongupstream.go
- index_kongvault.go
- index_konnectgatewaycontrolplane.go
- index_sni.go
- kongpluginbuilder.go
- plugins.go
- reconciler_certificateref.go
- reconciler_controlplaneref.go
- reconciler_generic.go
- reconciler_generic_pluginbindingfinalizer.go
- reconciler_generic_pluginbindingfinalizer_rbac.go
- reconciler_generic_rbac.go
- reconciler_keysetref.go
- reconciler_kongplugin.go
- reconciler_kongplugin_combinations.go
- reconciler_kongplugin_rbac.go
- reconciler_konnectapiauth.go
- reconciler_konnectapiauth_rbac.go
- reconciler_konnectapiauth_watch.go
- reconciler_serviceref.go
- reconciler_upstreamref.go
- watch.go
- watch_credential.go
- watch_credentialacl.go
- watch_credentialapikey.go
- watch_credentialbasicauth.go
- watch_credentialhmac.go
- watch_credentialjwt.go
- watch_kongcacertificate.go
- watch_kongcertificate.go
- watch_kongconsumer.go
- watch_kongconsumergroup.go
- watch_kongdataplanecertificate.go
- watch_kongkey.go
- watch_kongkeyset.go
- watch_kongplugin.go
- watch_kongpluginbinding.go
- watch_kongroute.go
- watch_kongservice.go
- watch_kongsni.go
- watch_kongtarget.go
- watch_kongupstream.go
- watch_kongvault.go
- watch_konnectcontrolplane.go