Repository navigation
fix(bufstream): Clean up etcd PVCs during W&B deletion - #418
Open
danielpanzella wants to merge 4 commits into
Open
danielpanzella wants to merge 4 commits into
danielpanzella wants to merge 4 commits into
Conversation
danielpanzella
marked this pull request as ready for review
October 19, 2026 19:30
This branch has not been deployed
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.
Deleting a W&B CR with
retentionPolicy.onDelete: purgecan leave Bufstream's etcd PVCs behind because the old claim template lacks the W&B labels used by the purge selector. Separately, the normal read/reconcile path attempts to purge etcd data whenever the broker Application is missing, even during a partial deployment.This change makes the existing W&B deletion finalizer the only Bufstream PVC cleanup path:
ReadState; a missing broker Application reports a missing resource and preserves etcd data.detachand per-component retention overrides. A failed PVC deletion keeps the W&B cleanup finalizer so reconciliation can retry.Legacy claim matching retains the workload-label checks: Kubernetes copies StatefulSet selector labels onto generated PVCs even when the claim template has no labels (upstream controller). This matches the saved WESTest claims; unlabeled, unrelated claims are not deleted by name alone.
Validation:
Reconciledeletion path for purge with Applications present/absent, detach, retention overrides, finalizer ordering, and retry after a deletion error.go vet ./...passes.make testran the full suite; its only failure was the unrelatedTestTelemetryChartFullModeRendersCoreStack, whose Helm output is missingname: victoria-log-agent.make lintcould not complete: installed golangci-lint 2.13.2 cannot decode the Go 1.27.2 export data format (version 5 is greater than maximum supported version 4).A published operator build and fresh EKS end-to-end validation are still pending. The companion WESTest PR #56 adds PVC/PV draining and run-scoped EBS cleanup.