-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
feat: Fix PVC resizing issue and refactor PVC resizing logic #1268
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1268 +/- ##
==========================================
+ Coverage 30.20% 34.66% +4.46%
==========================================
Files 55 54 -1
Lines 6294 5962 -332
==========================================
+ Hits 1901 2067 +166
+ Misses 4200 3711 -489
+ Partials 193 184 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@fengyinqiao Great work. we can make sure that PVC is successfully. |
ok,I will give it a try. |
- Fixed label error: updated PVC selection label from "redis" to "middleware". - Corrected PVC expansion when node-conf persistence is enabled by avoiding hardcoded use of VolumeClaimTemplates[0]. - PVC resizing now filters out the "node-conf" template and targets the correct PVC for Redis RDB data. - Enhanced error handling and added per-PVC update logging for better traceability. Signed-off-by: fengyinqiao <[email protected]>
- todo: Handle scale-out scenario Signed-off-by: fengyinqiao <[email protected]>
Signed-off-by: fengyinqiao <[email protected]>
@shubham-cmyk What is the default storageClass for e2e, the field |
Signed-off-by: fengyinqiao <[email protected]>
@shubham-cmyk @drivebyer @iamabhishek-dubey can anyone help me with the e2e test? |
i don't think this should be caused by the storage class if you are using the kind cluster the storage class is provided by them. I think it should be expandable. |
Your e2e test look perfect to me i think the operator it somehow not able to resize the volume here. |
sure, see logs and the pvcs:
➜ kubectl -n ot-operators get pvc -w | grep redis-cluster-v7
node-conf-redis-cluster-v7-follower-0 Bound d-uf6ilczhgpczuvud8vxr 40Gi RWO alicloud-disk-essd-pl0 7d19h
node-conf-redis-cluster-v7-follower-1 Bound d-uf623hbv2xfwltcoocz3 40Gi RWO alicloud-disk-essd-pl0 7d19h
node-conf-redis-cluster-v7-follower-2 Bound d-uf6cue68hyydrdu4itmb 40Gi RWO alicloud-disk-essd-pl0 7d19h
node-conf-redis-cluster-v7-leader-0 Bound d-uf6gnvmvtdgrnc824965 40Gi RWO alicloud-disk-essd-pl0 7d19h
node-conf-redis-cluster-v7-leader-1 Bound d-uf6gnvmvtdgrnc82496b 40Gi RWO alicloud-disk-essd-pl0 7d19h
node-conf-redis-cluster-v7-leader-2 Bound d-uf6b2pznjf8yx6727616 40Gi RWO alicloud-disk-essd-pl0 7d19h
redis-cluster-v7-follower-redis-cluster-v7-follower-0 Bound d-uf647w15hb4ac0tfcav4 54Gi RWO alicloud-disk-essd-pl0 7d19h
redis-cluster-v7-follower-redis-cluster-v7-follower-1 Bound d-uf63h4h8by86ipv130re 54Gi RWO alicloud-disk-essd-pl0 7d19h
redis-cluster-v7-follower-redis-cluster-v7-follower-2 Bound d-uf6gqbr8mbow2a3far2o 54Gi RWO alicloud-disk-essd-pl0 7d19h
redis-cluster-v7-leader-redis-cluster-v7-leader-0 Bound d-uf62t5jpvumcf47tnmga 54Gi RWO alicloud-disk-essd-pl0 7d19h
redis-cluster-v7-leader-redis-cluster-v7-leader-1 Bound d-uf630at4yg7fd6al4yra 54Gi RWO alicloud-disk-essd-pl0 7d19h
redis-cluster-v7-leader-redis-cluster-v7-leader-2 Bound d-uf6ilczhgpczuvud8vxo 54Gi RWO alicloud-disk-essd-pl0 7d19h |
can you confirm me this with the actual screenshot of the pvc too. that the storage is now 2Gi |
I resize pvc from 40Gi to 54Gi, see the pvcs above |
looks like it did on your local. i have to try on my setup too |
@fengyinqiao I think you are right the default storage class don't have the expansion true here |
Alright...so is there any solution for this problem, otherwise we have to remove the e2e test? |
Signed-off-by: Shubham Gupta <[email protected]>
Signed-off-by: Shubham Gupta <[email protected]>
Signed-off-by: Shubham Gupta <[email protected]>
Signed-off-by: Shubham Gupta <[email protected]>
I tried adding volume expansion field but test are still failing. |
Description
This PR addresses a critical issue where PVC resizing did not take effect when node-conf persistence was enabled. Additionally, the PVC resizing logic has been refactored for improved modularity and reliability. The main changes include:
Label Correction
"redis"
to"middleware"
to ensure the correct PVCs are targeted.VolumeClaimTemplate Handling
VolumeClaimTemplates[0]
, which caused PVC resizing to fail when node-conf persistence was enabled."node-conf"
and selects the appropriate template (for Redis RDB data), ensuring that PVC resizing is applied correctly.Enhanced Logging and Error Handling
These improvements enhance the reliability of the PVC resizing mechanism and increase code maintainability. Please review and let me know if any further adjustments are needed.