Repository navigation
fix: pass ProviderConfigUsage cleaner to managed reconcilers - #482
Open
fernandezcuesta wants to merge 2 commits into
Open
fernandezcuesta wants to merge 2 commits into
fernandezcuesta wants to merge 2 commits into
Conversation
fernandezcuesta
marked this pull request as ready for review
October 8, 2026 20:52
fernandezcuesta
force-pushed
the
pcu-cleaner-sql
branch
from
October 8, 2026 20:52
44b4d8e to
b42011f
Compare
fernandezcuesta
force-pushed
the
pcu-cleaner-sql
branch
from
October 19, 2026 18:55
b42011f to
bd034f9
Compare
fernandezcuesta
force-pushed
the
pcu-cleaner-sql
branch
from
October 28, 2026 08:10
d7928a7 to
42f4310
Compare
The scheme registers three ProviderConfigUsage types per scope, so crossplane-runtime cannot pick one and falls back to a no-op cleaner, leaving ProviderConfig deletion protection disabled. Pass each reconciler's own tracker explicitly. Fixes #481 Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
Signed-off-by: Jesús Fernández <7312236+fernandezcuesta@users.noreply.github.com>
fernandezcuesta
force-pushed
the
pcu-cleaner-sql
branch
from
October 30, 2026 07:21
42f4310 to
8b2737a
Compare
|
Tested this on a local cluster against v0.15.0, using the namespace-deletion case from #481 / crossplane/crossplane#4661. Setup: k3s v1.35 (colima), Postgres 17 in-cluster, namespaced
No panics or errors in the provider log on #482. Looks good from our side. |
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 of your changes
Since crossplane/crossplane-runtime#1113, the managed reconciler only protects ProviderConfigUsages when the scheme registers exactly one usage type per scope. provider-sql registers three per scope (mssql, mysql, postgresql), so every reconciler would silently get a no-op cleaner. This PR passes each reconciler's existing tracker through
managed.WithProviderConfigUsageCleaner(t)in all 24 controllers.This is stacked on #463, which brings in the runtime version with #1113. The new option does not exist before that version. Merge #463 first; this PR's base will then switch to
master.Fixes #481
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
go build ./...,go vet ./pkg/controller/...andgo test ./pkg/controller/...pass. Not yet checked on a cluster that the usage finalizer is added and that ProviderConfig deletion waits for the managed resource.