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 a Google Cloud SQL sidecar #297

Merged
merged 6 commits into from
Dec 8, 2024

Conversation

oddeirikigland
Copy link
Contributor

@oddeirikigland oddeirikigland commented Nov 27, 2024

closes #298

@CLAassistant
Copy link

CLAassistant commented Nov 27, 2024

CLA assistant check
All committers have signed the CLA.

@itaiad200
Copy link
Contributor

Hey @oddeirikigland , thank you for your contribution!
Do you mind opening an issue, explaining the motivation behind this change and link the issue to this PR?

@oddeirikigland
Copy link
Contributor Author

Hey @oddeirikigland , thank you for your contribution! Do you mind opening an issue, explaining the motivation behind this change and link the issue to this PR?

Of course, added a short explanation now @itaiad200

Copy link
Contributor

@itaiad200 itaiad200 left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! Looks great. Few comments:

  1. How was this tested?
  2. Notice that the CI tests failed, please fix.
  3. Notice the single comment on the instances attribute.

Please complete the above items, we'd very much like to merge this change 💪

@@ -130,5 +150,7 @@ helm upgrade -f my-values.yaml my-lakefs lakefs/lakefs --set kv_upgrade=true
| `s3Fallback.enabled` | If set to true, an [S3Proxy](https://github.com/gaul/s3proxy) container will be started. Requests to lakeFS S3 gateway with a non-existing repository will be forwarded to this container. | |
| `s3Fallback.aws_access_key` | An AWS access key to be used by the S3Proxy for authentication | |
| `s3Fallback.aws_secret_key` | An AWS secret key to be used by the S3Proxy for authentication | |
| `gcpFallback.enabled` | If set to true, an [GCP Proxy](https://github.com/GoogleCloudPlatform/cloud-sql-proxy) container will be started. | |
| `gcpFallback.instances` | The instances to connect to. | |
Copy link
Contributor

Choose a reason for hiding this comment

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

instances means there could be more than a single value right? How do you expect them to be passed?

Copy link
Contributor Author

@oddeirikigland oddeirikigland Dec 2, 2024

Choose a reason for hiding this comment

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

The proxy supports several instances, that is why. One database instance is enough for this case, so I can change it to instance for simplification.

I've tested it by adding a test file to the ci folder, enabling the gcpFallback with a path to my SQL instance in GCP. Also, I've used this setup for my self-hosted lakefs deployment in GCP.

it would be great to have a charts/lakefs/ci/gcp-fallback-values.yaml, but then an open SQL gcp instance is needed. The config will then look as follows:

gcpFallback:
  enabled: true
  instance: <my_project>:<my_region>:<my_instance>=tcp:5432
serviceAccount:
  name: <my_service_account>

Copy link
Contributor

@itaiad200 itaiad200 left a comment

Choose a reason for hiding this comment

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

LGTM!

@itaiad200 itaiad200 merged commit 2da9caa into treeverse:master Dec 8, 2024
3 checks passed
@oddeirikigland oddeirikigland deleted the gcp-proxy branch December 9, 2024 08:41
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 connection to SQL with proxy inside GKE
3 participants