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

Issue 445: Reuse values for helm releases in post-upgrade script #446

Merged
merged 2 commits into from
Sep 4, 2020

Conversation

SrishT
Copy link
Contributor

@SrishT SrishT commented Aug 28, 2020

Signed-off-by: SrishT [email protected]

Change log description

After upgrading the pravega operator from 0.4.5 to 0.5.1 via helm, the post-upgrade script which is used to upgrade the corresponding pravega release, does not reuse the values of its parameters from the existing setup. Instead, all these parameters are reset to their default values that have been specified in the new helm charts, which is undesirable.

Purpose of the change

Fixes #445

What the code does

  • Accepts the bookkeeper replica count as an additional parameter in the post-upgrade script.
  • Uses the reuse-values option while upgrading the pravega helm chart in order to preserve the properties that were set at the time of initial installation.

How to verify it

After the operator upgrade completes, run the post-upgrade script in the following way

$ ./post-upgrade.sh <name of pravega cluster> <pravega release name> <bookkeeper release name> <version of pravega cluster> <namespace> <zookeeper svc name> <bookkeeper replica count>

After this script executes successfully, the pravega release and the newly created bookkeeper release will be created, while retaining their previous configuration.

@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2020

Codecov Report

Merging #446 into master will increase coverage by 0.36%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #446      +/-   ##
==========================================
+ Coverage   76.11%   76.48%   +0.36%     
==========================================
  Files          14       15       +1     
  Lines        3320     3427     +107     
==========================================
+ Hits         2527     2621      +94     
- Misses        705      712       +7     
- Partials       88       94       +6     
Impacted Files Coverage Δ
pkg/apis/pravega/v1beta1/pravega.go 97.53% <ø> (ø)
pkg/util/zookeeper_util.go 11.90% <11.90%> (ø)
pkg/apis/pravega/v1beta1/pravegacluster_types.go 24.92% <63.46%> (+9.88%) ⬆️
...roller/pravegacluster/pravegacluster_controller.go 62.88% <65.21%> (+0.67%) ⬆️
pkg/controller/pravega/pravega_controller.go 100.00% <100.00%> (ø)
pkg/controller/pravega/pravega_segmentstore.go 100.00% <100.00%> (ø)
pkg/util/pravegacluster.go 97.45% <100.00%> (-0.07%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7662f09...40720fc. Read the comment docs.

@SrishT SrishT requested a review from anishakj August 31, 2020 02:43
@SrishT SrishT marked this pull request as ready for review August 31, 2020 02:43
@SrishT SrishT requested a review from Prabhaker24 September 2, 2020 05:50
Copy link
Contributor

@anishakj anishakj left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Prabhaker24 Prabhaker24 left a comment

Choose a reason for hiding this comment

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

LGTM

@anishakj anishakj merged commit d0e2f64 into master Sep 4, 2020
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.

Post-upgrade script does not reuse the existing values for helm releases
4 participants