-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Fixups for watch in in-memory apiServer #8898
🌱 Fixups for watch in in-memory apiServer #8898
Conversation
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
@@ -73,29 +73,33 @@ func NewAPIServerHandler(manager cmanager.Manager, log logr.Logger, resolver Res | |||
|
|||
// CRUD endpoints (global objects) | |||
ws.Route(ws.POST("/api/v1/{resource}").Consumes(runtime.ContentTypeProtobuf).To(apiServer.apiV1Create)) | |||
ws.Route(ws.GET("/api/v1/{resource}").To(apiServer.apiV1List)) | |||
ws.Route(ws.GET("/api/v1/{resource}").If(isList).To(apiServer.apiV1List)) |
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.
Route handling for Watch and List this way seems more natural and easy to follow this way IMO.
// TODO: (killianmuldoon) Understand if setting this twice is necessary. | ||
// Required to override default beforeUpdate behaviour | ||
// that prevent changes to automatically managed fields. | ||
obj.SetDeletionTimestamp(&now) |
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.
Re-adding this is not necessary - must be a leftover from older behaviour of the beforeUpdate function.
/retest Flake caused by github not being reachable. |
Thx! /lgtm /hold |
LGTM label has been added. Git tree hash: c9d9f122b6e1442ae1eaf635e5cf0b831a5bf1a7
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini, sbueringer 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 |
/area provider/infrastructure-in-memory |
Has a number of small improvements following on from reviews of #8851.
Related to #8814