feat: wait for the HelmRelease to be ready before returning t8s kubeconfig - #1263
Merged
Conversation
mbuechse
reviewed
Aug 6, 2026
mbuechse
reviewed
Aug 7, 2026
mbuechse
approved these changes
Aug 7, 2026
mbuechse
left a comment
Contributor
There was a problem hiding this comment.
Please fix the comment. Otherwise go for merge!
Contributor
|
@cwrau Please, while you're at it, could you please also fix the pre-existing flake8 problems? They are showing up every time. |
…onfig PluginT8s handed back the kubeconfig as soon as the secret appeared, before Flux had finished reconciling the HelmRelease (and thus before the cluster was actually usable). create_cluster now waits for the HelmRelease's own status.conditions to report Ready=True, after the existing kubeconfig-secret wait and before writing out the kubeconfig, mirroring the _get_condition_ready pattern already used by plugin_clusterstacks.py. Also cleans up pre-existing flake8 findings in test_plugin_t8s.py (unused os/tempfile imports, E241 spacing) flagged during review. Signed-off-by: Chris Werner Rau <cwrau@cwrau.info>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PluginT8s.create_cluster(added in feat: add t8s kaas offering #1244) returned the kubeconfig as soon as the<hrName>-kubeconfigsecret appeared, before Flux had finished reconciling the HelmRelease — i.e. before the cluster was necessarily usable._wait_for_kubeconfig_secretnow also polls the HelmRelease's ownstatus.conditionsfor aReady=Truecondition, on the same 30-minute timeout schedule as the secret wait, before returning the kubeconfig._get_condition_ready/wait_for_cluster_readypattern already used byplugin_clusterstacks.pyfor its Cluster resource.Test plan
_get_helmrelease_ready/_wait_for_helmrelease_readytests covering: ready, not ready, missing status/conditions, other condition types, retry-until-ready, and timeout.test_wait_retries_on_404and addedtest_wait_for_kubeconfig_secret_waits_for_helmrelease_readyto assert_wait_for_helmrelease_readyis invoked with theCustomObjectsApiclient.python -m pytest Tests/kaas/plugin— 38/38 passed.flake8— clean except pre-existing unrelated warnings intest_plugin_t8s.py.