Skip to content

Conversation

@xocasdashdash
Copy link

Description of your changes

Adds support to DefaultPrivileges for postgres.
Fixes #117

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

I've been trying to test this locally but i'm really struggling to deploy the provider to a local kind cluster.

It's following the same pattern as the grants, we only care about the creation of the default privileges as the grant/revoke runs in a single transaction.

@xocasdashdash xocasdashdash force-pushed the master branch 2 times, most recently from 271b438 to de33b05 Compare October 27, 2024 08:52
@xocasdashdash
Copy link
Author

Well i manage to get this deployed to kind but it involves

  • run a registry as a service inside the kind cluster
  • running make build
  • using crane to export the package as a docker image:
crane push _output/xpkg/linux_arm64/provider-sql-v0.9.0-19.g4d629ee.dirty.xpkg 0.0.0.0:5001/provider-sql-v0.9.0-19.g4d629ee:latest --insecure
  • pull the image locally:
docker pull 0.0.0.0:5001/provider-sql-v0.9.0-19.g4d629ee:latest
  • retag it matching the crane package:
docker tag 0.0.0.0:5001/provider-sql-v0.9.0-19.g4d629ee:latest registry.crossplane-system.svc.cluster.local:5001/provider-sql-v0.9.0-19.g4d629ee:latest
  • Load it with kind into the cluster:
kind --name local load docker-image registry.crossplane-system.svc.cluster.local:5001/provider-sql-v0.9.0-19.g4d629ee:latest

and then it "just works"

xocasdashdash and others added 17 commits October 27, 2024 23:43
Signed-off-by: Joaquín Fernández Campo <[email protected]>
Signed-off-by: Joaquín Fernández Campo <[email protected]>
Signed-off-by: Joaquín Fernández Campo <[email protected]>
Signed-off-by: Joaquín Fernández Campo <[email protected]>
Signed-off-by: Joaquín Fernández Campo <[email protected]>
Signed-off-by: Joaquín Fernández Campo <[email protected]>
Signed-off-by: Joaquín Fernández Campo <[email protected]>
…ources we can add default privileges

Signed-off-by: Joaquín Fernández Campo <[email protected]>
Signed-off-by: Joaquín Fernández Campo <[email protected]>
Signed-off-by: Joaquín Fernández Campo <[email protected]>
Signed-off-by: Joaquín Fernández Campo <[email protected]>
@ChrisJBurns
Copy link

ChrisJBurns commented Jan 28, 2025

Would really love this to be merged as we also need to alter default privs

@benjaminlefevre
Copy link

Hi, will be the PR one day merged? I also need default privileges.

@xocasdashdash
Copy link
Author

Hi, will be the PR one day merged? I also need default privileges.

I've started looking into this PR, there's been several changes in the apis used and I'm trying to get a fix in place but will take some time

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.

Support DefaultPrivileges

3 participants