-
Notifications
You must be signed in to change notification settings - Fork 67
Atomic and Idempotent Logic for bsl obj creation and access #2323
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
base: main
Are you sure you want to change the base?
Conversation
ShyamsundarR
left a comment
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.
@pruthvitd some nits, maybe better addressed before the merge.
Also the PR title and description seems misleading, for example it is expanding MCO as MachineConfigOperator whereas in this situation I think it is the multicluster operator that updates certificates in this space. I guess the change here is to ensure BSL is updated with latest parameters (specifically certificates) as per the provided configuration. Please update the PR description (and also add it to the commit message for git log readability)
| annotations map[string]string, | ||
| ) (*velero.BackupStorageLocation, *velero.Backup, error) { | ||
| return backupRequestCreate( | ||
| bsl, backup, err := backupRequestCreate( |
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) Why this cleanup or change?
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.
Thanks for checking! This change was part of the code refactoring to handle both creation and updates of the BSL in a single flow. This avoids the need for an additional helper function and keeps the logic simpler.
Open to discussing alternatives if you feel a different approach would work better — happy to adjust.
Thanks for correcting, PR description is updated. |
The objective is to ensure reliable and idempotent creation or update of BackupStorageLocation (BSL) resources, while enabling safe retrieval using client Get and List operations. This helps verify that spec changes—such as updates to caCert during operator upgrade rollouts triggered by the Multi Cluster Operator (MCO)—are correctly applied. Signed-off-by: pruthvitd <prd@redhat.com>
c75fa24 to
3c83c61
Compare
The objective is to ensure reliable and idempotent creation or update of BackupStorageLocation (BSL) resources, while enabling safe retrieval using client Get and List operations. This helps verify that spec changes—such as updates to caCert during operator upgrade rollouts triggered by the Multi Cluster Operator (MCO)—are correctly applied.