Skip to content

Comments

Added SQL cloud proxy support guide for postgres dependent services#235

Open
priyadarshini-ni wants to merge 12 commits intoni:mainfrom
priyadarshini-ni:users/priya/cloud-sql-auth-proxy
Open

Added SQL cloud proxy support guide for postgres dependent services#235
priyadarshini-ni wants to merge 12 commits intoni:mainfrom
priyadarshini-ni:users/priya/cloud-sql-auth-proxy

Conversation

@priyadarshini-ni
Copy link
Contributor

@priyadarshini-ni priyadarshini-ni commented Dec 10, 2024

What does this Pull Request accomplish?

The support guide for adding cloud SQL auth proxy container as sidecar has been added to the services which uses postgres namely testmonitor service, dashboardhosts service and dynamic form fields.

Why should this Pull Request be merged?

  1. Updated the systemlink-values.yaml to include the sidecar container support. It doesn't restrict the use to just Cloud SQL auth proxy but allows any container addition as a sidecar along with any volumes needed. This approach is inspired by Grafana where we can use a similar approach to add sidecar containers.
  2. Dashboardhosts uses the parameters 'extraContainers' and 'extraContainerVolumes' instead of 'sidecars' and 'extraVolumes' as only that is supported by the 3rd party Grafana chart.
  3. The support to add annotations to the serviceAccount has also been added. This is required to link the service account with the Google service account which will have the permissions required for Cloud SQL Workload Identity.

What testing has been done?

NA

@SSSantosh18 SSSantosh18 self-requested a review December 10, 2024 14:27
Copy link
Contributor

@SSSantosh18 SSSantosh18 left a comment

Choose a reason for hiding this comment

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

Update the similar changes for other services too

Copy link
Contributor

@SSSantosh18 SSSantosh18 left a comment

Choose a reason for hiding this comment

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

same comments will apply for other services too

Copy link
Contributor

@SSSantosh18 SSSantosh18 left a comment

Choose a reason for hiding this comment

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

remove the unnecessary white space changes if possible

Priyadarshini Piramanayagam added 2 commits December 11, 2024 22:33
Copy link
Collaborator

@prestwick prestwick left a comment

Choose a reason for hiding this comment

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

I would prefer if these changes be in their own dedicated YAML file within the GCP directory of templates once #237 goes in.

Copy link
Collaborator

@prestwick prestwick left a comment

Choose a reason for hiding this comment

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

I need some clarifications of the parameters that need to be supplied (or not) to enable the auth proxy. Essentially I'm looking for understanding to ensure our inline documentation is complete.

## @param sidecars Additional containers to run in the same pod as the Test Monitor Service.
## These should be used for authentication proxy containers, such as the Cloud SQL Auth Proxy.
## ref: https://cloud.google.com/sql/docs/postgres/connect-kubernetes-engine#run_the_in_a_sidecar_pattern
sidecars: []
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are uses required to provide a value here? I cannot tell from the reference GCP docs what value to enter here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intention of exposing the parameters sidecars and extraVolumes is to enable the users to configure an extra container which runs along with the service pod. This could also be a Cloud SQL auth proxy container.

The reference documentation has been updated to point to the GCP supplemental values file as this has more information on how the required Cloud SQL authentication proxy container can be configured.

@priyadarshini-ni
Copy link
Contributor Author

I need some clarifications of the parameters that need to be supplied (or not) to enable the auth proxy. Essentially I'm looking for understanding to ensure our inline documentation is complete.

The PR for GCP supplemental values contains more details on the Cloud SQL auth proxy can be configured. The same file can be referenced in the systemlink-values.yaml file once the PR is merged.

@priyadarshini-ni
Copy link
Contributor Author

I would prefer if these changes be in their own dedicated YAML file within the GCP directory of templates once #237 goes in.

This PR is meant to expose the parameters(sidecards, extraVolumes, extraVolumeMounts and serviceAccount) required to configure sidecar containers for the postgres dependent services.
#237 intends to add CloudSQL auth proxy containers for the postgres services using the above-mentioned parameters. Moving the contents of this PR to a dedicated YAML file might create some duplication. Let us know is we should approach this in any other way.

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.

3 participants