testworkload

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PollTimeoutForNginx is the max duration for polling when using Nginx testworkload.
	PollTimeoutForNginx = 10 * time.Minute
	// PollIntervalForNginx is the interval between each condition check of poolling when using Nginx testworkload.
	PollIntervalForNginx = 10 * time.Second
)

Functions

This section is empty.

Types

type Nginx

type Nginx struct {
	Namespace string
	Name      string
	// List of pods that belong to the deployment
	Pods []*v1.Pod
	// contains filtered or unexported fields
}

Nginx creates a temp nginx deployment/service pair that can be used as a test workload

func NewNginx

func NewNginx(kc kubernetes.Interface, namespace string, options ...NginxOpts) (*Nginx, error)

NewNginx create this nginx deployment/service pair. It waits until all the pods in the deployment are running.

func (*Nginx) Delete

func (n *Nginx) Delete() error

Delete deletes the deployment and service

func (*Nginx) IsReachable

func (n *Nginx) IsReachable() error

IsReachable pings the nginx service. Expects the nginx service to be reachable.

func (*Nginx) IsUnReachable

func (n *Nginx) IsUnReachable() error

IsUnReachable pings the nginx service. Expects the nginx service to be unreachable.

type NginxOpts

type NginxOpts func(*Nginx) error

NginxOpts defines func that applies custom options for Nginx

func WithNginxPingJobLabels

func WithNginxPingJobLabels(labels map[string]string) NginxOpts

WithNginxPingJobLabels adds custom labels for PinJob's pods. Affects only PingJob's pods.

Jump to

Keyboard shortcuts

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