Skip to content

Commit

Permalink
Merge pull request #37 from pluralsh/marcin/eng-2160-terraform-provid…
Browse files Browse the repository at this point in the history
…er-byok-clusters-shouldnt-wait-after-helm

 feat: Do not wait after helm install
  • Loading branch information
maciaszczykm authored Jun 3, 2024
2 parents 59b382d + 27c4f5d commit e897b93
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions internal/resource/cluster_operator_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ type OperatorHandler struct {
configuration *action.Configuration
install *action.Install
upgrade *action.Upgrade
uninstall *action.Uninstall
}

func (oh *OperatorHandler) init() error {
Expand Down Expand Up @@ -86,7 +85,6 @@ func (oh *OperatorHandler) init() error {

oh.initInstallAction()
oh.initUpgradeAction()
oh.initUninstallAction()

return nil
}
Expand Down Expand Up @@ -127,7 +125,7 @@ func (oh *OperatorHandler) initInstallAction() {
oh.install.Namespace = console.OperatorNamespace
oh.install.ReleaseName = console.ReleaseName
oh.install.Timeout = 5 * time.Minute
oh.install.Wait = true
oh.install.Wait = false
oh.install.CreateNamespace = true
}

Expand All @@ -136,14 +134,7 @@ func (oh *OperatorHandler) initUpgradeAction() {

oh.upgrade.Namespace = console.OperatorNamespace
oh.upgrade.Timeout = 5 * time.Minute
oh.upgrade.Wait = true
}

func (oh *OperatorHandler) initUninstallAction() {
oh.uninstall = action.NewUninstall(oh.configuration)

oh.uninstall.Timeout = 5 * time.Minute
oh.uninstall.Wait = true
oh.upgrade.Wait = false
}

// chartExists checks whether a chart is already installed
Expand Down Expand Up @@ -242,11 +233,6 @@ func (oh *OperatorHandler) Upgrade(token string) error {
return err
}

func (oh *OperatorHandler) Uninstall() error {
_, err := oh.uninstall.Run(console.ReleaseName)
return err
}

func NewOperatorHandler(ctx context.Context, client *client.Client, kubeconfig *Kubeconfig, repoUrl string, values *string, consoleUrl string) (*OperatorHandler, error) {
vals := map[string]any{}
if values != nil {
Expand Down

0 comments on commit e897b93

Please sign in to comment.