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
Change status to ReadyToUse to true for VolumeSnapshot #752
Conversation
pkg/kube/snapshot/snapshot_alpha.go
Outdated
} | ||
status["readyToUse"] = true | ||
us.Object["status"] = status | ||
if _, err := sna.dynCli.Resource(v1alpha1.VolSnapGVR).Namespace(namespace).UpdateStatus(ctx, us, metav1.UpdateOptions{}); err != nil { |
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.
Can we use Patch
here?
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 dont think you can patch a status. That why UpdateStatus does a PUT internally to replace the whole object
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.
Got it - sounds good.
Merge branch 'master' of https://github.com/kanisterio/kanister into hack_to_set_status
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.
LGTM - Unit test needed.
Merge branch 'master' of https://github.com/kanisterio/kanister into hack_to_set_status
Change Overview
Pull request type
Please check the type of change your PR introduces:
Issues
Test Plan