Skip to content

Commit

Permalink
use temp dir for repo config in helm installer
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Dettori <[email protected]>
  • Loading branch information
pdettori committed Feb 15, 2024
1 parent b7372d1 commit 78fc394
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/helm/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ import (
clog "sigs.k8s.io/controller-runtime/pkg/log"
)

const (
repoFile = "helm.repo"
)

type HelmHandler struct {
URL string
RepoName string
Expand All @@ -66,7 +70,8 @@ func Init(ctx context.Context, handler *HelmHandler) error {
handler.log = clog.FromContext(ctx)
handler.settings = cli.New()
handler.settings.SetNamespace(handler.Namespace)
handler.settings.RegistryConfig = "/tmp"
handler.settings.RegistryConfig = os.TempDir()
handler.settings.RepositoryConfig = filepath.Join(os.TempDir(), repoFile)
return nil
}

Expand Down

0 comments on commit 78fc394

Please sign in to comment.