library

package
v0.0.0-...-5152f1c Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WaitPollInterval = time.Second
	WaitPollTimeout  = 10 * time.Minute
)

Functions

func GenerateNameForTest

func GenerateNameForTest(t *testing.T, prefix string) string

GenerateNameForTest generates a name of the form `prefix + test name + random string` that can be used as a resource name. Convert the result to lowercase to use as a dns label.

func NewClientConfigForTest

func NewClientConfigForTest() (*rest.Config, error)

NewClientConfigForTest returns a config configured to connect to the api server

func WaitForPodsToStabilizeOnTheSameRevision

func WaitForPodsToStabilizeOnTheSameRevision(t LoggingT, podClient corev1client.PodInterface, podLabelSelector string, waitForRevisionSuccessThreshold int, waitForRevisionSuccessInterval, waitForRevisionPollInterval, waitForRevisionTimeout time.Duration) error

WaitForPodsToStabilizeOnTheSameRevision waits until all Pods with the given selector are running at the same revision. The Pods must stay on the same revision for at least waitForRevisionSuccessThreshold * waitForRevisionSuccessInterval. Mainly because of the difference between the propagation time of triggering a new release and the actual roll-out.

Note:

the number of instances is calculated based on the number of running pods in a namespace.
only pods with the given label are considered
only pods in the given namespace are considered (podClient)

Types

type LoggingT

type LoggingT interface {
	Logf(format string, args ...interface{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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