stress

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package stress provides a set of stress tests for the ingress controller

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwaitReady

func AwaitReady(ctx context.Context, client *http.Client, url string, expectHeaders map[string]string) error

AwaitReady waits for a HTTP server to respond with a given status code to a given URL

func AwaitReadyMulti

func AwaitReadyMulti(ctx context.Context, client *http.Client, urls []string, expectHeaders map[string]string) error

AwaitReadyMulti concurrently waits for multiple HTTP servers to respond with a given status code to a given URL

func RunHTTPEchoServer

func RunHTTPEchoServer(ctx context.Context, addr string) error

RunHTTPEchoServer runs a HTTP server that responds with a 200 OK to all requests

Types

type IngressLoadTest

type IngressLoadTest struct {
	IngressLoadTestConfig
	// contains filtered or unexported fields
}

IngressLoadTest is the ingress load test

func (*IngressLoadTest) Run

func (l *IngressLoadTest) Run(ctx context.Context) (err error)

Run runs the ingress load test

type IngressLoadTestConfig

type IngressLoadTestConfig struct {
	// ReadinessTimeout is the timeout to wait for the ingress to become ready
	ReadinessTimeout time.Duration
	// IngressClass is the ingress controller class
	IngressClass string
	// IngressCount is the number of ingresses to create and mutate
	IngressCount int
	// Domain is the domain to use for the ingresses
	Domain string
	// ServiceName is the name of the service to point the ingresses at
	ServiceName types.NamespacedName
	// ServicePortNames is the list of ports to use on the service, should be more then one
	// so that updates to the ingress can be tested
	ServicePortNames []string
	// Client is kubernetes client
	Client *kubernetes.Clientset
}

IngressLoadTestConfig is the configuration for the ingress load test

Directories

Path Synopsis
Package cmd provides the stress test command
Package cmd provides the stress test command

Jump to

Keyboard shortcuts

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