Skip to content

Commit

Permalink
apply self managed credentials for external db and cache only
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Apr 12, 2024
1 parent abe36a0 commit 03defd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/redash/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: redash
version: 3.1.0-alpha2
version: 3.1.0-alpha3
appVersion: 24.04.0-dev-b8665145752.21
description: Redash is an open source tool built for teams to query, visualize and collaborate.
keywords:
Expand Down
6 changes: 4 additions & 2 deletions charts/redash/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,16 @@ Get the secret name.
Shared environment block used across each component.
*/}}
{{- define "redash.env" -}}
{{- if not .Values.redash.selfManagedSecrets -}}
{{- if not .Values.postgresql.enabled -}}
{{- if not .Values.redash.selfManagedSecrets -}}
- name: REDASH_DATABASE_URL
{{- if .Values.externalPostgreSQLSecret }}
valueFrom:
secretKeyRef: {{ .Values.externalPostgreSQLSecret | toYaml | nindent 6 }}
{{- else }}
value: {{ default "" .Values.externalPostgreSQL | quote }}
{{- end }}
{{- end }}
{{- else -}}
- name: REDASH_DATABASE_USER
value: {{ .Values.postgresql.auth.username | quote }}
Expand All @@ -100,13 +101,15 @@ Shared environment block used across each component.
value: {{ .Values.postgresql.auth.database | quote }}
{{- end -}}
{{- if not .Values.redis.enabled }}
{{- if not .Values.redash.selfManagedSecrets -}}
- name: REDASH_REDIS_URL
{{- if .Values.externalRedisSecret }}
valueFrom:
secretKeyRef: {{ .Values.externalRedisSecret | toYaml | nindent 6 }}
{{- else }}
value: {{ default "" .Values.externalRedis | quote }}
{{- end }}
{{- end }}
{{- else }}
- name: REDASH_REDIS_PASSWORD
valueFrom:
Expand All @@ -124,7 +127,6 @@ Shared environment block used across each component.
- name: REDASH_REDIS_NAME
value: {{ .Values.redis.database | quote }}
{{ end -}}
{{- end -}}
{{ range $key, $value := .Values.env -}}
- name: {{ $key | quote }}
value: {{ $value | quote }}
Expand Down

0 comments on commit 03defd8

Please sign in to comment.