Skip to content

Commit

Permalink
Merge pull request #123 from sinto-aot/forms-flow-analytics-update
Browse files Browse the repository at this point in the history
Updated ENV variables and database configurations in Forms-flow-analy…
  • Loading branch information
kiran-aot authored Nov 7, 2024
2 parents 6c848e1 + eeac284 commit a93cb32
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
19 changes: 18 additions & 1 deletion charts/forms-flow-analytics/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ Create a default fully qualified scheduler name.
Create a default fully qualified postgresql name.
*/}}
{{- define "redash.postgresql.fullname" -}}
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
{{- if .Values.postgresql.enabled -}}
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s" .Values.postgresql.fullnameOverride -}}
{{- end -}}
{{- end -}}

{{/*
Expand Down Expand Up @@ -84,6 +88,19 @@ Shared environment block used across each component.
{{- else }}
value: {{ default "" .Values.externalPostgreSQL | quote }}
{{- end }}
- name: REDASH_DATABASE_USER
value: {{ .Values.postgresql.auth.username | quote }}
- name: REDASH_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}
key: redashDatabasePassword
- name: REDASH_DATABASE_HOSTNAME
value: {{ include "redash.postgresql.fullname" . }}
- name: REDASH_DATABASE_PORT
value: {{ .Values.postgresql.primary.service.ports.postgresql | quote }}
- name: REDASH_DATABASE_NAME
value: {{ .Values.postgresql.auth.database | quote }}
{{- end }}
{{- else -}}
- name: REDASH_DATABASE_USER
Expand Down
1 change: 1 addition & 0 deletions charts/forms-flow-analytics/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ data:
{{- $null := required "A value for one of the following variables is required: redash.cookieSecret (secure random value), redash.existingSecret (secret name)" (or .Values.redash.cookieSecret .Values.redash.existingSecret) }}
cookieSecret: {{ default "" .Values.redash.cookieSecret | b64enc | quote }}
mailPassword: {{ default "" .Values.redash.mailPassword | b64enc | quote }}
redashDatabasePassword: {{ default "" .Values.postgresql.auth.password | b64enc | quote }}
## End primary Redash configuration
{{- end -}}
9 changes: 5 additions & 4 deletions charts/forms-flow-analytics/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ migrations:
priorityClassName:

# externalPostgreSQL -- External PostgreSQL configuration. To use an external PostgreSQL instead of the automatically deployed postgresql chart: set postgresql.enabled to false then uncomment and configure the externalPostgreSQL connection URL (e.g. postgresql://user:pass@host:5432/database)
externalPostgreSQL: postgresql://postgres:postgres@forms-flow-ai-postgresql-ha-pgpool/forms-flow-analytics
externalPostgreSQL:
# externalPostgreSQLSecret -- Read external PostgreSQL configuration from a secret. This should point at a secret file with a single key which specifies the connection string.
externalPostgreSQLSecret:
{}
Expand All @@ -583,6 +583,7 @@ externalPostgreSQLSecret:
postgresql:
# postgresql.enabled -- Whether to deploy a PostgreSQL server to satisfy the applications database requirements. To use an external PostgreSQL set this to false and configure the externalPostgreSQL parameter.
enabled: false
fullnameOverride: "forms-flow-ai-postgresql-ha-pgpool"
primary:
service:
ports:
Expand All @@ -592,11 +593,11 @@ postgresql:

auth:
# postgresql.auth.username -- PostgreSQL username for redash user (when postgresql chart enabled)
username: redash
username: postgres
# postgresql.auth.password -- REQUIRED: PostgreSQL password for redash user (when postgresql chart enabled)
password:
password: postgres
# postgresql.auth.database -- PostgreSQL database name (when postgresql chart enabled)
database: redash
database: forms-flow-analytics

# externalRedis -- External Redis configuration. To use an external Redis instead of the automatically deployed redis chart: set redis.enabled to false then uncomment and configure the externalRedis connection URL (e.g. redis://user:pass@host:6379/database).
externalRedis: redis://redis-exporter:6379/0
Expand Down

0 comments on commit a93cb32

Please sign in to comment.