Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for DefaultPrivileges in postgres #199

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

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]>
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
1 participant