Repository navigation
[Backport release-1.6] fix(apps): let the cleanup hooks watch the objects they delete - #4369
Merged
Merged
Conversation
Author
|
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-4135-to-release-1.6
git worktree add --checkout .worktree/backport-4135-to-release-1.6 backport-4135-to-release-1.6
cd .worktree/backport-4135-to-release-1.6
git reset --hard HEAD^
git cherry-pick -x 711fcc168c5976466b66ab9d3ac029891e5327e6 f886f26ad43d305849aa78e183d008f97b4bb82b
git push --force-with-lease |
1 of 12 tasks
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Repository: cozystack/cozystack/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
kubectl delete waits for the object to disappear unless told otherwise, and that wait is a watch. The post-delete hook Roles of harbor, clickhouse, mariadb and qdrant granted get, list and delete only, so every uninstall logged a forbidden watch, the wait was skipped and the hook reported success before the PVCs were actually gone. The rules now carry watch for every resource the hooks delete, including the named Secrets the mariadb hook removes. Signed-off-by: Yan Bondarenko <[email protected]> (cherry picked from commit 711fcc1) Signed-off-by: Myasnikov Daniil <[email protected]> Assisted-by: LLM
With watch granted, kubectl delete waits for the claims to be gone, and its default for that wait is a week. A claim held by a pod that will not stop, or a stuck detach, would hold the post-delete hook until helm-controller's 300s uninstall budget ran out and leave the HelmRelease stuck uninstalling. The PVC deletes in the clickhouse, harbor, mariadb and qdrant hooks now wait 120s at most and report the claims still terminating by name, and each Job carries activeDeadlineSeconds 270 with a 10s termination grace period, the numbers packages/apps/tenant/templates/cleanup-job.yaml documents against that budget, so a kubectl that never returns cannot hold the hook either. The mariadb Role no longer grants watch on the named Secrets: they carry no finalizer, so the delete never reaches the watch, and a resourceNames rule does not authorize a collection watch anyway. Signed-off-by: Yan Bondarenko <[email protected]> Assisted-by: LLM (cherry picked from commit f886f26) Signed-off-by: Myasnikov Daniil <[email protected]>
myasnikovdaniil
force-pushed
the
backport-4135-to-release-1.6
branch
from
September 23, 2026 10:27
2f38f46 to
6ec2e05
Compare
myasnikovdaniil
marked this pull request as ready for review
September 23, 2026 12:03
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.
Description
Backport of #4135 to
release-1.6.