Skip to content

Commit

Permalink
Fix eventing for-loop terminating issue
Browse files Browse the repository at this point in the history
  • Loading branch information
astoycos committed May 4, 2020
1 parent ab28d51 commit 9bd7678
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/knative-setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func knativeServing() {
"DeploymentsAvaliable=" + knativeStatus[1] + "\n" + "InstallSucceeded=" + knativeStatus[2] +
"\n" + "Ready=" + knativeStatus[3] + "\n")

time.Sleep(10 * time.Second)
time.Sleep(5 * time.Second)

}

Expand Down Expand Up @@ -139,12 +139,12 @@ func knativeEventing() {
for !install || !ready {

cmd := get.NewCmdGet("kubectl", co.CurrentFactory, IOStreams)
cmd.Flags().Set("template", "{{range .status.conditions}}{{printf \" %s=%s \" .type .status}}{{end}}")
cmd.Flags().Set("template", "{{range .status.conditions}}{{printf \"%s= %s \" .type .status}}{{end}}")
cmd.Run(cmd, []string{"knativeeventing.operator.knative.dev/knative-eventing"})

knativeStatus := strings.Split(out.String(), " ")

install, err = strconv.ParseBool(knativeStatus[2])
install, err = strconv.ParseBool(knativeStatus[1])
if err != nil {
install = false
}
Expand All @@ -155,7 +155,7 @@ func knativeEventing() {
log.Println("Knative Eventing Install Status: ")
log.Print(out.String())
out.Reset()
time.Sleep(10 * time.Second)
time.Sleep(5 * time.Second)

}

Expand Down

0 comments on commit 9bd7678

Please sign in to comment.