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

PWX-37844 : Restarting portworx pods when vsphere secret is changed #1592

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

svijaykumar-px
Copy link
Contributor

@svijaykumar-px svijaykumar-px commented Jun 27, 2024

What this PR does / why we need it: Currently when wrong vsphere secret values are used, px fails to come up. But if the secret is updated, px still fails to come up as the old env variables are still mounted on the container. Solution is to restart all px pods when secret is changed. In the PR, operator keeps comparing the resource versions of the vsphere secret and when it changes, triggers the restart of px pods.

Which issue(s) this PR fixes (optional)
Closes # PWX-37844

Special notes for your reviewer: Everytime operator restarts, the older resource version becomes nil and the operator might assume the resource version has changed. To tackle this, the value of secret is first fetched when the operator is initialised. However there is an edge case where operator is restarting and secret gets updated then. Since operator takes 1second to restart this is a very rare occurance.

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 21.42857% with 22 lines in your changes missing coverage. Please review.

Project coverage is 76.05%. Comparing base (6e9336f) to head (8ca91e8).
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
pkg/controller/storagecluster/storagecluster.go 26.08% 14 Missing and 3 partials ⚠️
pkg/controller/storagecluster/update.go 0.00% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1592      +/-   ##
==========================================
+ Coverage   75.97%   76.05%   +0.08%     
==========================================
  Files          77       77              
  Lines       20600    20730     +130     
==========================================
+ Hits        15650    15766     +116     
- Misses       3853     3869      +16     
+ Partials     1097     1095       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@svijaykumar-px svijaykumar-px requested a review from a team June 27, 2024 07:12
Copy link

github-actions bot commented Jul 1, 2024

This PR is stale because it has been in review for 3 days with no activity.

Copy link

This PR is stale because it has been open for 90 days with no activity. Update this PR or it will be automatically closed in 30 days.

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

Successfully merging this pull request may close these issues.

1 participant