-
Notifications
You must be signed in to change notification settings - Fork 58
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
Volumes in recipes should be used to override LabelSelector and ignored for velero backups #1739
Volumes in recipes should be used to override LabelSelector and ignored for velero backups #1739
Conversation
raghavendra-talur
commented
Jan 7, 2025
•
edited
Loading
edited
- Removed function pointer that changed behavior of the recipeVolumesAndOptionallyWorkflowsGet()
- RecipeElementsGet always returns complete recipe data
- Ignore volume group in a workflow sequence
- Fix tests
@@ -141,15 +132,19 @@ func recipeVolumesAndOptionallyWorkflowsGet(ctx context.Context, reader client.R | |||
recipe.Spec.Volumes.LabelSelector) | |||
} | |||
|
|||
*recipeElements = RecipeElements{ | |||
recipeElements = RecipeElements{ |
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.
Should pvcSelector be added with a OR logic between selector defined in drpc and recipe?
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.
The expectation is that recipe overrides everything that is defined in the drpc.
Co-Authored-by: Annaraya Narasagond <[email protected]> Signed-off-by: Raghavendra Talur <[email protected]>
Co-Authored-by: Annaraya Narasagond <[email protected]> Signed-off-by: Raghavendra Talur <[email protected]>
Co-Authored-by: Annaraya Narasagond <[email protected]> Signed-off-by: Raghavendra Talur <[email protected]>
15251f0
to
176e120
Compare
var recipeElements RecipeElements | ||
recipeElements, err := RecipeElementsGet(ctx, reader, vrg, ramenConfig, log) | ||
if err != nil { | ||
return recipeElements.PvcSelector, err |
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.
(nit) This line is a bit confusing. It references returning recipeElements.PvcSelector
on an error, but since filterPVC()
skips PvcSelector
in case of an error, I suggest returning PvcSelector{}
instead. This would improve readability.
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 merged this PR and fixed this nit in the next PR #1738