argocdhelper

package
v0.0.0-...-1f0e0a3 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// test image.
	CnfTestImage = "quay.io/openshift-kni/cnf-tests:4.8"

	// ArgocdApps represents argocd git details.
	ArgocdApps = map[string]argocdparams.ArgocdGitDetails{}
	// ReporterNamespacesToDump tells to the reporter from where to collect logs.
	ReporterNamespacesToDump = map[string]string{
		argocdparams.ZtpTestNamespace: "",
	}

	// ReporterCRDsToDump tells to the reporter what CRs to dump.
	ReporterCRDsToDump = []k8sreporter.CRData{
		{Cr: &v1.PodList{}},
	}
)

ztp related vars.

Functions

func DoesGitPathExist

func DoesGitPathExist(gitURL, gitBranch, gitPath string) bool

DoesGitPathExist checks if the specified git url exists.

func GetAllTestClients

func GetAllTestClients() []*clients.Settings

GetAllTestClients is used to quickly obtain a list of all the test clients.

func GetArgocdAppGitDetails

func GetArgocdAppGitDetails() error

GetArgocdAppGitDetails is used to check the environment variables for any ztp test configuration. If any are undefined then the default values are used instead.

func GetGitDetailsFromArgocd

func GetGitDetailsFromArgocd(appName, namespace string) (string, string, string, error)

GetGitDetailsFromArgocd is used to get the current git repo, branch, and path in the Argocd app.

func GetZtpContext

func GetZtpContext() context.Context

GetZtpContext is used to get the context for the Ztp test client interactions.

func JoinGitPaths

func JoinGitPaths(inputs []string) string

JoinGitPaths is used to join any combination of git strings but also avoiding double slashes.

func ResetArgocdGitDetails

func ResetArgocdGitDetails() error

ResetArgocdGitDetails is used to configure Argocd back to the values it had before the tests started.

func SetGitDetailsInArgocd

func SetGitDetailsInArgocd(gitRepo, gitBranch, gitPath, argocdApp string, waitForSync, syncMustBeValid bool) error

SetGitDetailsInArgocd is used to update the git repo, branch, and path in the Argocd app.

func WaitUntilArgocdChangeIsCompleted

func WaitUntilArgocdChangeIsCompleted(appName string, syncMustBeValid bool, timeout time.Duration) error

WaitUntilArgocdChangeIsCompleted is used to wait until Argocd has updated its configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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