controllers: return err on auth dir create failure

Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
Hidde Beydals 2021-11-23 09:05:44 +01:00
parent dbbef5add8
commit 905602bdfe
1 changed files with 1 additions and 0 deletions

View File

@ -307,6 +307,7 @@ func (r *HelmChartReconciler) fromHelmRepository(ctx context.Context, repo sourc
authDir := filepath.Join(workDir, "creds")
if err := os.Mkdir(authDir, 0700); err != nil {
err = fmt.Errorf("failed to create temporary directory for repository credentials: %w", err)
return sourcev1.HelmChartNotReady(c, sourcev1.StorageOperationFailedReason, err.Error()), err
}
opts, err := getter.ClientOptionsFromSecret(authDir, *secret)
if err != nil {