Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/postgresql-ha] Passwords on .Values.global are ignored during validation #31253

Open
yukha-dw opened this issue Jan 8, 2025 · 1 comment
Assignees
Labels
postgresql-ha tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@yukha-dw
Copy link
Contributor

yukha-dw commented Jan 8, 2025

Name and Version

bitnami/postgresql-ha 15.1.4

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. Deploy PostgreSQL HA
  2. Reconfigure credentials on .Values.global
  3. Run helm upgrade

Are you using any custom parameters or values?

global:
  postgresql:
    password: "userPassword"
    repmgrPassword: "repmgrPassword"
  pgpool:
    adminPassword: "adminPassword"
postgresql:
  postgresPassword: "postgresPassword"

What is the expected behavior?

Chart will consider .Values.global when validating values

What do you see instead?

Helm throws PASSWORDS ERROR instead

Error: execution error at (postgresql-ha/templates/NOTES.txt:115:4):
PASSWORDS ERROR: You must provide your current passwords when upgrading the release.
                 Note that even after reinstallation, old credentials may be needed as they may be kept in persistent volume claims.
                 Further information can be obtained at https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues/#credential-errors-while-upgrading-chart-releases

    'postgresql.password' must not be empty, please add '--set postgresql.password=$PASSWORD' to the command. To get the current value:

        export PASSWORD=$(kubectl get secret --namespace "postgres" postgres-postgresql-ha-postgresql -o jsonpath="{.data.password}" | base64 -d)

    'postgresql.repmgrPassword' must not be empty, please add '--set postgresql.repmgrPassword=$REPMGR_PASSWORD' to the command. To get the current value:

        export REPMGR_PASSWORD=$(kubectl get secret --namespace "postgres" postgres-postgresql-ha-postgresql -o jsonpath="{.data.repmgr-password}" | base64 -d)

    'pgpool.adminPassword' must not be empty, please add '--set pgpool.adminPassword=$ADMIN_PASSWORD' to the command. To get the current value:

        export ADMIN_PASSWORD=$(kubectl get secret --namespace "postgres" postgres-postgresql-ha-pgpool -o jsonpath="{.data.admin-password}" | base64 -d)

Related scripts:

{{- $passwordValidationErrors := list -}}
{{- $requiredPasswords := list -}}
{{- if not (include "postgresql-ha.postgresql.existingSecretProvided" . ) }}
{{- $secretName := include "postgresql-ha.postgresqlSecretName" . -}}
{{- $requiredPostgresqlPassword := dict "valueKey" "postgresql.password" "secret" $secretName "field" "password" "context" $ -}}
{{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlPassword -}}
{{- $requiredRepmgrPassword := dict "valueKey" "postgresql.repmgrPassword" "secret" $secretName "field" "repmgr-password" "context" $ -}}
{{- $requiredPasswords = append $requiredPasswords $requiredRepmgrPassword -}}
{{- end }}
{{- if not (include "postgresql-ha.pgpool.existingSecretProvided" . ) }}
{{- $secretName := include "postgresql-ha.pgpoolSecretName" . -}}
{{- $requiredPgpoolPassword := dict "valueKey" "pgpool.adminPassword" "secret" $secretName "field" "admin-password" "context" $ -}}
{{- $requiredPasswords = append $requiredPasswords $requiredPgpoolPassword -}}
{{- end }}
{{- $passwordValidationErrors = include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .) -}}

Additional information

No response

@yukha-dw yukha-dw added the tech-issues The user has a technical issue about an application label Jan 8, 2025
@github-actions github-actions bot added the triage Triage is needed label Jan 8, 2025
@carrodher carrodher changed the title [bitnami/postgresql-ha] Passwords on .Values.global are ignored during validation [bitnami/postgresql-ha] Passwords on .Values.global are ignored during validation Jan 8, 2025
@carrodher
Copy link
Member

Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postgresql-ha tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants