Skip to content

iknite start should be able to wait indifinetly #181

Description

@antoinemartin

When running in a container, we would like the CMD to be iknite start.

Currently the code is:

iknite/pkg/cmd/start.go

Lines 125 to 130 in d81835b

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:

iknite/pkg/cmd/start.go

Lines 89 to 91 in d81835b

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Prevent from working properly with workaround availableenhancementNew feature or requestgoPull requests that update go code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions