[bitnami/argo-workflows] Check passwords in upgrade (#7828)

* [bitnami/argo-workflows] Check passwords in upgrade

Signed-off-by: Miguel A. Cabrera Minagorri <mcabrera@vmware.com>

* Add existingSecret check

Signed-off-by: Miguel A. Cabrera Minagorri <mcabrera@vmware.com>
This commit is contained in:
Miguel Ángel Cabrera Miñagorri
2021-10-20 10:01:09 +02:00
committed by GitHub
parent 225f24fbe8
commit 795b01c59a
2 changed files with 17 additions and 0 deletions

View File

@@ -42,6 +42,19 @@ Obtain the Argo Workflows access token:
{{- end }}
{{- if .Release.IsUpgrade -}}
{{- $passwordValidationErrors := list -}}
{{- if and .Values.postgresql.enabled (not .Values.postgresql.postgresqlPassword) -}}
{{- $passwordValidationErrors = append $passwordValidationErrors "Missing 'postgresql.password', please use the same than the current one" -}}
{{- end -}}
{{- if and .Values.mysql.enabled (not .Values.mysql.auth.password) -}}
{{- $passwordValidationErrors = append $passwordValidationErrors "Missing 'mysql.auth.password', please use the same than the current one" -}}
{{- end -}}
{{- if and .Values.externalDatabase.enabled (not .Values.externalDatabase.password) (not .Values.externalDatabase.existingSecret) -}}
{{- $passwordValidationErrors = append $passwordValidationErrors "Missing 'externalDatabase.password', please use the same than the current one" -}}
{{- end -}}
{{- end -}}
{{- include "common.warnings.rollingTag" .Values.server.image }}
{{- include "common.warnings.rollingTag" .Values.controller.image }}
{{- include "common.warnings.rollingTag" .Values.executor.image }}

View File

@@ -1089,6 +1089,7 @@ workflows:
## @param postgresql.service.port PostgreSQL port
## @param postgresql.postgresqlUsername PostgreSQL username
## @param postgresql.postgresqlDatabase PortgreSQL database name
## @param postgresql.postgresqlPassword PortgreSQL database password
##
postgresql:
enabled: true
@@ -1096,6 +1097,7 @@ postgresql:
port: 5432
postgresqlUsername: postgres
postgresqlDatabase: bn_argo_workflows
postgresqlPassword: ""
## @section MySQL subchart
@@ -1104,6 +1106,7 @@ postgresql:
## @param mysql.service.port MySQL port
## @param mysql.auth.username MySQL username
## @param mysql.auth.database MySQL database name
## @param mysql.auth.password MySQL database password
##
mysql:
enabled: false
@@ -1112,6 +1115,7 @@ mysql:
auth:
username: mysql
database: bn_argo_workflows
password: ""
## @section External Database configuration