provider-sql icon indicating copy to clipboard operation
provider-sql copied to clipboard

Adds support for DefaultPrivileges in postgres

Open xocasdashdash opened this issue 1 year ago • 4 comments

Description of your changes

Adds support to DefaultPrivileges for postgres. Fixes #117

I have:

  • [x] Read and followed Crossplane's contribution process.
  • [x] 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 avatar Oct 27 '24 08:10 xocasdashdash

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 avatar Oct 27 '24 15:10 xocasdashdash

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

ChrisJBurns avatar Jan 28 '25 14:01 ChrisJBurns

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

benjaminlefevre avatar Oct 06 '25 08:10 benjaminlefevre

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

xocasdashdash avatar Oct 07 '25 07:10 xocasdashdash