[stable/redmine] Add option to use existingSecret for external db (#19007)

* [stable/redmine] option use existingSecret for external db

Signed-off-by: Carlos Roberto Marques Junior <carlos.marques@bndes.gov.br>

* bumping version

Signed-off-by: Carlos Roberto Marques Junior <carlos.marques@bndes.gov.br>

* [stable/redmine] option to use externalDatabase from existingSecret

Signed-off-by: Carlos Roberto Marques Junior <carlos.marques@bndes.gov.br>

* removing old info

Signed-off-by: Carlos Roberto Marques Junior <carlos.marques@bndes.gov.br>

* [redmine/stable] using correct secret key

Signed-off-by: Carlos Roberto Marques Junior <carlos.marques@bndes.gov.br>

* [stable/redmine] better handling of externalDatabase.password

Signed-off-by: Carlos Roberto Marques Junior <carlos.marques@bndes.gov.br>

* [stable/redmine] bumping version

Signed-off-by: Carlos Roberto Marques Junior <carlos.marques@bndes.gov.br>
This commit is contained in:
Carlos Roberto Marques Junior
2019-12-04 05:42:57 -08:00
committed by Kubernetes Prow Robot
parent 8158110edc
commit 4ffec807dc
6 changed files with 18 additions and 24 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: redmine
version: 13.6.0
version: 13.7.0
appVersion: 4.0.5
description: A flexible project management web application.
keywords:
+2 -1
View File
@@ -79,7 +79,8 @@ The following table lists the configurable parameters of the Redmine chart and t
| `smtpUser` | SMTP user | `nil` |
| `smtpPassword` | SMTP password | `nil` |
| `smtpTls` | Use TLS encryption with SMTP | `nil` |
| `existingSecret` | Use existing secret for password details (`smtpPassword` and `redminePassword` will be ignored and picked up from this secret). The secret has to contain the keys `redmine-password` and `smtp-password`. | `nil` |
| `existingSecret` | Use existing secret for password details (`redminePassword`, `smtpPassword` and `externalDatabase.password` will be ignored and picked up from this secret). It must contain the keys `redmine-password` and `smtp-password` when `postgresql.enabled=true` or `mariadb.enabled=true`. In case `postgresql.enabled=false` and `mariadb.enabled=false` it must contain the key `external-db-password`.
| `nil` |
| `databaseType.postgresql` | Select PostgreSQL as database | `false` |
| `databaseType.mariadb` | Select MariaDB as database | `true` |
| `mariadb.enabled` | Whether to deploy a MariaDB server to satisfy the applications database requirements | `true` |
+2 -2
View File
@@ -89,8 +89,8 @@ spec:
- name: REDMINE_DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
key: db-password
name: {{ template "redmine.secretName" . }}
key: external-db-password
- name: REDMINE_DB_PORT_NUMBER
value: {{ .Values.externalDatabase.port | quote }}
{{- end }}
@@ -1,15 +0,0 @@
{{- if or (and .Values.databaseType.mariadb (not .Values.mariadb.enabled)) (and .Values.databaseType.postgresql (not .Values.postgresql.enabled)) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
labels:
app: {{ printf "%s-%s" .Release.Name "externaldb" }}
chart: "{{ template "redmine.chart" . }}"
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
type: Opaque
data:
db-admin-user: {{ .Values.externalDatabase.user | b64enc | quote }}
db-password: {{ .Values.externalDatabase.password | b64enc | quote }}
{{- end }}
+11 -4
View File
@@ -10,10 +10,17 @@ metadata:
heritage: "{{ .Release.Service }}"
type: Opaque
data:
{{ if .Values.redminePassword }}
{{- if .Values.redminePassword }}
redmine-password: {{ default "" .Values.redminePassword | b64enc | quote }}
{{ else }}
{{- else }}
redmine-password: {{ randAlphaNum 10 | b64enc | quote }}
{{ end }}
{{- end }}
smtp-password: {{ default "" .Values.smtpPassword | b64enc | quote }}
{{- end }}
{{- if or (and .Values.databaseType.mariadb (not .Values.mariadb.enabled)) (and .Values.databaseType.postgresql (not .Values.postgresql.enabled)) }}
{{- if .Values.externalDatabase.password }}
external-db-password: {{ default "" .Values.externalDatabase.password | b64enc | quote }}
{{- else }}
external-db-password: {{ randAlphaNum 10 | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
+2 -1
View File
@@ -65,7 +65,8 @@ redmineLanguage: en
# smtpPassword:
# smtpTls:
# # Use existing secret (ignores redminePassword and smtpPassword) with keys "redmine-password" and "smtp-password" defined
## Use an existing secret with keys "redmine-password", "smtp-password" and "external-db-password" defined.
## This ignores redminePassword, smtpPassword and externalDatabase.password
# existingSecret:
## Environment variables, to pass to the entry point