Skip to content

Commit

Permalink
Add timeout option to install
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Mar 22, 2024
1 parent 37e0b3f commit f80fae9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/helmutil/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"
"path/filepath"
"strings"
"time"

"github.com/k8ssandra/k8ssandra-client/pkg/util"
"helm.sh/helm/v3/pkg/action"
Expand Down Expand Up @@ -129,13 +130,16 @@ func ListInstallations(cfg *action.Configuration) ([]*release.Release, error) {
return listAction.Run()
}

func Install(cfg *action.Configuration, releaseName, path, namespace string, values map[string]interface{}, devel bool, skipCRDs bool) (*release.Release, error) {
func Install(cfg *action.Configuration, releaseName, path, namespace string, values map[string]interface{}, devel bool, skipCRDs bool, timeout time.Duration) (*release.Release, error) {
installAction := action.NewInstall(cfg)
installAction.ReleaseName = releaseName
installAction.Namespace = namespace
installAction.CreateNamespace = true
installAction.Atomic = true
installAction.Wait = true
if timeout > 0 {
installAction.Timeout = timeout
}
if skipCRDs {
installAction.SkipCRDs = true
}
Expand Down

0 comments on commit f80fae9

Please sign in to comment.