Skip to content

Commit

Permalink
feat: looping for cluster ready check
Browse files Browse the repository at this point in the history
Signed-off-by: aavarghese <avarghese@us.ibm.com>
  • Loading branch information
aavarghese committed Jul 31, 2024
1 parent d299303 commit 0840856
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/be/ibmcloud/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ func createInstance(vpcService *vpcv1.VpcV1, name string, ir llir.LLIR, c llir.C
Owner: "root:root",
RawFilePermissions: "0644",
}},
RunCmd: []string{"sleep 10", "env HOME=/root kubectl apply -f /app.yaml"},
RunCmd: []string{"sleep 10", //Minimum of 10 seconds needed for cluster to be able to run `apply`
"c=$(kind get clusters | grep lunchpail)",
"while [ -z \"$c\" ]; do",
" sleep 2",
" c=$(kind get clusters | grep lunchpail)",
"done",
"echo 'Kind cluster is ready'",
"env HOME=/root kubectl apply -f /app.yaml"},
}

instancePrototypeModel := &vpcv1.InstancePrototypeInstanceByImage{
Expand Down

0 comments on commit 0840856

Please sign in to comment.