k8sTest

package
v1.17.0-pre.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DemoDaemonSet = helpers.Manifest{
		Filename:        "demo_ds.yaml",
		Alternate:       "demo_ds_local.yaml",
		DaemonSetNames:  []string{"testds", "testclient"},
		DeploymentNames: []string{"test-k8s2"},
		NumPods:         1,
		Singleton:       true,
	}

	DemoHostFirewall = helpers.Manifest{
		Filename:       "demo_hostfw.yaml",
		DaemonSetNames: []string{"testserver", "testclient", "testserver-host", "testclient-host"},
		LabelSelector:  "zgroup=DS",
	}

	IPSecSecret = helpers.Manifest{
		Filename: "ipsec_secret.yaml",
	}
)

Functions

func DeployCiliumAndDNS

func DeployCiliumAndDNS(vm *helpers.Kubectl, ciliumFilename string)

DeployCiliumAndDNS deploys DNS and cilium into the kubernetes cluster

func DeployCiliumOptionsAndDNS

func DeployCiliumOptionsAndDNS(vm *helpers.Kubectl, ciliumFilename string, options map[string]string)

DeployCiliumOptionsAndDNS deploys DNS and cilium with options into the kubernetes cluster

func ExpectAllPodsInNsTerminated

func ExpectAllPodsInNsTerminated(vm *helpers.Kubectl, ns string)

ExpectAllPodsInNsTerminated is a wrapper around helpers/WaitTerminatingPods. It asserts that the error returned by that function is nil.

func ExpectAllPodsTerminated

func ExpectAllPodsTerminated(vm *helpers.Kubectl)

ExpectAllPodsTerminated is a wrapper around helpers/WaitTerminatingPods. It asserts that the error returned by that function is nil.

func ExpectCiliumOperatorReady

func ExpectCiliumOperatorReady(vm *helpers.Kubectl)

ExpectCiliumOperatorReady is a wrapper around helpers/WaitForPods. It asserts that the error returned by that function is nil.

func ExpectCiliumPreFlightInstallReady

func ExpectCiliumPreFlightInstallReady(vm *helpers.Kubectl)

ExpectCiliumPreFlightInstallReady is a wrapper around helpers/WaitForNPods. It asserts the error returned by that function is nil.

func ExpectCiliumReady

func ExpectCiliumReady(vm *helpers.Kubectl)

ExpectCiliumReady is a wrapper around helpers/WaitForPods. It asserts that the error returned by that function is nil.

func ExpectHubbleCLIReady

func ExpectHubbleCLIReady(vm *helpers.Kubectl, ns string)

ExpectHubbleCLIReady is a wrapper around helpers/WaitForPods. It asserts that the error returned by that function is nil.

func ExpectHubbleRelayReady

func ExpectHubbleRelayReady(vm *helpers.Kubectl, ns string)

ExpectHubbleRelayReady is a wrapper around helpers/WaitForPods. It asserts that the error returned by that function is nil.

func ExpectKubeDNSReady

func ExpectKubeDNSReady(vm *helpers.Kubectl)

ExpectKubeDNSReady is a wrapper around helpers/WaitKubeDNS. It asserts that the error returned by that function is nil.

func InstallAndValidateCiliumUpgrades

func InstallAndValidateCiliumUpgrades(kubectl *helpers.Kubectl, oldHelmChartVersion, oldImageVersion, newHelmChartVersion, newImageVersion string) (func(), func())

InstallAndValidateCiliumUpgrades installs and tests if the oldVersion can be upgrade to the newVersion and if the newVersion can be downgraded to the oldVersion. It returns two callbacks, the first one is the assertfunction that need to run, and the second one are the cleanup actions

func RedeployCilium

func RedeployCilium(vm *helpers.Kubectl, ciliumFilename string, options map[string]string)

RedeployCilium reinstantiates the Cilium DS and ensures it is running.

This helper is only appropriate for reconfiguring Cilium in the middle of an existing testsuite that calls DeployCiliumAndDNS(...).

func RedeployCiliumWithMerge

func RedeployCiliumWithMerge(vm *helpers.Kubectl,
	ciliumFilename string,
	from, options map[string]string)

RedeployCiliumWithMerge merges the configuration passed as "from" into "options", allowing the caller to preserve the previous Cilium configuration, along with passing new configuration. This function behaves equivalently to RedeployCilium. Note that "options" is deep copied, meaning it will NOT be modified. Any modifications will be local to this function.

func SkipIfIntegration

func SkipIfIntegration(integration string)

SkipIfIntegration will skip a test if it's running with any of the specified integration.

func UninstallCiliumFromManifest

func UninstallCiliumFromManifest(vm *helpers.Kubectl, ciliumFilename string)

UninstallCiliumFromManifest uninstall a deployed Cilium configuration from the provided manifest file. Treat this as a cleanup function for RedeployCilium/Redeploy/DeployCiliumAndDNS/CiliumInstall.

Types

This section is empty.

Jump to

Keyboard shortcuts

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