Skip to content

Conversation

nateinaction
Copy link
Contributor

@nateinaction nateinaction commented Sep 10, 2025

Description of your changes

Resolves #262
More work shown in #263

This PR upgrades provider-sql to crossplane v2 with new namespaced CRs

Added:

  • Namespaced MRs!
  • ClusterProviderConfig for referencing cluster scoped provider configs from namespaced resources

Changed:

  • apis, controllers and examples now have scoped subdirectories as cluster and namespaced
  • handwritten resource resolvers have been replaced with ones generated by angryjet

⚠️ Removed:

  • External Secret Store support is removed from ALL MRs (spec.publishConnectionDetailsTo is removed). This feature was alpha and it was decided to be removed from crossplane.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

E2E tests pass:

make build e2e
...
>>>>>>> waiting for provider pods to be deleted
waiting another 3 seconds

 All integration tests succeeded!

>>>>>>> Cleaning up...
Deleting cluster "build-79293a62-inttests" ...
Deleted nodes: ["build-79293a62-inttests-control-plane"]
15:30:15 [ OK ] integration tests passed

Testing creating MySQL users with the various types of provider configs:

Legacy cluster provider config:

k get user.mysql.sql.crossplane.io
NAME                 READY   SYNCED   AGE
cluster-mysql-user   True    True     7s

Modern cluster and namespaced provider configs:

k get users.mysql.sql.m.crossplane.io
NAME             READY   SYNCED   AGE
cpc-mysql-user   True    True     16s
ns-user          True    True     16s

Signed-off-by: Ty Christensen <[email protected]>
Signed-off-by: Nate Gay <[email protected]>
Copy link
Collaborator

@chlunde chlunde left a comment

Choose a reason for hiding this comment

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

Looks good! I noticed a missing resolved, could you add that and run code generation?

@chlunde
Copy link
Collaborator

chlunde commented Sep 21, 2025

Updates for integration tests with is in this branch: https://github.com/chlunde/provider-sql/commits/crossplane-v2/ (some more cleanup would be nice)

I'm not sure why the pg password doesn't properly reset when running two pg tests.

Feel free to take whatever you want from that branch. Maybe we should test some variants of provider configs too (at least manually).

nateinaction and others added 6 commits September 23, 2025 11:31
Orphan has been replaced with managementPolicies, so remove that

Signed-off-by: Carl Henrik Lunde <[email protected]>
Signed-off-by: Nate Gay <[email protected]>
@chlunde chlunde self-requested a review September 24, 2025 17:24
@chlunde chlunde merged commit 04b82ca into crossplane-contrib:master Sep 24, 2025
7 of 8 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.

Add support for v2 (Namespaced resources)
2 participants