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

Agreement on how to write connection parameters #203

Open
pierluigilenoci opened this issue Nov 28, 2024 · 2 comments
Open

Agreement on how to write connection parameters #203

pierluigilenoci opened this issue Nov 28, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@pierluigilenoci
Copy link

pierluigilenoci commented Nov 28, 2024

There is a "small" issue that makes the UpJet AWS provider unusable in conjunction with the SQL provider.
This is because there is a discrepancy between the way the UpJet provider writes credentials and how the SQL provider reads them.
Could the maintainers of both providers discuss and find a solution to unblock all users who would like to create databases and easily execute queries?
List of issues to help you analyze the problem:

@pierluigilenoci pierluigilenoci added the enhancement New feature or request label Nov 28, 2024
@pierluigilenoci pierluigilenoci changed the title Agreement on how to write missing connection parameters Agreement on how to write connection parameters Nov 28, 2024
@pierluigilenoci
Copy link
Author

The follow-up discussion can also be found here: https://crossplane.slack.com/archives/C01718T2476/p1732801643245679.

@Duologic
Copy link
Member

Duologic commented Nov 28, 2024

Thanks for brining this up @pierluigilenoci

This was also discussed on the linked Slack thread but sharing here for posterity.

I've never seen this as a big issue as it was never a blocker for me, I've been using these through Compositions, which allow me to map address to endpoint.

Like this (ref):

connectionDetails:
    - fromConnectionSecretKey: username
      name: username
    - fromConnectionSecretKey: attribute.password
      name: password
    - fromConnectionSecretKey: address
      name: endpoint
    - fromConnectionSecretKey: port
      name: port

I remember vaguely that the provider for GCP supported the consistent endpoint/port/username/password but that doesn't seem to be the case for the Upjet provider. The secret from provider-upjet-gcp's CloudSQL connectionDetails does not match in any way that could possibly work with provider-sql without rewriting the secret (with a Composition for example).

The 'vanilla' provider-gcp did return the consistent secrets, hence where I remember that from, as well as the 'vanilla' provider-aws. You can see here that provider-aws maps endpoint.address to endpoint: https://github.com/crossplane-contrib/provider-aws/blob/master/pkg/controller/rds/dbinstance/setup.go#L233

So to be very pedantic, this was a regression introduced by provider-upjet-aws. 😇

Again, as also mentioned by someone else on the Slack thread, this can be resolved with a Composition, which would also be required for CloudSQL in provider-upjet-gcp anyways

I don't think the provider-sql should accomodate for each CSP's generated secret, it creates a maintenance burden to follow multiple upstream providers, as well as multiple versions of that provider in case the connection details change upon a breaking change/major version release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants