providers

package
v2.24.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package providers provide the different implementations to download the application's source and install / uninstall the application into the user-cluster.

There are 2 types of providers:

  • source provider: which handles the download of application's sources. For example, the GitSource provider downloads sources from a git repository.
  • template provider: which handles installation, update, or uninstallation of an application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SourceProvider

type SourceProvider interface {

	// DownloadSource into the destination and return the full path to the source.
	// destination must exist.
	DownloadSource(destination string) (string, error)
}

SourceProvider is an interface for downloading the application's sources.

func NewSourceProvider

func NewSourceProvider(ctx context.Context, log *zap.SugaredLogger, client ctrlruntimeclient.Client, kubeconfig string, cacheDir string, appSource *appskubermaticv1.ApplicationSource, secretNamespace string) (SourceProvider, error)

NewSourceProvider returns the concrete implementation of SourceProvider according to source defined in appSource.

type TemplateProvider

type TemplateProvider interface {

	// InstallOrUpgrade the application from the source.
	InstallOrUpgrade(source string, appDefinition *appskubermaticv1.ApplicationDefinition, applicationInstallation *appskubermaticv1.ApplicationInstallation) (util.StatusUpdater, error)

	// Uninstall the application.
	Uninstall(applicationInstallation *appskubermaticv1.ApplicationInstallation) (util.StatusUpdater, error)
}

TemplateProvider is an interface to install, upgrade or uninstall application.

func NewTemplateProvider

func NewTemplateProvider(ctx context.Context, seedClient ctrlruntimeclient.Client, kubeconfig string, cacheDir string, log *zap.SugaredLogger, appInstallation *appskubermaticv1.ApplicationInstallation, secretNamespace string) (TemplateProvider, error)

NewTemplateProvider return the concrete implementation of TemplateProvider according to the templateMethod.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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