workload

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AppName = "pause"
	// ImageRepository is the image repository holding the e2e test image.
	// The repository has a copy of registry.k8s.io/pause:3.10 for linux/amd64 and linux/arm64.
	// The copied image is tagged with 0.1 through 0.10.
	// It was set up with the following commands:
	//  for arch in amd64 arm64 ; do
	//    crane copy registry.k8s.io/pause:3.10 ghcr.io/timebertt/e2e-pause:$arch --platform linux/$arch
	//  done
	//  for i in $(seq 1 10) ; do
	//    crane index append -m ghcr.io/timebertt/e2e-pause:amd64 -m ghcr.io/timebertt/e2e-pause:arm64 -t ghcr.io/timebertt/e2e-pause:0.$i
	//  done
	// This image is used in e2e tests because it is small, fast to run, and has simple and consistent tags. But most
	// importantly, it makes these e2e tests independent of external registries, which might change or rate limit pulls.
	ImageRepository = "ghcr.io/timebertt/e2e-pause"
)

Variables

This section is empty.

Functions

func BumpImage

func BumpImage(obj client.Object)

func CommonLabels added in v0.4.0

func CommonLabels() map[string]string

func CreateDaemonSet

func CreateDaemonSet(namespace, name string) client.Object

func CreateDeployment

func CreateDeployment(namespace, name string) client.Object

func CreateStatefulSet

func CreateStatefulSet(namespace string, name string) client.Object

func DumpEventsInNamespace added in v0.4.0

func DumpEventsInNamespace(namespace, dir string)

func DumpNamespaceContents added in v0.4.0

func DumpNamespaceContents(namespace string)

DumpNamespaceContents dumps all relevant objects in the test namespace to a dedicated ARTIFACTS directory if the spec failed to help deflaking/debugging tests.

func DumpObjectsInNamespace added in v0.4.0

func DumpObjectsInNamespace(namespace, kind, dir string)

func Image

func Image() string

func ImageTag

func ImageTag() string

func PodSpec

func PodSpec() corev1.PodSpec

func PrepareTestNamespace

func PrepareTestNamespace(optionalName ...string) string

func RevisionObjectFor

func RevisionObjectFor(obj client.Object) client.Object

func Scale added in v0.4.0

func Scale(obj client.Object, replicas int32)

func SetClient

func SetClient(c client.Client)

func SetImage added in v0.4.0

func SetImage(obj client.Object, image string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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