Skip to content

Commit

Permalink
add support for pg ssl settings to helm
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfcosta committed Dec 3, 2024
1 parent e9da750 commit f52f42d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
4 changes: 2 additions & 2 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: briefer
description: The helm chart for Briefer's open-source version.
type: application
version: 0.1.4
appVersion: '0.1.4'
version: 0.1.5
appVersion: '0.1.5'
12 changes: 12 additions & 0 deletions chart/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ spec:
value: '{{ .Values.api.env.postgresPort }}'
- name: POSTGRES_DATABASE
value: '{{ .Values.api.env.postgresDatabase }}'
- name: POSTGRES_SSL_DISABLED
value: '{{ .Values.api.env.postgresSslDisabled | default "false" }}'
- name: POSTGRES_SSL_REJECT_UNAUTHORIZED
value: '{{ .Values.api.env.postgresSslRejectUnauthorized }}'
- name: POSTGRES_SSL_CA
value: '{{ .Values.api.env.postgresSslCa }}'
resources:
requests:
cpu: 100m
Expand Down Expand Up @@ -117,6 +123,12 @@ spec:
value: '{{ .Values.api.env.postgresConnectionLimit | default "30" }}'
- name: POSTGRES_POOL_TIMEOUT
value: '{{ .Values.api.env.postgresPoolTimeout | default "10" }}'
- name: POSTGRES_SSL_DISABLED
value: '{{ .Values.api.env.postgresSslDisabled | default "false" }}'
- name: POSTGRES_SSL_REJECT_UNAUTHORIZED
value: '{{ .Values.api.env.postgresSslRejectUnauthorized }}'
- name: POSTGRES_SSL_CA
value: '{{ .Values.api.env.postgresSslCa }}'

- name: LOGIN_LINK_EXPIRATION
value: '{{ .Values.api.env.loginLinkExpiration | default "24h" }}'
Expand Down
9 changes: 6 additions & 3 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ai:
image:
repository: docker.io
name: briefercloud/briefer-ai
tag: v0.0.66
tag: v0.0.74
pullPolicy: Always

resources:
Expand Down Expand Up @@ -47,7 +47,7 @@ web:
image:
repository: docker.io
name: briefercloud/briefer-web
tag: v0.0.66
tag: v0.0.74
pullPolicy: Always

# optional
Expand Down Expand Up @@ -81,7 +81,7 @@ api:
image:
repository: docker.io
name: briefercloud/briefer-api
tag: v0.0.66
tag: v0.0.74
pullPolicy: Always

resources:
Expand All @@ -106,6 +106,9 @@ api:
postgresDatabase: briefer
aiApiUrl: http://ai:8080
allowHttp: 'false'
postgresSslDisabled: false
postgresSslRejectUnauthorized: false
postgresSslCa: ''

secrets:
postgresUsername: postgres
Expand Down
4 changes: 4 additions & 0 deletions docs/deployment/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ Briefer accepts the following environment variables to configure the SSL connect
- `POSTGRES_SSL_REJECT_UNAUTHORIZED` (optional): Set this to `true` to reject unauthorized (self-signed) SSL certificates.
- `POSTGRES_SSL_CA`: (optional): The path to the CA certificate file to validate the server certificate.

<Note>
If you're deploying Briefer using our Helm chart, you can set these values in the `values.yaml` file as `api.env.postgresSslDisabled`, `api.env.postgresSslRejectUnauthorized`, and `api.env.postgresSslCa`, respectively.
</Note>

If you're having issues with your Postgres SSL settings, make sure that you've set these environment variables correctly.

By default, Briefer's connection will have the same SSL settings as using `sslmode=prefer` in a Postgres connection string.
Expand Down

0 comments on commit f52f42d

Please sign in to comment.