Documentation ¶
Overview ¶
Package applications contains logic to download the source of an application (e.g. download manifest from git) and install / uninstall the application into the user-cluster.
Index ¶
- type ApplicationInstaller
- type ApplicationManager
- func (a *ApplicationManager) Apply(ctx context.Context, log *zap.SugaredLogger, ...) (util.StatusUpdater, error)
- func (a *ApplicationManager) Delete(ctx context.Context, log *zap.SugaredLogger, ...) (util.StatusUpdater, error)
- func (a *ApplicationManager) DownloadSource(ctx context.Context, log *zap.SugaredLogger, ...) (string, error)
- func (a *ApplicationManager) GetAppCache() string
- func (a *ApplicationManager) IsStuck(ctx context.Context, log *zap.SugaredLogger, ...) (bool, error)
- func (a *ApplicationManager) Rollback(ctx context.Context, log *zap.SugaredLogger, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationInstaller ¶
type ApplicationInstaller interface { // GetAppCache return the application cache location (i.e. where source and others temporary files are written) GetAppCache() string // DownloadSource the application's source into downloadDest and returns the full path to the sources. DownloadSource(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation, downloadDest string) (string, error) // Apply function installs the application on the user-cluster and returns an error if the installation has failed. StatusUpdater is guaranteed to be non nil. This is idempotent. Apply(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, appDefinition *appskubermaticv1.ApplicationDefinition, applicationInstallation *appskubermaticv1.ApplicationInstallation, appSourcePath string) (util.StatusUpdater, error) // Delete function uninstalls the application on the user-cluster and returns an error if the uninstallation has failed. StatusUpdater is guaranteed to be non nil. This is idempotent. Delete(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation) (util.StatusUpdater, error) // IsStuck determines if a release is stuck. Its main purpose is to detect inconsistent behavior in upstream Application libraries IsStuck(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation) (bool, error) // Rollback rolls an Application back to the previous release Rollback(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation) error }
ApplicationInstaller handles the installation / uninstallation of an Application on the user cluster.
type ApplicationManager ¶
type ApplicationManager struct { // ApplicationCache is the path to the directory used for caching applications. (i.e. location where application's source will be downloaded, Helm repository cache ...) ApplicationCache string // Kubeconfig of the user-cluster Kubeconfig string // Namespace where credentials secrets are stored. SecretNamespace string }
ApplicationManager handles the installation / uninstallation of an Application on the user-cluster.
func (*ApplicationManager) Apply ¶
func (a *ApplicationManager) Apply(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, appDefinition *appskubermaticv1.ApplicationDefinition, applicationInstallation *appskubermaticv1.ApplicationInstallation, appSourcePath string) (util.StatusUpdater, error)
Apply creates the namespace where the application will be installed (if necessary) and installs the application.
func (*ApplicationManager) Delete ¶
func (a *ApplicationManager) Delete(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation) (util.StatusUpdater, error)
Delete uninstalls the application where the application was installed if necessary.
func (*ApplicationManager) DownloadSource ¶ added in v2.25.0
func (a *ApplicationManager) DownloadSource(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation, downloadDest string) (string, error)
DownloadSource the application's source using the appropriate provider into downloadDest and returns the full path to the sources.
func (*ApplicationManager) GetAppCache ¶
func (a *ApplicationManager) GetAppCache() string
func (*ApplicationManager) IsStuck ¶ added in v2.24.9
func (a *ApplicationManager) IsStuck(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation) (bool, error)
IsStuck determines if a release is stuck. Its main purpose is to detect inconsistent behavior in upstream Application libraries.
func (*ApplicationManager) Rollback ¶ added in v2.24.9
func (a *ApplicationManager) Rollback(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation) error
Rollback rolls an Application back to the previous release.
Directories ¶
Path | Synopsis |
---|---|
Package helmclient contains tools to interact with Helm API for downloading, installing, upgrading, and uninstalling Helm Chart.
|
Package helmclient contains tools to interact with Helm API for downloading, installing, upgrading, and uninstalling Helm Chart. |
Package providers provide the different implementations to download the application's source and install / uninstall the application into the user-cluster.
|
Package providers provide the different implementations to download the application's source and install / uninstall the application into the user-cluster. |
Package test contains helper functions for tests related to helm.
|
Package test contains helper functions for tests related to helm. |