pravega / pravega-operator

Pravega Kubernetes Operator
Apache License 2.0
41 stars 38 forks source link

Issue 620: Fix for pravega image upgrade failure #621

Closed anishakj closed 2 years ago

anishakj commented 2 years ago

Signed-off-by: anishakj anisha.kj@dell.com

Change log description

Made sure that correct labels are used for selecting pods during upgrade

Purpose of the change

Fixes #620

What the code does

During upgrade process, if the labels are also changed, while listing pods it is looking for pods with updated labels and which results in pods are not getting listed. Corrected the logic for finding labels

In order to fix this we are using a subset of labels that will be present always. labels used in selector are

"app": "pravega-cluster",
"pravega_cluster": pravegaCluster.Name,

How to verify it

Verified that upgrade is working fine even with the change of labels.

codecov-commenter commented 2 years ago

Codecov Report

Merging #621 (21839ba) into master (b7921a0) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #621   +/-   ##
=======================================
  Coverage   82.94%   82.95%           
=======================================
  Files          17       17           
  Lines        4099     4100    +1     
=======================================
+ Hits         3400     3401    +1     
  Misses        565      565           
  Partials      134      134           
Impacted Files Coverage Δ
controllers/upgrade.go 72.91% <100.00%> (+0.06%) :arrow_up:

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 b7921a0...21839ba. Read the comment docs.