gateway

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OptEnableMeshMTLS = framework.WithMeshUpdate(
	"default",
	func(mesh *mesh_proto.Mesh) *mesh_proto.Mesh {
		mesh.Mtls = &mesh_proto.Mesh_Mtls{
			EnabledBackend: "builtin",
			Backends: []*mesh_proto.CertificateAuthorityBackend{
				{Name: "builtin", Type: "builtin"},
			},
		}
		return mesh
	},
)

OptEnableMeshMTLS is a Kuma deployment option that enables mTLS on the default Mesh.

Functions

func EchoServerApp

func EchoServerApp(name string, service string, instance string) framework.InstallFunc

func GatewayClientAppUniversal

func GatewayClientAppUniversal(name string) framework.InstallFunc

GatewayClientAppUniversal runs an empty container that will function as a client for a gateway.

func GatewayOnUniversal

func GatewayOnUniversal()

func ProxyHTTPRequests

func ProxyHTTPRequests(cluster framework.Cluster, instance, gateway, targetPath, expectedPath, expectedHostname string, opts ...client.CollectResponsesOptsFn)

ProxySimpleRequests tests that basic HTTP requests are proxied to the echo-server.

func ProxyRequestsWithMissingPermission

func ProxyRequestsWithMissingPermission(cluster framework.Cluster, gateway string, opts ...client.CollectResponsesOptsFn)

ProxyRequestsWithMissingPermission deletes the default TrafficPermission and expects that to cause proxying requests to fail.

In mTLS mode, only the presence of TrafficPermission rules allow services to receive traffic, so removing the permission should cause requests to fail. We use this to prove that mTLS is enabled.

func ProxyRequestsWithRateLimit

func ProxyRequestsWithRateLimit(cluster framework.Cluster, gateway string, opts ...client.CollectResponsesOptsFn)

ProxyRequestsWithRateLimit tests that requests to gateway are rate-limited with a 429 response.

func ProxySecureRequests

func ProxySecureRequests(cluster framework.Cluster, instance string, gateway string, opts ...client.CollectResponsesOptsFn)

ProxySecureRequests tests that basic HTTPS requests are proxied to the echo-server.

func ProxySimpleRequests

func ProxySimpleRequests(cluster framework.Cluster, instance string, gateway string, opts ...client.CollectResponsesOptsFn)

func ProxyTcpRequest

func ProxyTcpRequest(cluster framework.Cluster, input, expectedResponse string, gateway string, opts ...client.CollectResponsesOptsFn)

ProxyTcpRequest tests that basic HTTP requests are proxied to the test-server TCP health-check endpoint.

Types

This section is empty.

Jump to

Keyboard shortcuts

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