[bitnami/redmine] fix port number setting for postgresql (#7236)

This commit is contained in:
Pablo Galego
2021-08-17 11:27:06 +02:00
committed by GitHub
parent 5690444a39
commit 2eaee0e4b6
4 changed files with 21 additions and 6 deletions

View File

@@ -36,4 +36,4 @@ name: redmine
sources:
- https://github.com/bitnami/bitnami-docker-redmine
- http://www.redmine.org/
version: 17.0.2
version: 17.0.3

View File

@@ -57,8 +57,12 @@ You have 4 alternatives:
echo Username: $REDMINE_USERNAME
echo Password: $REDMINE_PASSWORD
You can access the DB using the following password:
{{ include "common.utils.secret.getvalue" (dict "secret" $dbSecretName "field" "mariadb-password" "context" $) }}
You can access the DB using the following password:
{{- if eq .Values.databaseType "mariadb" }}
{{ include "common.utils.secret.getvalue" (dict "secret" $dbSecretName "field" "mariadb-password" "context" $) }}
{{- else if eq .Values.databaseType "postgresql" }}
{{ include "common.utils.secret.getvalue" (dict "secret" $dbSecretName "field" "postgresql-password" "context" $) }}
{{ end }}
{{- end }}
{{- include "common.warnings.rollingTag" .Values.image }}

View File

@@ -105,6 +105,19 @@ Return the database host for Redmine
{{- end -}}
{{- end -}}
{{/*
Return the database port for Redmine
*/}}
{{- define "redmine.database.port" -}}
{{- if and (eq .Values.databaseType "mariadb") (.Values.mariadb.enabled) -}}
{{- printf "3306" -}}
{{- else if and (eq .Values.databaseType "postgresql") (.Values.postgresql.enabled) -}}
{{- printf "5432" -}}
{{- else }}
{{- .Values.externalDatabase.port }}
{{- end -}}
{{- end -}}
{{/*
Return the database name for Redmine
*/}}

View File

@@ -121,10 +121,8 @@ spec:
{{- else }}
key: postgresql-password
{{- end }}
{{- if (include "redmine.useExternalDB" .) }}
- name: REDMINE_DATABASE_PORT_NUMBER
value: {{ .Values.externalDatabase.port | quote }}
{{- end }}
value: {{ include "redmine.database.port" . | quote }}
- name: REDMINE_USERNAME
value: {{ default "" .Values.redmineUsername | quote }}
- name: REDMINE_PASSWORD