-
Notifications
You must be signed in to change notification settings - Fork 27
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
Associate VolumeSnapshots with SnapshotSchedules via OwnerReferences #697
Conversation
Signed-off-by: salmon111 <[email protected]>
Signed-off-by: salmon111 <[email protected]>
bf1657e
to
3513f2e
Compare
Hi @JohnStrunk, |
Thank you for taking the initiative to put something together. |
Thank you for letting me know! I completely understand you're busy. |
{{- if .Values.enableOwnerReferences }} | ||
- --enable-owner-references | ||
{{- end }} |
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.
I’ve currently set this up to pass values via command arguments, but I’m thinking of refactoring this to use a ConfigMap instead.
The main reason is that ConfigMaps would allow more flexibility in managing configurations, especially when changes are needed dynamically.
I’d appreciate your feedback on whether this change would align better with best practices or if the current implementation is sufficient.
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.
I'd prefer to keep it as-is. Since we don't have a CM currently, I'd rather not add one.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #697 +/- ##
========================================
+ Coverage 53.3% 55.0% +1.7%
========================================
Files 2 2
Lines 313 325 +12
========================================
+ Hits 167 179 +12
Misses 139 139
Partials 7 7
|
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.
This is a nicely done patch. Thank you!
It just needs the formatting on the README fixed, then it's good to go.
helm/snapscheduler/README.md
Outdated
@@ -156,6 +156,8 @@ case, the defaults, shown below, should be sufficient. | |||
- `manageCRDs`: `true` | |||
- Whether the chart should automatically install, upgrade, or remove the | |||
SnapshotSchedule CRD | |||
- `enableOwnerReferences`: `false` | |||
- If set to `true`, owner references will be added to the VolumeSnapshot objects created by the operator. |
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.
Looks like a line-length issue from the lint/pre-commit job:
helm/snapscheduler/README.md:160: MD013 Line length
Signed-off-by: salmon111 <[email protected]>
@JohnStrunk |
This pull request has been removed from the queue for the following reason: The pull request can't be updated You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
Describe what this PR does
This PR addresses #359 by adding
OwnerReferences
toVolumeSnapshot
objects created bySnapshotSchedule
.This ensures that
VolumeSnapshots
are automatically tracked and cleaned up when their parentSnapshotSchedule
is deleted.The addition improves resource management and simplifies dependency handling.
Is there anything that requires special attention?
This feature can be enabled by setting
enableOwnerReferences
to true invalues.yaml
.The default behavior remains unchanged even after the update.
Related issues: