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/wordpress] Non-manual chart upgrades #9271

Merged
merged 2 commits into from
Mar 14, 2022
Merged

[bitnami/wordpress] Non-manual chart upgrades #9271

merged 2 commits into from
Mar 14, 2022

Conversation

mamiu
Copy link
Contributor

@mamiu mamiu commented Mar 2, 2022

Description of the change

IMPORTANT: Only merge this PR once #9268 is merged.

Automatically get the correct wordpress password on wordpress chart upgrade.

Currently the following error message is shown when a user wants to upgrade the [bitnami/wordpress] helm chart without having specified an existingSecret or the wordpressPassword, mariadb.auth.password and mariadb.auth.rootPassword value:

Error: UPGRADE FAILED: template: wordpress/templates/NOTES.txt:108:4: executing "wordpress/templates/NOTES.txt" at <include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $)>:
error calling include: template: wordpress/charts/common/templates/_errors.tpl:21:48: executing "common.errors.upgrade.passwords.empty" at <fail>: error calling fail: HELM_ERR_START

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

    'mariadb.auth.rootPassword' must not be empty, please add '--set mariadb.auth.rootPassword=$MARIADB_ROOT_PASSWORD' to the command. To get the current value:

        export MARIADB_ROOT_PASSWORD=$(kubectl get secret --namespace "the-wp-namespace" wordpress-test-mariadb-prod -o jsonpath="{.data.mariadb-root-password}" | base64 --decode)

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

        export MARIADB_PASSWORD=$(kubectl get secret --namespace "the-wp-namespace" wordpress-test-mariadb-prod -o jsonpath="{.data.mariadb-password}" | base64 --decode)

Benefits

The upgrade won't fail and the user doesn't have to retrieve and specify the secrets manually.
This change allows the user to upgrade the chart without worrying.

Possible drawbacks

None.

Applicable issues

Checklist

Automatically get the correct wordpress password on wordpress chart upgrade.

Signed-off-by: Paul Miu <miu.manu@gmx.de>
@mamiu mamiu temporarily deployed to vmware-image-builder March 2, 2022 17:00 Inactive
@mamiu mamiu temporarily deployed to vmware-image-builder March 2, 2022 17:00 Inactive
@mamiu mamiu temporarily deployed to vmware-image-builder March 2, 2022 17:00 Inactive
@marcosbc
Copy link
Contributor

marcosbc commented Mar 3, 2022

Thanks for the PR @mamiu, since it is going to be hard for us to keep track of this PR after #9268 is merged, let us know to merge this PR.

@mamiu
Copy link
Contributor Author

mamiu commented Mar 4, 2022

@marcosbc Sure thing, no worries! I'll let you know once #9268 is merged.

@mamiu
Copy link
Contributor Author

mamiu commented Mar 8, 2022

@marcosbc PR #9268 is merged now. So this one is ready to be reviewed.

@marcosbc
Copy link
Contributor

Thanks @mamiu! Could you fix the conflicts with the master branch? Apart from that, it LGTM!

@mamiu mamiu temporarily deployed to vmware-image-builder March 13, 2022 08:08 Inactive
@mamiu mamiu temporarily deployed to vmware-image-builder March 13, 2022 08:08 Inactive
@mamiu mamiu temporarily deployed to vmware-image-builder March 13, 2022 08:08 Inactive
@mamiu
Copy link
Contributor Author

mamiu commented Mar 13, 2022

@marcosbc Thanks for the review! The conflicts are resolved now.

Copy link
Contributor

@marcosbc marcosbc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants