Repository navigation
Commit 91cbb69
committed
fix(e2e): cover every tenant HelmRelease, and the paths the guard cannot reach
The guard judged the parent release alone. A teardown of the tenant CNI
or CSI surfaced only as whatever downstream deadline it eventually
broke, with the removal that preceded it named nowhere.
cozy_guard_helmrelease judges one release and the addon walk runs it
over the releases the parent installs, enumerated from the cluster so a
release the chart adds later is covered without editing this file. One
rule decides the verdict: the release was removed although nothing in
its own configuration would remove it to recover. That is two fields,
the install strategy and the retry budget, because the default strategy
uninstalls only between the attempts its budget allows and performs none
at a budget of zero.
The guard sits after the assertions, and every deadline whose breach it
explains ends the script under errexit well before it, so on exactly the
runs a teardown caused, it never ran. cozy_report_helmrelease_remediation
is the same classification with no verdict, called from the node-join
collector and from the exit handler, once per run. The handler is armed
at the CR apply rather than once the tenant answers: everything between
is a management-cluster wait on the parent release, and that is the
window a helm-wait budget expiring produces.
Every read is bounded by a request timeout and a wall clock, and keeps
its exit status, because a read that failed and a release with no
history both print nothing. Readiness and the configuration are read
before the history, or a release completing its install between the two
reads presents as Ready with an empty history. A read the wall clock cut
off is named as such rather than pointed at a kubectl error that was
never printed.
Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>1 parent b9efe24 commit 91cbb69
1 file changed
Lines changed: 623 additions & 45 deletions
0 commit comments