Unleash / helm-charts

Contains helm-charts for Unleash
Apache License 2.0
41 stars 56 forks source link

Allow JSON in dbConfig.ssl #102

Closed rgarrigue closed 9 months ago

rgarrigue commented 10 months ago

Describe the feature request

As per Unleash documentation, DATABASE_SSL ain't limited to true or false, can be a JSON with SSL options too. https://docs.getunleash.io/using-unleash/deploy/configuring-unleash#dbssl-vs-database_ssl-options

Using AWS RDS as a database, I need this JSON, because true or false doesn't work. But a JSON string in YAML doesn't work well, so something need to be done

Background

I'm deploying Unleash on AWS EKS. After a POC using postgres subchart, wanted to move to RDS. It was unable to connect to the database. Spent a day troubleshooting, replacing the start command with sleep infinity, exec in the pod, try out stuff to make sure I could connect to the database using psql, adding console.log in unleash server, before realizing

Solution suggestions

To get it to work I had to patch the Helm chart templates/deployment.yaml

            - name: DATABASE_SSL
              value: {{ .Values.dbConfig.ssl | toJson | quote }}

Then I could set my values override

dbConfig:
  host: production-unleash.xyzxyzxyzxyz.eu-north-1.rds.amazonaws.com
  ssl: { "rejectUnauthorized": false }

Works for me. But I don't know if this would work with true / false

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

rgarrigue commented 9 months ago

Still interested by an upstream fix on this one

FredrikOseberg commented 9 months ago

@rgarrigue This flew under the radar. I'll make sure we take a proper look now. Thank you!

EDIT: Looks like we are close to merging. I'll follow up once we do.

FredrikOseberg commented 9 months ago

@rgarrigue This is merged now.

rgarrigue commented 9 months ago

Thanks !