temporalio / helm-charts

Temporal Helm charts
MIT License
294 stars 321 forks source link

Configure SQL TLS environment variables in server-job #411

Closed grzegorz8 closed 2 months ago

grzegorz8 commented 1 year ago

What was changed

Added support for SQL_TLS* properties in schema jobs (server-job.yaml).

Why?

Currently, when PostgreSQL database is secured with TLS, schema jobs are not properly configured.

In the Pull Request we reuse server.config.persistence.*.sql.tls, server.config.additionalVolumes and server.config.additionalVolumeMounts properties..

Checklist

  1. Closes No related issues.

  2. How was this tested:

  3. Any docs updates needed?

    No updates needed.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

LukaGiorgadze commented 12 months ago

@grzegorz8 May I ask you - what does it mean "schema jobs are not properly configured"?

grzegorz8 commented 11 months ago

@grzegorz8 May I ask you - what does it mean "schema jobs are not properly configured"?

I meant that TLS related env variables are not set (SQL_TLS_KEY_FILE, SQL_TLS_CERT_FILE, etc).

arkoc commented 10 months ago

SQL_TLS=true is required option for connecting to Azure Postgres Flexible Servers. Probably it is required for other 'serverless' managed databases, but we only tested on Azure.

This is the error we recieved (without SQL_TLS)

2023-10-03T12:34:11.898Z    ERROR   Unable to create SQL database.  {"error": "unable to connect to DB, tried default DB names: postgres,defaultdb, errors: [pq: no pg_hba.conf entry for host \"XX.XX.XX.XX\", user \"admin\", database \"postgres\", no encryption pq: no pg_hba.conf entry for host \"XX.XX.XX.XX\", user \"admin\", database \"defaultdb\", no encryption]", "logging-call-at": "handler.go:94"}
debugger24 commented 10 months ago

Hi @grzegorz8 any update on this PR ?

syugoman-armenotech commented 6 months ago

Hi everyone! Any updates for this PR?

syugoman-armenotech commented 6 months ago

@grzegorz8 Hi! Can you please update an example? It will be helpful https://github.com/temporalio/helm-charts/blob/master/charts/temporal/values/values.postgresql.yaml

grzegorz8 commented 6 months ago

@grzegorz8 Hi! Can you please update an example? It will be helpful https://github.com/temporalio/helm-charts/blob/master/charts/temporal/values/values.postgresql.yaml

Example updated. Please check if it looks fine.

ChristianGottinger commented 5 months ago

Tested the Branch with Azure MySql with TLS enabled. Works.

devinargenta commented 4 months ago

Hello! Wanted to bump this as it would be useful for us. Thank you!

moss2k13 commented 3 months ago

can someone clarify the status of this PR?

we are using these changes without issues with postgresql versions 15.x

robholland commented 2 months ago

Looks good, one tiny tweak.

robholland commented 2 months ago

Thanks for your contribution :) For future reference, when you've attended to feedback in PR, if you can re-request review from the reviewer, it helps us spot when something is ready for us to look at again.