Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for the K8s api server to start #2036

Merged
merged 1 commit into from
Aug 5, 2021
Merged

Conversation

marccampbell
Copy link
Member

@marccampbell marccampbell commented Aug 4, 2021

This will wait for the api server to start by polling it's readyz endpoint.
This is necessary to start controlling the startup and verifying that the cluster is ready before the app can be deployed.

Now, when starting the app with kots run the output is:

  • Starting cluster ✓  
    The cluster is running. Press ctrl+c to terminate

@@ -31,5 +33,8 @@ func runScheduler(ctx context.Context, dataDir string) error {
logger.Infof("kubernetes scheduler exited %v", command.Execute())
}()

time.Sleep(time.Second * 20)
wg.Done()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is meant to be in the go func above. not sure using wait groups in synchronous code makes much sense

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, that sleep was debugging code, removed.
agreed on wait groups. should this be async and wgs, or all sync? any preference?

@marccampbell marccampbell merged commit 7e325ef into master Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants