Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flowise: Add ability to connect to PostgreSQL using SSL #592

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattishaden
Copy link

@mattishaden mattishaden commented Mar 4, 2024

Example branch for PostgreSQL SSL support. See linked issue.

@@ -101,6 +101,8 @@ spec:
key: {{ include "flowise.postgresql.secretKeyPassword" . }}
- name: POSTGRESQL_DATABASE
value: {{ include "flowise.postgresql.database" . | quote }}
- name: POSTGRESQL_SSL
value: {{ include "flowise.postgresql.ssl" . | lower }}

Choose a reason for hiding this comment

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

I think you need to add to _helpers.tpl:

{{/*
PostgreSQL ssl
*/}}
{{- define "flowise.postgresql.ssl" -}}
{{- if .Values.postgresql.enabled -}}
    false
{{- else -}}
    {{ .Values.externalPostgresql.ssl }}
{{- end -}}
{{- end -}}

Copy link

Choose a reason for hiding this comment

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

the "enabled = false" value should actually be disable. Or more likely the actual default value in values.yaml should be set to disable instead of false so it's more in line with the actual values postgres expects.

only "require" (default), "verify-full", "verify-ca", and "disable" supported

@@ -86,7 +86,7 @@ spec:
- /bin/sh
- -ec
- |
wait4x postgresql "postgres://${POSTGRESQL_USERNAME}:${POSTGRESQL_PASSWORD}@${POSTGRESQL_HOST}:${POSTGRESQL_PORT}/${POSTGRESQL_DATABASE}?sslmode=disable" --timeout 0
wait4x postgresql "postgres://${POSTGRESQL_USERNAME}:${POSTGRESQL_PASSWORD}@${POSTGRESQL_HOST}:${POSTGRESQL_PORT}/${POSTGRESQL_DATABASE}?sslmode=${POSTGRESQL_SSL}" --timeout 0

Choose a reason for hiding this comment

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

As per https://www.postgresql.org/docs/current/libpq-ssl.html I'm not sure a simple true/false will work here?

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