Documentation
¶
Index ¶
- func AdminAPIDisabled(dp *operatorv1beta1.DataPlane, ct konnectv1alpha2.KonnectExtensionClusterType) bool
- func DataPlaneAdminAPIDisabled(ctx context.Context, cl client.Client, dp *operatorv1beta1.DataPlane) (bool, error)
- func IsHybridClusterType(ct konnectv1alpha2.KonnectExtensionClusterType) bool
- func KonnectExtensionToExtensionRef(ns *string, extension *konnectv1alpha2.KonnectExtension) *commonv1alpha1.ExtensionRef
- type ControlPlaneKonnectExtensionProcessor
- func (p *ControlPlaneKonnectExtensionProcessor) GetKonnectConfig() *managercfg.KonnectConfig
- func (p *ControlPlaneKonnectExtensionProcessor) MarkCertificateApplied(ctx context.Context, cl client.Client, cp *gwtypes.ControlPlane) error
- func (p *ControlPlaneKonnectExtensionProcessor) Process(ctx context.Context, cl client.Client, object client.Object) (bool, error)
- type DataPlaneKonnectExtensionProcessor
- type KonnectExtensionConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminAPIDisabled ¶ added in v2.4.0
func AdminAPIDisabled(dp *operatorv1beta1.DataPlane, ct konnectv1alpha2.KonnectExtensionClusterType) bool
AdminAPIDisabled returns true when the Konnect cluster type is hybrid and the user didn't set KONG_ADMIN_LISTEN in the DataPlane pod template.
func DataPlaneAdminAPIDisabled ¶ added in v2.4.0
func DataPlaneAdminAPIDisabled(ctx context.Context, cl client.Client, dp *operatorv1beta1.DataPlane) (bool, error)
DataPlaneAdminAPIDisabled returns whether the admin API is disabled for the DataPlane given the KonnectExtension it references (false when it references none).
func IsHybridClusterType ¶ added in v2.4.0
func IsHybridClusterType(ct konnectv1alpha2.KonnectExtensionClusterType) bool
IsHybridClusterType returns true for Konnect hybrid cluster types, whose DataPlanes don't need the admin API.
func KonnectExtensionToExtensionRef ¶ added in v2.1.1
func KonnectExtensionToExtensionRef( ns *string, extension *konnectv1alpha2.KonnectExtension, ) *commonv1alpha1.ExtensionRef
KonnectExtensionToExtensionRef converts a KonnectExtension to the corresponding ExtensionRef.
Types ¶
type ControlPlaneKonnectExtensionProcessor ¶
type ControlPlaneKonnectExtensionProcessor struct {
KonnectExtensionConfig *KonnectExtensionConfig
CertificateSecretName string
}
ControlPlaneKonnectExtensionProcessor processes Konnect extensions for ControlPlane resources.
func (*ControlPlaneKonnectExtensionProcessor) GetKonnectConfig ¶
func (p *ControlPlaneKonnectExtensionProcessor) GetKonnectConfig() *managercfg.KonnectConfig
GetKonnectConfig returns the KonnectConfig from the KonnectExtensionConfig.
func (*ControlPlaneKonnectExtensionProcessor) MarkCertificateApplied ¶ added in v2.2.7
func (p *ControlPlaneKonnectExtensionProcessor) MarkCertificateApplied(ctx context.Context, cl client.Client, cp *gwtypes.ControlPlane) error
MarkCertificateApplied records the generation only after the running instance is ready and its configuration matches the desired certificate.
func (*ControlPlaneKonnectExtensionProcessor) Process ¶
func (p *ControlPlaneKonnectExtensionProcessor) Process(ctx context.Context, cl client.Client, object client.Object) (bool, error)
Process extracts the KonnectExtension from the ControlPlane and generates the KonnectExtensionConfig. It returns true if a KonnectExtension was found and processed, false otherwise. If an error occurs during processing, it returns false and the error. It captures configuration from the KonnectExtension resource and prepares it for use in KIC instances. This implementation of the ExtensionProcessor interface has side effects, as it modifies the KonnectExtensionConfig field of the processor.
type DataPlaneKonnectExtensionProcessor ¶
type DataPlaneKonnectExtensionProcessor struct {
// contains filtered or unexported fields
}
DataPlaneKonnectExtensionProcessor processes Konnect extensions for DataPlane resources.
func (*DataPlaneKonnectExtensionProcessor) AdminAPIDisabled ¶ added in v2.4.0
func (p *DataPlaneKonnectExtensionProcessor) AdminAPIDisabled() bool
AdminAPIDisabled returns true when the DataPlane is attached to a Konnect hybrid control plane and the user didn't opt out by setting KONG_ADMIN_LISTEN.
func (*DataPlaneKonnectExtensionProcessor) Process ¶
func (p *DataPlaneKonnectExtensionProcessor) Process(ctx context.Context, cl client.Client, object client.Object) (bool, error)
Process gets the DataPlane as argument, and in case it references a KonnectExtension, it fetches the referenced extension and applies the necessary changes to the DataPlane spec.
type KonnectExtensionConfig ¶
type KonnectExtensionConfig struct {
// KonnectConfig contains the configuration for the Konnect instance.
KonnectConfig *managercfg.KonnectConfig
}
KonnectExtensionConfig holds the configuration for a KIC instance based on a KonnectExtension resource. It includes the KonnectConfig that should be enabled.