When running in a container, we would like the CMD to be iknite start.
Currently the code is:
|
ctx := context.Background() |
|
if timeout > 0 { |
|
err = wait.PollUntilContextTimeout(ctx, time.Second*time.Duration(2), time.Duration(timeout), true, IsIkniteReady) |
|
} else { |
|
err = wait.PollUntilContextCancel(ctx, time.Second*time.Duration(2), true, IsIkniteReady) |
|
} |
and IsIkniteReady, we do the following:
|
if cluster.Status.State > iknite.Initializing && cluster.Status.WorkloadsState.Count > 0 { |
|
return true, nil |
|
} |
We should add parameters to the function in order to be able to choose the phase on which we want to stop as well as if the condition is having some workloads or having all of them working.
Then the start should accept options in order to choose them, i.e.:
iknite start --wait-phase Stopping --wait-all-workloads
When running in a container, we would like the
CMDto beiknite start.Currently the code is:
iknite/pkg/cmd/start.go
Lines 125 to 130 in d81835b
and
IsIkniteReady, we do the following:iknite/pkg/cmd/start.go
Lines 89 to 91 in d81835b
We should add parameters to the function in order to be able to choose the phase on which we want to stop as well as if the condition is having some workloads or having all of them working.
Then the start should accept options in order to choose them, i.e.:
iknite start --wait-phase Stopping --wait-all-workloads