Documentation
¶
Index ¶
- Constants
- Variables
- func KongCACertificateAttachedToCP(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1alpha1.KongCACertificate
- func KongCertificateAttachedToCP(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1alpha1.KongCertificate
- func KongConsumerAttachedToCP(t *testing.T, ctx context.Context, cl client.Client, username string, ...) *configurationv1.KongConsumer
- func KongConsumerGroupAttachedToCP(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1beta1.KongConsumerGroup
- func KongConsumerWithProgrammed(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1.KongConsumer
- func KongCredentialACL(t *testing.T, ctx context.Context, cl client.Client, consumerName string, ...) *configurationv1alpha1.KongCredentialACL
- func KongCredentialAPIKey(t *testing.T, ctx context.Context, cl client.Client, consumerName string) *configurationv1alpha1.KongCredentialAPIKey
- func KongCredentialBasicAuth(t *testing.T, ctx context.Context, cl client.Client, consumerName string, ...) *configurationv1alpha1.KongCredentialBasicAuth
- func KongCredentialHMAC(t *testing.T, ctx context.Context, cl client.Client, consumerName string) *configurationv1alpha1.KongCredentialHMAC
- func KongCredentialJWT(t *testing.T, ctx context.Context, cl client.Client, consumerName string) *configurationv1alpha1.KongCredentialJWT
- func KongDataPlaneClientCertificateAttachedToCP(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1alpha1.KongDataPlaneClientCertificate
- func KongKeyAttachedToCP(t *testing.T, ctx context.Context, cl client.Client, kid, name string, ...) *configurationv1alpha1.KongKey
- func KongKeySetAttachedToCP(t *testing.T, ctx context.Context, cl client.Client, name string, ...) *configurationv1alpha1.KongKeySet
- func KongPluginBinding(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1alpha1.KongPluginBinding
- func KongRouteAttachedToService(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1alpha1.KongRoute
- func KongSNIAttachedToCertificate(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1alpha1.KongSNI
- func KongServiceAttachedToCP(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1alpha1.KongService
- func KongServiceAttachedToCPWithID(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1alpha1.KongService
- func KongTargetAttachedToUpstream(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1alpha1.KongTarget
- func KongUpstreamAttachedToCP(t *testing.T, ctx context.Context, cl client.Client, ...) *configurationv1alpha1.KongUpstream
- func KongVaultAttachedToCP(t *testing.T, ctx context.Context, cl client.Client, backend string, ...) *configurationv1alpha1.KongVault
- func KonnectAPIAuthConfiguration(t *testing.T, ctx context.Context, cl client.Client, opts ...objOption) *konnectv1alpha1.KonnectAPIAuthConfiguration
- func KonnectAPIAuthConfigurationWithProgrammed(t *testing.T, ctx context.Context, cl client.Client) *konnectv1alpha1.KonnectAPIAuthConfiguration
- func KonnectGatewayControlPlane(t *testing.T, ctx context.Context, cl client.Client, ...) *konnectv1alpha1.KonnectGatewayControlPlane
- func KonnectGatewayControlPlaneWithID(t *testing.T, ctx context.Context, cl client.Client, ...) *konnectv1alpha1.KonnectGatewayControlPlane
- func ProxyCachePlugin(t *testing.T, ctx context.Context, cl client.Client) *configurationv1.KongPlugin
- func RateLimitingPlugin(t *testing.T, ctx context.Context, cl client.Client) *configurationv1.KongPlugin
- func WithAnnotation(key, value string) objOption
- func WithLabels[T client.Object](labels map[string]string) func(obj T)
- func WithTestIDLabel(testID string) func(obj client.Object)
Constants ¶
const (
// TestIDLabel is the label key used to identify resources created by the test suite.
TestIDLabel = "konghq.com/test-id"
)
Variables ¶
var TestValidCACertPEM = string(testValidCertPEM)
TestValidCACertPEM is a valid CA certificate PEM to be used in tests.
var TestValidCertKeyPEM = string(testValidCertKeyPEM)
TestValidCertKeyPEM is a valid certificate key PEM to be used in tests.
var TestValidCertPEM = string(testValidCertPEM)
TestValidCertPEM is a valid certificate PEM to be used in tests.
Functions ¶
func KongCACertificateAttachedToCP ¶
func KongCACertificateAttachedToCP( t *testing.T, ctx context.Context, cl client.Client, cp *konnectv1alpha1.KonnectGatewayControlPlane, opts ...objOption, ) *configurationv1alpha1.KongCACertificate
KongCACertificateAttachedToCP deploys a KongCACertificate resource attached to a CP and returns the resource.
func KongCertificateAttachedToCP ¶
func KongCertificateAttachedToCP( t *testing.T, ctx context.Context, cl client.Client, cp *konnectv1alpha1.KonnectGatewayControlPlane, opts ...objOption, ) *configurationv1alpha1.KongCertificate
KongCertificateAttachedToCP deploys a KongCertificate resource attached to a CP and returns the resource.
func KongConsumerAttachedToCP ¶
func KongConsumerAttachedToCP( t *testing.T, ctx context.Context, cl client.Client, username string, cp *konnectv1alpha1.KonnectGatewayControlPlane, opts ...objOption, ) *configurationv1.KongConsumer
KongConsumerAttachedToCP deploys a KongConsumer resource attached to a Control Plane and returns the resource.
func KongConsumerGroupAttachedToCP ¶
func KongConsumerGroupAttachedToCP( t *testing.T, ctx context.Context, cl client.Client, cp *konnectv1alpha1.KonnectGatewayControlPlane, opts ...objOption, ) *configurationv1beta1.KongConsumerGroup
KongConsumerGroupAttachedToCP deploys a KongConsumerGroup resource attached to a Control Plane and returns the resource.
func KongConsumerWithProgrammed ¶
func KongConsumerWithProgrammed( t *testing.T, ctx context.Context, cl client.Client, consumer *configurationv1.KongConsumer, ) *configurationv1.KongConsumer
KongConsumerWithProgrammed deploys a KongConsumer resource and returns the resource.
func KongCredentialACL ¶
func KongCredentialACL( t *testing.T, ctx context.Context, cl client.Client, consumerName string, groupName string, ) *configurationv1alpha1.KongCredentialACL
KongCredentialACL deploys a KongCredentialACL resource and returns the resource.
func KongCredentialAPIKey ¶
func KongCredentialAPIKey( t *testing.T, ctx context.Context, cl client.Client, consumerName string, ) *configurationv1alpha1.KongCredentialAPIKey
KongCredentialAPIKey deploys a KongCredentialAPIKey resource and returns the resource.
func KongCredentialBasicAuth ¶
func KongCredentialBasicAuth( t *testing.T, ctx context.Context, cl client.Client, consumerName string, username string, password string, ) *configurationv1alpha1.KongCredentialBasicAuth
KongCredentialBasicAuth deploys a KongCredentialBasicAuth resource and returns the resource.
func KongCredentialHMAC ¶
func KongCredentialHMAC( t *testing.T, ctx context.Context, cl client.Client, consumerName string, ) *configurationv1alpha1.KongCredentialHMAC
KongCredentialHMAC deploys a KongCredentialHMAC resource and returns the resource.
func KongCredentialJWT ¶
func KongCredentialJWT( t *testing.T, ctx context.Context, cl client.Client, consumerName string, ) *configurationv1alpha1.KongCredentialJWT
KongCredentialJWT deploys a KongCredentialJWT resource and returns the resource.
func KongDataPlaneClientCertificateAttachedToCP ¶
func KongDataPlaneClientCertificateAttachedToCP( t *testing.T, ctx context.Context, cl client.Client, cp *konnectv1alpha1.KonnectGatewayControlPlane, ) *configurationv1alpha1.KongDataPlaneClientCertificate
KongDataPlaneClientCertificateAttachedToCP deploys a KongDataPlaneClientCertificate resource attached to a CP and returns the resource.
func KongKeyAttachedToCP ¶
func KongKeyAttachedToCP( t *testing.T, ctx context.Context, cl client.Client, kid, name string, cp *konnectv1alpha1.KonnectGatewayControlPlane, opts ...kongKeyOption, ) *configurationv1alpha1.KongKey
KongKeyAttachedToCP deploys a KongKey resource attached to a CP and returns the resource.
func KongKeySetAttachedToCP ¶
func KongKeySetAttachedToCP( t *testing.T, ctx context.Context, cl client.Client, name string, cp *konnectv1alpha1.KonnectGatewayControlPlane, ) *configurationv1alpha1.KongKeySet
KongKeySetAttachedToCP deploys a KongKeySet resource attached to a CP and returns the resource.
func KongPluginBinding ¶
func KongPluginBinding( t *testing.T, ctx context.Context, cl client.Client, kpb *configurationv1alpha1.KongPluginBinding, opts ...objOption, ) *configurationv1alpha1.KongPluginBinding
KongPluginBinding deploys a KongPluginBinding resource and returns the resource.
func KongRouteAttachedToService ¶
func KongRouteAttachedToService( t *testing.T, ctx context.Context, cl client.Client, kongService *configurationv1alpha1.KongService, opts ...objOption, ) *configurationv1alpha1.KongRoute
KongRouteAttachedToService deploys a KongRoute resource and returns the resource.
func KongSNIAttachedToCertificate ¶
func KongSNIAttachedToCertificate( t *testing.T, ctx context.Context, cl client.Client, cert *configurationv1alpha1.KongCertificate, opts ...objOption, ) *configurationv1alpha1.KongSNI
KongSNIAttachedToCertificate deploys a KongSNI resource attached to a KongCertificate and returns the resource.
func KongServiceAttachedToCP ¶
func KongServiceAttachedToCP( t *testing.T, ctx context.Context, cl client.Client, cp *konnectv1alpha1.KonnectGatewayControlPlane, opts ...objOption, ) *configurationv1alpha1.KongService
KongServiceAttachedToCP deploys a KongService resource and returns the resource.
func KongServiceAttachedToCPWithID ¶
func KongServiceAttachedToCPWithID( t *testing.T, ctx context.Context, cl client.Client, cp *konnectv1alpha1.KonnectGatewayControlPlane, opts ...objOption, ) *configurationv1alpha1.KongService
KongServiceAttachedToCPWithID deploys a KongService resource and returns the resource. The Status ID and Programmed condition are set on the Service using status Update() call. It can be useful where the reconciler for KonnectGatewayControlPlane is not started and hence the status has to be filled manually.
func KongTargetAttachedToUpstream ¶
func KongTargetAttachedToUpstream( t *testing.T, ctx context.Context, cl client.Client, upstream *configurationv1alpha1.KongUpstream, opts ...objOption, ) *configurationv1alpha1.KongTarget
KongTargetAttachedToUpstream deploys a KongTarget resource attached to a Control Plane and returns the resource.
func KongUpstreamAttachedToCP ¶
func KongUpstreamAttachedToCP( t *testing.T, ctx context.Context, cl client.Client, cp *konnectv1alpha1.KonnectGatewayControlPlane, opts ...objOption, ) *configurationv1alpha1.KongUpstream
KongUpstreamAttachedToCP deploys a KongUpstream resource attached to a Control Plane and returns the resource.
func KongVaultAttachedToCP ¶
func KongVaultAttachedToCP( t *testing.T, ctx context.Context, cl client.Client, backend string, prefix string, rawConfig []byte, cp *konnectv1alpha1.KonnectGatewayControlPlane, ) *configurationv1alpha1.KongVault
KongVaultAttachedToCP deploys a KongVault resource attached to a CP and returns the resource.
func KonnectAPIAuthConfiguration ¶
func KonnectAPIAuthConfiguration( t *testing.T, ctx context.Context, cl client.Client, opts ...objOption, ) *konnectv1alpha1.KonnectAPIAuthConfiguration
KonnectAPIAuthConfiguration deploys a KonnectAPIAuthConfiguration resource and returns the resource.
func KonnectAPIAuthConfigurationWithProgrammed ¶
func KonnectAPIAuthConfigurationWithProgrammed( t *testing.T, ctx context.Context, cl client.Client, ) *konnectv1alpha1.KonnectAPIAuthConfiguration
KonnectAPIAuthConfigurationWithProgrammed deploys a KonnectAPIAuthConfiguration resource and returns the resource. The Programmed condition is set on the returned resource using status Update() call. It can be useful where the reconciler for KonnectAPIAuthConfiguration is not started and hence the status has to be filled manually.
func KonnectGatewayControlPlane ¶
func KonnectGatewayControlPlane( t *testing.T, ctx context.Context, cl client.Client, apiAuth *konnectv1alpha1.KonnectAPIAuthConfiguration, opts ...objOption, ) *konnectv1alpha1.KonnectGatewayControlPlane
KonnectGatewayControlPlane deploys a KonnectGatewayControlPlane resource and returns the resource.
func KonnectGatewayControlPlaneWithID ¶
func KonnectGatewayControlPlaneWithID( t *testing.T, ctx context.Context, cl client.Client, apiAuth *konnectv1alpha1.KonnectAPIAuthConfiguration, opts ...objOption, ) *konnectv1alpha1.KonnectGatewayControlPlane
KonnectGatewayControlPlaneWithID deploys a KonnectGatewayControlPlane resource and returns the resource. The Status ID and Programmed condition are set on the CP using status Update() call. It can be useful where the reconciler for KonnectGatewayControlPlane is not started and hence the status has to be filled manually.
func ProxyCachePlugin ¶
func ProxyCachePlugin( t *testing.T, ctx context.Context, cl client.Client, ) *configurationv1.KongPlugin
ProxyCachePlugin deploys the proxy-cache KongPlugin resource and returns the resource. The provided client should be namespaced, i.e. created with `client.NewNamespacedClient(client, ns)`
func RateLimitingPlugin ¶
func RateLimitingPlugin( t *testing.T, ctx context.Context, cl client.Client, ) *configurationv1.KongPlugin
RateLimitingPlugin deploys the rate-limiting KongPlugin resource and returns the resource. The provided client should be namespaced, i.e. created with `client.NewNamespacedClient(client, ns)`
func WithAnnotation ¶
func WithAnnotation(key, value string) objOption
WithAnnotation returns an objOption that sets the given key-value pair as an annotation on the object.
func WithLabels ¶
WithLabels returns an objOption that sets the given key-value pairs as labels on the object.
func WithTestIDLabel ¶
WithTestIDLabel returns an objOption that sets the test ID label on the object.
Types ¶
This section is empty.