-
Notifications
You must be signed in to change notification settings - Fork 32
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
Clean up temporary resources when the original PVC gets deleted #190
Clean up temporary resources when the original PVC gets deleted #190
Conversation
/assign @msau42 |
/assign @pwschuurman |
/assign @sunnylovestiramisu |
/retest |
f321f1f
to
fb1dfec
Compare
onlyComparePVCFinalizers bool | ||
pvcPrime *corev1.PersistentVolumeClaim | ||
// When set to true, only compare mutate feilds | ||
onlyComparePVCPrimeMutateFields bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like these fields are trying to exclude some comparison. I would prefer to exclude something and still use reflect.DeepEqual
, rather than (I think this is something we'd need to do using cmp
, rather than reflect
). This would make the test more resilient.
Can you at least comment on the specific test cases what you want to ignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure,I'll add comments to explain why these flags are used. I have reflect.DeepEqual
for most tests. Only for the test which the object gets updated by the volume populator I have this flag set to true because for some reason reflect.DeepEqual
return false
even if all the fields print out look exactly the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
I noticed that the controller code itself historically does not have too many logs, do we think adding some logs to indicate the process can help debugging? |
I have thought about this, but not sure what would be the best practice, is there any concern of having too many logs? |
We can define a different log level for these logs. For example 4=Debug level verbosity(just an example). |
I agree we should add more logs. The current log coverage is too low, which makes it very hard to debug |
Overall LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Danna and I discussed offline. It looks like existing logic for removing the finalizer doesn't wait for the Pod and PVC' resources to be fully deleted. This may be something we still want to block PVC deletion on.
Open an issue to track this #198 |
dc649de
to
11a322d
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dannawang0221, msau42 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
What this PR does / why we need it:
With the current implementation, volume populator doesn't support PVC deletion during volume population. The finalizer will block deleting. If users want to force delete their PVCs, they need to remove the finalizer and manually clean up the temporary resource created by volume populators. This is hard to maintain and might end up with resource leak if users forget to delete them.
Which issue(s) this PR fixes:
Fixes #178
Special notes for your reviewer:
Does this PR introduce a user-facing change?: