config

package
v0.0.0-...-adfa13f Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HelmChartPath     = "../../../charts/consul"
	LicenseSecretName = "license"
	LicenseSecretKey  = "key"
)

HelmChartPath is the path to the helm chart. Note: this will need to be changed if this file is moved.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeTestConfig

type KubeTestConfig struct {
	KubeConfig    string
	KubeContext   string
	KubeNamespace string
}

func NewKubeTestConfigList

func NewKubeTestConfigList(kubeConfigs, kubeContexts, kubeNamespaces []string) []KubeTestConfig

NewKubeTestConfigList takes lists of kubernetes configs, contexts and namespaces and constructs KubeTestConfig We validate ahead of time that the lists are either 0 or the same length as we expect that if the length of a list is greater than 0, then the indexes should match. For example: []kubeContexts{"ctx1", "ctx2"} indexes 0, 1 match with []kubeNamespaces{"ns1", "ns2"}.

type TestConfig

type TestConfig struct {
	KubeEnvs           []KubeTestConfig
	EnableMultiCluster bool

	EnableEnterprise  bool
	EnterpriseLicense string

	SkipDataDogTests        bool
	DatadogHelmChartVersion string

	EnableOpenshift bool

	EnablePodSecurityPolicies bool

	EnableCNI                      bool
	EnableRestrictedPSAEnforcement bool

	EnableTransparentProxy bool

	DisablePeering bool

	HelmChartVersion       string
	ConsulImage            string
	ConsulK8SImage         string
	ConsulDataplaneImage   string
	ConsulVersion          *version.Version
	ConsulDataplaneVersion *version.Version
	EnvoyImage             string
	ConsulCollectorImage   string

	HCPResourceID string

	VaultHelmChartVersion string
	VaultServerVersion    string

	NoCleanupOnFailure bool
	NoCleanup          bool
	DebugDirectory     string

	UseAKS          bool
	UseEKS          bool
	UseGKE          bool
	UseGKEAutopilot bool
	UseKind         bool
	// contains filtered or unexported fields
}

TestConfig holds configuration for the test suite.

func (*TestConfig) GetPrimaryKubeEnv

func (t *TestConfig) GetPrimaryKubeEnv() KubeTestConfig

GetPrimaryKubeEnv returns the primary Kubernetes environment.

func (*TestConfig) HelmValuesFromConfig

func (t *TestConfig) HelmValuesFromConfig() (map[string]string, error)

HelmValuesFromConfig returns a map of Helm values that includes any non-empty values from the TestConfig.

func (*TestConfig) IsExpectedClusterCount

func (t *TestConfig) IsExpectedClusterCount(count int) bool

IsExpectedClusterCount check that we have at least the required number of clusters to run a test.

func (*TestConfig) SkipWhenCNI

func (c *TestConfig) SkipWhenCNI(t *testing.T)

func (*TestConfig) SkipWhenOpenshiftAndCNI

func (c *TestConfig) SkipWhenOpenshiftAndCNI(t *testing.T)

Jump to

Keyboard shortcuts

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