Skip to content

Commit cbe1650

Browse files
committed
fix: fix helm install bugs
1 parent 26db9fb commit cbe1650

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

controllers/helm.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,14 @@ func (c *ApiController) InstallHelmChartStream() {
221221
if cfg == nil {
222222
c.Ctx.ResponseWriter.ResponseWriter.Header().Set("Content-Type", "text/event-stream")
223223
fmt.Fprintf(c.Ctx.ResponseWriter.ResponseWriter, "data: ERROR: cluster not ready\n\n")
224+
c.StopRun()
224225
return
225226
}
226227
var req helmInstallReq
227228
if err := json.Unmarshal(c.Ctx.Input.RequestBody, &req); err != nil {
228229
c.Ctx.ResponseWriter.ResponseWriter.Header().Set("Content-Type", "text/event-stream")
229230
fmt.Fprintf(c.Ctx.ResponseWriter.ResponseWriter, "data: ERROR: %s\n\n", err.Error())
231+
c.StopRun()
230232
return
231233
}
232234

@@ -247,6 +249,7 @@ func (c *ApiController) InstallHelmChartStream() {
247249
flusher.Flush()
248250
}
249251
}
252+
c.StopRun()
250253
}
251254

252255
// UpgradeHelmRelease upgrades an existing Helm release.

store/helm.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,7 @@ func InstallHelmChartStream(ctx context.Context, cfg *rest.Config, releaseName,
372372
install.ReleaseName = releaseName
373373
install.Namespace = namespace
374374
install.CreateNamespace = true
375-
install.Wait = true
376-
install.Timeout = 5 * time.Minute
375+
install.Wait = false
377376
if _, err = install.RunWithContext(ctx, helmChart, vals); err != nil {
378377
if ctx.Err() != nil {
379378
send("ABORTED")

0 commit comments

Comments
 (0)