Skip to content

Commit

Permalink
Fix mysql validation error on upgrades
Browse files Browse the repository at this point in the history
Co-authored-by: Jeremy T. Bouse <Jeremy.Bouse@UnderGrid.net>
  • Loading branch information
LeoColomb and jbouse committed Feb 28, 2022
1 parent 75245f3 commit f695149
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
11 changes: 8 additions & 3 deletions charts/yourls/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
version: 4.2.5
version: 4.2.6
name: yourls
description: Your Own URL Shortener
appVersion: "1.8.2"
Expand Down Expand Up @@ -40,5 +40,10 @@ annotations:
fingerprint: 6FCD850E18E4A4FF76DD1184A3A42A61961E423F
url: https://yourls.org/.well-known/openpgpkey/hu/6e4gbtp15q1znf3unweeducn7urty4mr
artifacthub.io/changes: |
- kind: changed
description: Bump dependencies
- kind: fixed
description: Bug fix for MySQL validation
links:
- name: GitHub Issue
url: https://github.com/YOURLS/charts/issues/120
- name: GitHub Pull Request
url: https://github.com/YOURLS/charts/pull/123
13 changes: 6 additions & 7 deletions charts/yourls/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,16 @@ You can access Apache Prometheus metrics following the steps below:
{{- include "common.warnings.rollingTag" .Values.volumePermissions.image }}
{{- $passwordValidationErrors := list -}}
{{- if not .Values.yourls.existingSecret -}}
{{- $secretName := include "yourls.secretName" . -}}
{{- $requiredYOURLSPassword := dict "valueKey" "yourls.password" "secret" $secretName "field" "password" "context" $ -}}
{{- $requiredYOURLSPasswordError := include "common.validations.values.single.empty" $requiredYOURLSPassword -}}
{{- $passwordValidationErrors = append $passwordValidationErrors $requiredYOURLSPasswordError -}}
{{- $yourlsSecretName := include "yourls.secretName" . -}}
{{- $yourlsPassword := dict "valueKey" "yourls.password" "secret" $yourlsSecretName "field" "password" "context" $ -}}
{{- $yourlsPasswordValidationErrors := include "common.validations.values.single.empty" $yourlsPassword -}}
{{- $passwordValidationErrors = append $passwordValidationErrors $yourlsPasswordValidationErrors -}}
{{- end }}
{{- if .Values.mysql.enabled }}
{{- $mysqlSecretName := include "yourls.databaseSecretName" . -}}
{{- $mysqlPasswordValidationErrors := "OK" -}}
{{/* TODO: Validate MySQL
{{- $mysqlSecretName := include "yourls.databaseSecretName" . -}}
{{- $mysqlPasswordValidationErrors := include "common.validations.values.mariadb.passwords" (dict "secret" $mysqlSecretName "subchart" true "context" $) -}}
*/}}
{{- $passwordValidationErrors = append $passwordValidationErrors $mysqlPasswordValidationErrors -}}
*/}}
{{- end }}
{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $) -}}

0 comments on commit f695149

Please sign in to comment.