util

package
v2.22.12 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanUpHelmTempDir

func CleanUpHelmTempDir(cacheDir string, logger *zap.SugaredLogger)

CleanUpHelmTempDir removes the helm cache directory. If deletion fails error is looged using the logger.

func CreateHelmTempDir

func CreateHelmTempDir(cacheDir string) (string, error)

CreateHelmTempDir creates a temporary directory inside cacheDir where helm caches will be download.

func GetCredentialFromSecret

func GetCredentialFromSecret(ctx context.Context, client ctrlruntimeclient.Client, namespce string, name string, key string) (string, error)

GetCredentialFromSecret get the secret and returns secret.Data[key].

func HelmAuthFromCredentials

func HelmAuthFromCredentials(ctx context.Context, client ctrlruntimeclient.Client, registryConfigFilePath string, secretNamespace string, credentials *appskubermaticv1.HelmCredentials) (helmclient.AuthSettings, error)

HelmAuthFromCredentials builds helmclient.AuthSettings from credentials. registryConfigFilePath is the path of the file that stores credentials for OCI registry. If credentials is nil then an empty helmclient.AuthSettings (i.e. no auth) is returned. If credentials can not be extracted from the secret an error is returned.

Types

type StatusUpdater

type StatusUpdater func(status *appskubermaticv1.ApplicationInstallationStatus)

StatusUpdater is a function that postpone the update of the applicationInstallation. It used to set status's filed of a specific template Provider (eg status.HelmRelease).

var NoStatusUpdate StatusUpdater = func(status *appskubermaticv1.ApplicationInstallationStatus) {

}

NoStatusUpdate is a StatusUpdater that does not update the status. It useful in case an error happens and we don't have information to update the status.

Jump to

Keyboard shortcuts

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