Documentation ¶
Index ¶
- func CleanUpHelmTempDir(cacheDir string, logger *zap.SugaredLogger)
- func CreateHelmTempDir(cacheDir string) (string, error)
- func GetCredentialFromSecret(ctx context.Context, client ctrlruntimeclient.Client, namespce string, ...) (string, error)
- func HelmAuthFromCredentials(ctx context.Context, client ctrlruntimeclient.Client, ...) (helmclient.AuthSettings, error)
- type StatusUpdater
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 ¶
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.