configuration

package
v0.0.0-...-7731ac6 Latest Latest
Warning

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

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

Documentation

Overview

package configuration includes the definition of test suite configuration and the functions necessary to process the configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadEnvironmentVariables

func LoadEnvironmentVariables() error

Types

type AcceptedKernelTaintsInfo

type AcceptedKernelTaintsInfo struct {

	// Accepted modules that cause taints that we want to supply to the test suite
	Module string `yaml:"module" json:"module"`
}

AcceptedKernelTaintsInfo contains all certified operator request info

type CrdFilter

type CrdFilter struct {
	NameSuffix string `yaml:"nameSuffix" json:"nameSuffix"`
	Scalable   bool   `yaml:"scalable" json:"scalable"`
}

CrdFilter defines a CustomResourceDefinition config filter.

type ManagedDeploymentsStatefulsets

type ManagedDeploymentsStatefulsets struct {
	Name string `yaml:"name" json:"name"`
}

type Namespace

type Namespace struct {
	Name string `yaml:"name" json:"name"`
}

Namespace struct defines namespace properties

type SkipHelmChartList

type SkipHelmChartList struct {
	// Name is the name of the `operator bundle package name` or `image-version` that you want to check if exists in the RedHat catalog
	Name string `yaml:"name" json:"name"`
}

type SkipScalingTestDeploymentsInfo

type SkipScalingTestDeploymentsInfo struct {

	// Deployment name and namespace that can be skipped by the scaling tests
	Name      string `yaml:"name" json:"name"`
	Namespace string `yaml:"namespace" json:"namespace"`
}

SkipScalingTestDeploymentsInfo contains a list of names of deployments that should be skipped by the scaling tests to prevent issues

type SkipScalingTestStatefulSetsInfo

type SkipScalingTestStatefulSetsInfo struct {

	// StatefulSet name and namespace that can be skipped by the scaling tests
	Name      string `yaml:"name" json:"name"`
	Namespace string `yaml:"namespace" json:"namespace"`
}

SkipScalingTestStatefulSetsInfo contains a list of names of statefulsets that should be skipped by the scaling tests to prevent issues

type TestConfiguration

type TestConfiguration struct {
	// targetNameSpaces to be used in
	TargetNameSpaces []Namespace `yaml:"targetNameSpaces,omitempty" json:"targetNameSpaces,omitempty"`
	// labels identifying pods under test
	PodsUnderTestLabels []string `yaml:"podsUnderTestLabels,omitempty" json:"podsUnderTestLabels,omitempty"`
	// labels identifying operators unde test
	OperatorsUnderTestLabels []string `yaml:"operatorsUnderTestLabels,omitempty" json:"operatorsUnderTestLabels,omitempty"`
	// CRDs section.
	CrdFilters          []CrdFilter                      `yaml:"targetCrdFilters,omitempty" json:"targetCrdFilters,omitempty"`
	ManagedDeployments  []ManagedDeploymentsStatefulsets `yaml:"managedDeployments,omitempty" json:"managedDeployments,omitempty"`
	ManagedStatefulsets []ManagedDeploymentsStatefulsets `yaml:"managedStatefulsets,omitempty" json:"managedStatefulsets,omitempty"`

	// AcceptedKernelTaints
	AcceptedKernelTaints []AcceptedKernelTaintsInfo `yaml:"acceptedKernelTaints,omitempty" json:"acceptedKernelTaints,omitempty"`
	SkipHelmChartList    []SkipHelmChartList        `yaml:"skipHelmChartList,omitempty" json:"skipHelmChartList,omitempty"`
	// SkipScalingTestDeploymentNames
	SkipScalingTestDeployments []SkipScalingTestDeploymentsInfo `yaml:"skipScalingTestDeployments,omitempty" json:"skipScalingTestDeployments,omitempty"`
	// SkipScalingTestStatefulSetNames
	SkipScalingTestStatefulSets []SkipScalingTestStatefulSetsInfo `yaml:"skipScalingTestStatefulSets,omitempty" json:"skipScalingTestStatefulSets,omitempty"`
	ValidProtocolNames          []string                          `yaml:"validProtocolNames,omitempty" json:"validProtocolNames,omitempty"`
	ServicesIgnoreList          []string                          `yaml:"servicesignorelist,omitempty" json:"servicesignorelist,omitempty"`
	DebugDaemonSetNamespace     string                            `yaml:"debugDaemonSetNamespace,omitempty" json:"debugDaemonSetNamespace,omitempty"`
	// Collector's parameters
	ExecutedBy           string `yaml:"executedBy,omitempty" json:"executedBy,omitempty"`
	PartnerName          string `yaml:"partnerName,omitempty" json:"partnerName,omitempty"`
	CollectorAppPassword string `yaml:"collectorAppPassword,omitempty" json:"collectorAppPassword,omitempty"`
	CollectorAppEndpoint string `yaml:"collectorAppEndpoint,omitempty" json:"collectorAppEndpoint,omitempty"`
}

TestConfiguration provides test related configuration

func LoadConfiguration

func LoadConfiguration(filePath string) (TestConfiguration, error)

LoadConfiguration return a function that loads the configuration from a file once

type TestParameters

type TestParameters struct {
	Home                          string `envconfig:"home"`
	Kubeconfig                    string `envconfig:"kubeconfig"`
	ConfigurationPath             string `split_words:"true" default:"tnf_config.yml"`
	NonIntrusiveOnly              bool   `split_words:"true"`
	LogLevel                      string `default:"debug" split_words:"true"`
	OfflineDB                     string `split_words:"true"`
	AllowPreflightInsecure        bool   `split_words:"true"`
	PfltDockerconfig              string `split_words:"true" envconfig:"PFLT_DOCKERCONFIG"`
	IncludeWebFilesInOutputFolder bool   `split_words:"true" default:"false"`
	OmitArtifactsZipFile          bool   `split_words:"true" default:"false"`
	EnableDataCollection          bool   `split_words:"true" envconfig:"ENABLE_DATA_COLLECTION" default:"false"`
	EnableXMLCreation             bool   `split_words:"true" envconfig:"TNF_ENABLE_XML_CREATION" default:"false"`
	DaemonsetCPUReq               string `default:"100m" split_words:"true"`
	DaemonsetCPULim               string `default:"100m" split_words:"true"`
	DaemonsetMemReq               string `default:"100M" split_words:"true"`
	DaemonsetMemLim               string `default:"100M" split_words:"true"`
}

func GetTestParameters

func GetTestParameters() *TestParameters

Jump to

Keyboard shortcuts

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