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

Explicitly wait for ingress service creation #2445

Merged
merged 2 commits into from Mar 26, 2024

Conversation

giorio94
Copy link
Member

Rather than just listing the services, let's explicitly wait until we successfully retrieve all expected services, so that we can provide a clear error in case something went wrong and they were not created.

We already retrieve the services at a later stage, and the pre-populated
map is actually incorrect, as the namespace is not configured, causing
misleading failures if not replaced. To this end, a subsequent commit
will also extend the retrieval step to make sure that the service was
actually created, and hence retrieved.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Rather than just listing the services, let's explicitly wait until we
successfully retrieve all expected services, so that we can provide a
clear error in case something went wrong and they were not created.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
log.Debugf("[%s] Failed to retrieve Service %s/%s: %s", client.ClusterName(), namespace, name, err)

select {
case <-time.After(PollInterval):
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be better to use inctimer here

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, I'd personally keep time.After for consistency with all other usages (inctimer doesn't seem to be used at all in Cilium CLI), and a global change would be out of scope here. It shouldn't matter much in terms of performance, as the CLI is not a long-running application as the Cilium agent, and it is far from being optimized in terms of memory consumption.

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 25, 2024
@michi-covalent michi-covalent merged commit b005442 into cilium:main Mar 26, 2024
13 checks passed
@giorio94 giorio94 deleted the mio/ingress-service branch March 26, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants