common

package
v0.0.0-...-a605f52 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AnnotationResumeTestrun is the annotation name to trigger resume on the testrun
	AnnotationResumeTestrun = "testmachinery.sapcloud.io/resume"

	// AnnotationCollectTestrun is the annotation to trigger collection and persistence of testrun results
	AnnotationCollectTestrun = "testmachinery.garden.cloud/collect"

	// AnnotationSystemStep is the testflow step annotation to specify that the step is a testmachinery system step.
	// It indicates that it should not be considered as a test and therefore should not count for a test to be failed.
	AnnotationSystemStep = "testmachinery.sapcloud.io/system-step"

	// AnnotationTestDefName is the name of origin TestDefinition.
	AnnotationTestDefName = "testmachinery.sapcloud.io/TestDefinition"

	// AnnotationTestDefID is the unique name of origin TestDefinition in a specific flow and step.
	AnnotationTestDefID = "testmachinery.sapcloud.io/ID"

	// LabelTMDashboardIngress is the label to identify TestMachinery ingress objects.
	LabelTMDashboardIngress = "testmachinery.garden.cloud/tm-dashboard"
)

Annotations

View Source
const (

	// AnnotationTestrunPurpose is the annotation name to specify a purpose of the testrun
	AnnotationTestrunPurpose = "testmachinery.sapcloud.io/purpose"

	// AnnotationTemplateIDTestrun is the annotation to specify the name of the template the testrun is rendered from
	AnnotationTemplateIDTestrun = "testrunner.testmachinery.gardener.cloud/templateID"

	// AnnotationRetries is the annotation to specify the retry count of the current testrun
	AnnotationRetries = "testrunner.testmachinery.gardener.cloud/retries"

	// AnnotationPreviousAttempt is the testrun id if the previous testrun
	AnnotationPreviousAttempt = "testrunner.testmachinery.gardener.cloud/previous-attempt"

	// AnnotationLandscape is the annotation to specify the landscape this testrun is testing
	AnnotationLandscape = "metadata.testmachinery.gardener.cloud/landscape"

	// AnnotationK8sVersion is the annotation to specify the k8s version the testrun is testing
	AnnotationK8sVersion = "metadata.testmachinery.gardener.cloud/k8sVersion"

	// AnnotationCloudProvider is the annotation to specify the cloudprovider the testrun is testing
	AnnotationCloudProvider = "metadata.testmachinery.gardener.cloud/cloudprovider"

	// AnnotationContainerRuntime is the annotation to specify the container runtime of the shoot nodes the testrun is testing
	AnnotationContainerRuntime = "metadata.testmachinery.gardener.cloud/container-runtime"

	// AnnotationOperatingSystem is the annotation to specify the operating system of the shoot nodes the testrun is testing
	AnnotationOperatingSystem = "metadata.testmachinery.gardener.cloud/operating-system"

	// AnnotationOperatingSystemVersion is the annotation to specify the version of the operating system of the shoot nodes the testrun is testing
	AnnotationOperatingSystemVersion = "metadata.testmachinery.gardener.cloud/operating-system-version"

	// AnnotationRegion is the annotation to specify the region of the shoot the testrun is testing
	AnnotationRegion = "metadata.testmachinery.gardener.cloud/region"

	// AnnotationZone is the annotation to specify the zone of the shoot the testrun is testing
	AnnotationZone = "metadata.testmachinery.gardener.cloud/zone"

	// AnnotationShootAnnotations is the annotation describing which additional shoot annotations were set (as they could impact the shoot behaviour)
	AnnotationShootAnnotations = "metadata.testmachinery.gardener.cloud/shoot-annotations"

	// AnnotationFlavorDescription is the annotation to describe the test flavor of the current run testrun
	AnnotationFlavorDescription = "metadata.testmachinery.gardener.cloud/flavor-description"

	// AnnotationDimension is the annotation to specify the dimension the testrun is testing
	AnnotationDimension = "metadata.testmachinery.gardener.cloud/dimension"

	// AnnotationGroupPurpose is the annotation to describe a run group with an arbitrary string
	AnnotationGroupPurpose = "metadata.testmachinery.gardener.cloud/group-purpose"

	// AnnotationTMDashboardURL is the annotation to describe the URL of the TM Dashboard if present
	AnnotationTMDashboardURL = "metadata.testmachinery.gardener.cloud/tm-dashboard-url"

	// LabelTestrunExecutionGroup is the label to specify the unique name of the run (multiple testruns) this test belongs to.
	// A run represents all tests that are running from one testrunner.
	LabelTestrunExecutionGroup = "testrunner.testmachinery.gardener.cloud/execution-group"
)

Metadata Annotations

View Source
const (
	// LabelUploadedToGithub is the label to specify whether the testrun result was uploaded to github
	LabelUploadedToGithub = "testrunner.testmachinery.sapcloud.io/uploaded-to-github"

	// images
	DockerImageGardenerApiServer = "eu.gcr.io/gardener-project/gardener/apiserver"

	// Repositories
	TestInfraRepo   = "https://github.com/gardener/test-infra.git"
	GardenSetupRepo = "https://github.com/gardener/garden-setup.git"
	GardenerRepo    = "https://github.com/gardener/gardener.git"

	PatternLatest                 = "latest"
	PatternOneMinorBeforeLatest   = "oneMinorBeforeLatest"
	PatternTwoMinorBeforeLatest   = "twoMinorBeforeLatest"
	PatternThreeMinorBeforeLatest = "threeMinorBeforeLatest"
	PatternFourMinorBeforeLatest  = "fourMinorBeforeLatest"
	PatternOneMajorBeforeLatest   = "oneMajorBeforeLatest"
	PatternTwoMajorBeforeLatest   = "twoMajorBeforeLatest"
	PatternThreeMajorBeforeLatest = "threeMajorBeforeLatest"
	PatternFourMajorBeforeLatest  = "fourMajorBeforeLatest"

	// TM Dashboard
	DashboardExecutionGroupParameter = "runID"

	// DashboardPaginationFrom is the name of the http parameter for the pagination from index.
	DashboardPaginationFrom = "from"

	// DashboardPaginationTo is the name of the http parameter for the pagination from index.
	DashboardPaginationTo = "to"
)

Testrunner Annotations

Variables

View Source
var (
	// Default timeout of 4 hours to wait before resuming the testrun
	DefaultPauseTimeout = 14400
)

Functions

This section is empty.

Types

type AdditionalLocation

type AdditionalLocation struct {
	Type     string `json:"type"`
	Repo     string `json:"repo"`
	Revision string `json:"revision"`
}

AdditionalLocation describes a location where to look for tests (beyond the ones added automatically from the component descriptor).

type CloudProvider

type CloudProvider string

CloudProvider is a string alias.

const (
	// CloudProviderAWS is a constant for the AWS cloud provider.
	CloudProviderAWS CloudProvider = "aws"
	// CloudProviderAzure is a constant for the Azure cloud provider.
	CloudProviderAzure CloudProvider = "azure"
	// CloudProviderGCP is a constant for the GCP cloud provider.
	CloudProviderGCP CloudProvider = "gcp"
	// CloudProviderOpenStack is a constant for the OpenStack cloud provider.
	CloudProviderOpenStack CloudProvider = "openstack"
	// CloudProviderAlicloud is a constant for the Alibaba cloud provider.
	CloudProviderAlicloud CloudProvider = "alicloud"
	// CloudProviderPacket is a constant for the Packet cloud provider.
	CloudProviderPacket CloudProvider = "packet"
)

type ExtendedConfiguration

type ExtendedConfiguration struct {
	ProjectName      string `json:"projectName"`
	CloudprofileName string `json:"cloudprofile"`
	SecretBinding    string `json:"secretBinding"`
	Region           string `json:"region"`
	Zone             string `json:"zone"`

	FloatingPoolName     string `json:"floatingPoolName"`
	LoadbalancerProvider string `json:"loadbalancerProvider"`

	NetworkingType string `json:"networkingType"`

	ControlPlaneFailureTolerance string `json:"controlPlaneFailureTolerance"`

	// ControlPlaneConfig contains the provider-specific control plane config blob.
	// Overwrites the controlplane config generated by the specific provider if defined.
	ControlPlaneConfig *runtime.RawExtension `json:"controlPlaneConfig,omitempty"`
	// InfrastructureConfig contains the provider-specific infrastructure config blob.
	// Overwrites the infrastructure config generated by the specific provider if defined.
	InfrastructureConfig *runtime.RawExtension `json:"infrastructureConfig,omitempty"`
	// NetworkingConfig contains the provider-specific infrastructure config blob.
	// Overwrites the networking config generated by the specific provider if defined.
	NetworkingConfig *runtime.RawExtension `json:"networkingConfig,omitempty"`

	// ChartPath use the specific chartPath to render the flavor.
	// This will overwrite the default shoot chart path.
	ChartPath *string `json:"chartPath,omitempty"`
}

ExtendedConfiguration specifies extended configuration for shoot flavors that are deployed into a preexisting landscape

type ExtendedShoot

type ExtendedShoot struct {
	Shoot
	ExtendedShootConfiguration
}

ExtendedShoot is one instance that is generated from a extended shoot flavor

type ExtendedShootConfiguration

type ExtendedShootConfiguration struct {
	Name         string                         `json:"name"`
	Namespace    string                         `json:"namespace"`
	Cloudprofile gardencorev1beta1.CloudProfile `json:"-"`
	ExtendedConfiguration
}

ExtendedShootConfiguration specifies extended configuration for shoots that are deployed into a preexisting landscape

type ExtendedShootFlavor

type ExtendedShootFlavor struct {
	ShootFlavor
	ExtendedConfiguration
}

ExtendedShootFlavor is the shoot flavor with extended configuration

type ExtendedShootFlavors

type ExtendedShootFlavors struct {
	Flavors []*ExtendedShootFlavor `json:"flavors"`
}

ExtendedShootFlavors contains a list of extended shoot flavors

type Shoot

type Shoot struct {
	// WithShort description of the flavor
	// +optional
	Description string

	// Cloudprovider of the shoot
	Provider CloudProvider

	// Kubernetes versions to test
	KubernetesVersion gardencorev1beta1.ExpirableVersion

	// AdditionalAnnotations holds annotations to be added to created shoots
	AdditionalAnnotations map[string]string

	// AdditionalLocations defines additional locations or overwrites locations from where to get tests from
	AdditionalLocations []AdditionalLocation

	// Worker pools to test
	Workers []gardencorev1beta1.Worker
}

Shoot is the internal representation of one instance that is generated from a shoot flavor

type ShootFlavor

type ShootFlavor struct {
	// WithShort description of the flavor
	// +optional
	Description string `json:"description"`

	// Cloudprovider of the shoot
	Provider CloudProvider `json:"provider"`

	// Kubernetes versions to test
	KubernetesVersions ShootKubernetesVersionFlavor `json:"kubernetes"`

	// AdditionalAnnotations allows to optionally define additional annotations for the created shoot resources
	// +optional
	AdditionalAnnotations map[string]string `json:"annotations"`

	// AdditionalLocations defines additional locations or overwrites locations from where to get tests from
	// +optional
	AdditionalLocations []AdditionalLocation `json:"additionalLocations"`

	// Worker pools to test
	Workers []ShootWorkerFlavor `json:"workers"`
}

ShootFlavor describes the shoot flavors that should be tested.

type ShootKubernetesVersionFlavor

type ShootKubernetesVersionFlavor struct {
	// Regex to select versions from the cloudprofile
	// +optional
	Pattern *string `json:"pattern"`

	// FilterPatchVersions will only keep the latest patch version of all minor versions
	// +optional
	FilterPatchVersions *bool `json:"filterPatchVersions"`

	// List of versions to test
	// +optional
	Versions *[]gardencorev1beta1.ExpirableVersion `json:"versions"`
}

type ShootWorkerFlavor

type ShootWorkerFlavor struct {
	WorkerPools []gardencorev1beta1.Worker `json:"workerPools"`
}

ShootWorkerFlavor defines the worker pools that should be tested

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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