testserver

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadinessProbe ProbeType        = "readiness"
	StartupProbe   ProbeType        = "startup"
	LivenessProbe  ProbeType        = "liveness"
	ProbeHttpGet   ProbeHandlerType = "httpGet"
	ProbeTcpSocket ProbeHandlerType = "tcpSocket"
	ProbeGRPC      ProbeHandlerType = "grpc"
)

Variables

This section is empty.

Functions

func Install

func Install(fn ...DeploymentOptsFn) framework.InstallFunc

Types

type Deployment

type Deployment interface {
	framework.Deployment
	TestServer
}

type DeploymentOpts

type DeploymentOpts struct {
	Name              string
	Namespace         string
	Mesh              string
	ReachableServices []string
	ReachableBackends string
	WithStatefulSet   bool
	ServiceAccount    string

	Replicas         int32
	WaitingToBeReady bool
	EnableProbes     bool
	EnableService    bool
	HeadlessService  bool
	PodAnnotations   map[string]string
	PodLabels        map[string]string
	NodeSelector     map[string]string
	// contains filtered or unexported fields
}

func DefaultDeploymentOpts

func DefaultDeploymentOpts() DeploymentOpts

type DeploymentOptsFn

type DeploymentOptsFn = func(*DeploymentOpts)

func AddInitContainer

func AddInitContainer(initContainer corev1.Container) DeploymentOptsFn

func WithArgs added in v2.10.9

func WithArgs(args ...string) DeploymentOptsFn

WithArgs sets the arguments for the test server, they take precedence over the echo arguments

func WithEchoArgs

func WithEchoArgs(args ...string) DeploymentOptsFn

WithEchoArgs sets the arguments for the echo server, values will be appended the default echo arguments

func WithHeadlessService added in v2.10.9

func WithHeadlessService() DeploymentOptsFn

func WithMesh

func WithMesh(mesh string) DeploymentOptsFn

func WithName

func WithName(name string) DeploymentOptsFn

func WithNamespace

func WithNamespace(namespace string) DeploymentOptsFn

func WithNodeSelector

func WithNodeSelector(selector map[string]string) DeploymentOptsFn

func WithPodAnnotations

func WithPodAnnotations(annotations map[string]string) DeploymentOptsFn

func WithPodLabels

func WithPodLabels(labels map[string]string) DeploymentOptsFn

func WithProbe added in v2.10.9

func WithProbe(probeType ProbeType, handlerType ProbeHandlerType, port uint32, httpGetPath string) DeploymentOptsFn

WithProbe adds a probe to the deployment, this only works when the arguments are customized using WithArgs

func WithReachableBackends added in v2.10.9

func WithReachableBackends(config string) DeploymentOptsFn

func WithReachableServices

func WithReachableServices(services ...string) DeploymentOptsFn

func WithReplicas

func WithReplicas(n int32) DeploymentOptsFn

func WithServiceAccount

func WithServiceAccount(serviceAccountName string) DeploymentOptsFn

func WithServicePortAppProtocol

func WithServicePortAppProtocol(protocol string) DeploymentOptsFn

func WithStatefulSet

func WithStatefulSet() DeploymentOptsFn

func WithTLS

func WithTLS(key, crt string) DeploymentOptsFn

func WithoutProbes

func WithoutProbes() DeploymentOptsFn

func WithoutService

func WithoutService() DeploymentOptsFn

func WithoutWaitingToBeReady

func WithoutWaitingToBeReady() DeploymentOptsFn

type ProbeHandlerType added in v2.10.9

type ProbeHandlerType string

type ProbeType added in v2.10.9

type ProbeType string

type TestServer

type TestServer interface{}

Jump to

Keyboard shortcuts

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