landscaper

package
v1.7.1-0...-23dd39d Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonFrameworkLandscaper

type CommonFrameworkLandscaper struct {
	TestDescription

	Config           *LandscaperCommonConfig
	Logger           *logrus.Entry
	LandscaperClient client.Client

	// ResourceSuffix is a random suffix for landscaper resources created
	// by this integration test
	ResourceSuffix string
}

CommonFrameworkLandscaper is a common framework for the testing of landscaper components.

func NewLandscaperCommonFramework

func NewLandscaperCommonFramework(cfg *LandscaperCommonConfig) *CommonFrameworkLandscaper

NewLandscaperCommonFramework creates a new landscaper common framework.

func (*CommonFrameworkLandscaper) BeforeEach

func (f *CommonFrameworkLandscaper) BeforeEach()

BeforeEach should be called in ginkgo's BeforeEach. It merges the landscaper configuration with the configuration from flags and creates the landscaper client

func (*CommonFrameworkLandscaper) CreateConfigMap

func (f *CommonFrameworkLandscaper) CreateConfigMap(ctx context.Context, name string, data map[string]string) error

CreateConfigMap creates a new config map with retries

func (*CommonFrameworkLandscaper) CreateTargetWithKubeconfig

func (f *CommonFrameworkLandscaper) CreateTargetWithKubeconfig(ctx context.Context, name, kubeconfigPath string) error

CreateTargetWithKubeconfig creates the landscaper target from a given name and kubeconfig path on the local filesystem

func (*CommonFrameworkLandscaper) DeleteConfigMap

func (f *CommonFrameworkLandscaper) DeleteConfigMap(ctx context.Context, name string) error

DeleteConfigMap deletes a given config map resource with retries

func (*CommonFrameworkLandscaper) DeleteInstallation

func (f *CommonFrameworkLandscaper) DeleteInstallation(ctx context.Context, name string) error

DeleteSeed deletes the given installation and waits for it to be deleted.

func (*CommonFrameworkLandscaper) DeleteTarget

func (f *CommonFrameworkLandscaper) DeleteTarget(ctx context.Context, name string) error

DeleteTarget deletes a given target resource with retries

func (*CommonFrameworkLandscaper) GetInstallation

type ComponentConfig

type ComponentConfig struct {
	// contains filtered or unexported fields
}

ComponentConfig contains all the information to uniquely identify a component descriptor in a registry landscaper tests create Installation CRDs referencing this component descriptor this implies that prior to the test execution, the component descriptor must already exist in the registry and must reference a blueprint.

type GardenletConfig

type GardenletConfig struct {
	SeedKubeconfigPath             string
	ImageVectorOverwrite           *string
	ComponentImageVectorOverwrites *string
	DeploymentConfiguration        *seedmanagementv1alpha1.GardenletDeployment
	GardenerConfig                 *GardenerConfig
	LandscaperCommonConfig         *LandscaperCommonConfig
}

LandscaperCommonConfig is the configuration for the landscaper

func RegisterGardenletFrameworkFlags

func RegisterGardenletFrameworkFlags() *GardenletConfig

RegisterGardenletFrameworkFlags adds all flags that are needed to configure a landscaper gardenlet framework to the provided flagset.

type GardenletFramework

type GardenletFramework struct {
	TestDescription
	*CommonFrameworkLandscaper
	*GardenerFramework

	Config     *GardenletConfig
	SeedClient client.Client

	// GardenletConfiguration contains the Gardenlet's configuration
	// that is contained in a config map and imported in the Installation CRD
	// to be read by the Landscaper gardenlet as part of its imports configuration
	// (landscaper/gardenlet/pkg/apis/imports/types.go)
	// exposed to create test cases based on the configuration
	ComponentConfiguration *configv1alpha1.GardenletConfiguration
}

GardenletFramework is a framework for the testing the gardenlet landscaper component.

func NewGardenletFramework

func NewGardenletFramework(cfg *GardenletConfig) *GardenletFramework

NewManagedSeedFramework creates a new managed seed framework.

func (*GardenletFramework) BeforeEach

func (f *GardenletFramework) BeforeEach()

BeforeEach should be called in ginkgo's BeforeEach. It merges the gardenet configuration with the configuration from flags and creates the seed client

func (*GardenletFramework) CreateInstallation

func (f *GardenletFramework) CreateInstallation(ctx context.Context) (*landscaperv1alpha1.Installation, error)

CreateInstallation creates an Installation CRD in the landscaper cluster

func (*GardenletFramework) CreateInstallationImports

func (f *GardenletFramework) CreateInstallationImports(ctx context.Context) error

CreateInstallationImports creates minimal import resources required or the Gardenlet landscaper - two targets - config map landscaper configuration - config map image vector override - config map components image vector override

func (*GardenletFramework) DeleteInstallationResources

func (f *GardenletFramework) DeleteInstallationResources(ctx context.Context) error

DeleteInstallationResources deletes the previously created landscaper resources

type LandscaperCommonConfig

type LandscaperCommonConfig struct {
	KubeconfigPathLandscaperCluster string
	TargetNamespace                 string
	ComponentConfig                 ComponentConfig
}

LandscaperCommonConfig is the configuration for the landscaper

func RegisterLandscaperCommonFrameworkFlags

func RegisterLandscaperCommonFrameworkFlags() *LandscaperCommonConfig

RegisterLandscaperCommonFrameworkFlags adds all flags that are needed to configure a landscaper common framework to the provided flagset.

Jump to

Keyboard shortcuts

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