helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Add cloud sql proxy to admin tools deployment [Issue #263]

Open skyfoxs opened this issue 3 years ago • 9 comments

What was changed

Add Cloud SQL proxy sidecar to the admin tools deployment.

Why?

To make Cloud SQL proxy available to the admin tools pod. So we can use the temporal-cassandra-tool and temporal-sql-tool to connect to the database like the others deployed by server-deployment.yaml and don't have to build it on our machine.

Checklist

  1. Closes Close #263

  2. How was this tested: Set up and install with sidecar containers as usual. Then shell into admin-tools and connect database with temporal-sql-tool.

  3. Any docs updates needed? No

skyfoxs avatar Jan 21 '22 14:01 skyfoxs

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 21 '22 14:01 CLAassistant

@skyfoxs thanks for the PR! Could you link it to an existing issue, or open a new one so it can be tracked? Thanks!

tsurdilo avatar Jan 26 '22 14:01 tsurdilo

@tsurdilo done

skyfoxs avatar Jan 26 '22 15:01 skyfoxs

This looks good to me. @underrun can you please also take a look? Thanks!

tsurdilo avatar Jan 26 '22 15:01 tsurdilo

Just wanted to point out this sidecar support (regardless of whether cloudsqlproxy is the intent) is already in other temporal service helm charts (https://github.com/temporalio/helm-charts/pull/107). Maybe that'll help merge it in :)

mnichols avatar Feb 07 '22 01:02 mnichols

Any chance we can get this merged? I need it myself!

Also the sidecar is needed in the schema-setup jobs, since they require access to cloudsql as well; I'll see about adding that and making a PR for it.

kuzmik avatar Jul 26 '23 13:07 kuzmik

Any update on this and did you get around to making PR for the changes @kuzmik ?

peter-c-larsson avatar Aug 30 '23 10:08 peter-c-larsson

Any update on this and did you get around to making PR for the changes @kuzmik ?

We worked around it by adding extra sidecars in the jsonnet (we use argo to manage k8s deployments, and the jsonnet repo loads helm charts and adapts them via code).

Originally I had adapted this PR to include the sidecars https://github.com/temporalio/helm-charts/pull/259/files; but since we generally prefer not to modify the helm charts in our repo if we can avoid it, I converted it to the sonnet stuff.

local k = import 'ksonnet-util/kausal.libsonnet';

(import './config.libsonnet')
+ {
  local c = $._config.temporal,
  local deployment = k.apps.v1.deployment,

  temporal+: {
    deployment_temporal_admintools+:
      deployment.spec.template.spec.withContainersMixin(c.containerCSP)
      + deployment.spec.withMinReadySeconds(10)
      + c.mysqlCSISecretMount,

for example.

kuzmik avatar Aug 30 '23 15:08 kuzmik