maestro

package
v1.2.4 Latest Latest
Warning

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

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

Documentation

Overview

Package maestro implements Maestro's methods.

Index

Constants

View Source
const (
	// TestsPassed is used for tests that passed.
	TestsPassed = "passed"

	// TestsFailed is used for tests that failed.
	TestsFailed = "failed"

	// TestsTimedOut is used for tests that timed out.
	TestsTimedOut = "timedout"

	// FSMNamespaceEnvVar is the environment variable for the FSM namespace.
	FSMNamespaceEnvVar = "K8S_NAMESPACE"

	// BookbuyerNamespaceEnvVar is the environment variable for the Bookbuyer namespace.
	BookbuyerNamespaceEnvVar = "BOOKBUYER_NAMESPACE"

	// BookthiefNamespaceEnvVar is the environment variable for the Bookbuyer namespace.
	BookthiefNamespaceEnvVar = "BOOKTHIEF_NAMESPACE"

	// BookstoreNamespaceEnvVar is the environment variable for the Bookbuyer namespace.
	BookstoreNamespaceEnvVar = "BOOKSTORE_NAMESPACE"

	// WaitForPodTimeSecondsEnvVar is the environment variable for the time we will wait on the pod to be ready.
	WaitForPodTimeSecondsEnvVar = "CI_MAX_WAIT_FOR_POD_TIME_SECONDS"

	// WaitForOKSecondsEnvVar is the environment variable for the time to wait till a success is returned by the server.
	WaitForOKSecondsEnvVar = "CI_WAIT_FOR_OK_SECONDS"
)

Variables

View Source
var (
	// WaitForPod is the time we wait for a pod to become ready
	WaitForPod = 5 * time.Second

	// PollLogsFromTimeSince is the interval we go back in time to get pod logs
	PollLogsFromTimeSince = 2 * time.Second

	// FailureLogsFromTimeSince is the interval we go back in time to get pod logs
	FailureLogsFromTimeSince = 10 * time.Minute
)

Functions

func DeleteNamespaces

func DeleteNamespaces(client *kubernetes.Clientset, namespaces ...string)

DeleteNamespaces deletes the namespaces listed and any Helm releases within them.

func DeleteWebhookConfiguration

func DeleteWebhookConfiguration(client *kubernetes.Clientset, webhookConfigName string)

DeleteWebhookConfiguration deletes the mutatingwebhookconfiguration by name

func GetKubernetesClient

func GetKubernetesClient() *kubernetes.Clientset

GetKubernetesClient returns a k8s client.

func GetPodLogs

func GetPodLogs(kubeClient kubernetes.Interface, namespace string, podName string, containerName string, timeSince time.Duration) string

GetPodLogs returns pod logs.

func GetPodName

func GetPodName(kubeClient kubernetes.Interface, namespace, selector string) (string, error)

GetPodName returns the name of the pod for the given selector.

func SearchLogsForSuccess

func SearchLogsForSuccess(kubeClient kubernetes.Interface, namespace string, podName string, containerName string, totalWait time.Duration, result chan string, successToken, failureToken string)

SearchLogsForSuccess tails logs until success enum is found. The pod/container we are observing is responsible for sending the SUCCESS/FAIL token based on local heuristic.

func WaitForPodToBeReady

func WaitForPodToBeReady(kubeClient kubernetes.Interface, totalWait time.Duration, namespace, selector string, wg *sync.WaitGroup)

WaitForPodToBeReady waits for a pod by selector to be ready.

Types

This section is empty.

Jump to

Keyboard shortcuts

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