Skip to content

feat: wait for the HelmRelease to be ready before returning t8s kubeconfig - #1263

Merged
mbuechse merged 1 commit into
SovereignCloudStack:mainfrom
cwrau:burgundians
Aug 7, 2026
Merged

feat: wait for the HelmRelease to be ready before returning t8s kubeconfig#1263
mbuechse merged 1 commit into
SovereignCloudStack:mainfrom
cwrau:burgundians

Conversation

@cwrau

@cwrau cwrau commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • PluginT8s.create_cluster (added in feat: add t8s kaas offering #1244) returned the kubeconfig as soon as the <hrName>-kubeconfig secret appeared, before Flux had finished reconciling the HelmRelease — i.e. before the cluster was necessarily usable.
  • _wait_for_kubeconfig_secret now also polls the HelmRelease's own status.conditions for a Ready=True condition, on the same 30-minute timeout schedule as the secret wait, before returning the kubeconfig.
  • This mirrors the _get_condition_ready/wait_for_cluster_ready pattern already used by plugin_clusterstacks.py for its Cluster resource.

Test plan

  • Added _get_helmrelease_ready/_wait_for_helmrelease_ready tests covering: ready, not ready, missing status/conditions, other condition types, retry-until-ready, and timeout.
  • Updated test_wait_retries_on_404 and added test_wait_for_kubeconfig_secret_waits_for_helmrelease_ready to assert _wait_for_helmrelease_ready is invoked with the CustomObjectsApi client.
  • python -m pytest Tests/kaas/plugin — 38/38 passed.
  • flake8 — clean except pre-existing unrelated warnings in test_plugin_t8s.py.

@cwrau cwrau changed the title feat: wait for a ready node before returning t8s kubeconfig feat: wait for the HelmRelease to be ready before returning t8s kubeconfig Aug 6, 2026
Comment thread Tests/kaas/plugin/plugin_t8s.py Outdated
Comment thread Tests/kaas/plugin/plugin_t8s.py Outdated

@mbuechse mbuechse left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please fix the comment. Otherwise go for merge!

@mbuechse

mbuechse commented Aug 7, 2026

Copy link
Copy Markdown
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>
@mbuechse
mbuechse merged commit b5a1727 into SovereignCloudStack:main Aug 7, 2026
3 checks passed
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.

2 participants