Merge pull request #115339 from kevindelgado/patch-opton-params

Separate Put and Patch Options
This commit is contained in:
Kubernetes Prow Robot 2023-01-30 13:49:00 -08:00 committed by GitHub
commit 0cb1eabbf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -348,13 +348,13 @@ func (b *builder) buildRoute(root, path, httpMethod, actionVerb, operationVerb s
// Build option parameters // Build option parameters
switch actionVerb { switch actionVerb {
case "get": case "get":
// TODO: CRD support for export is still under consideration
endpoints.AddObjectParams(b.ws, route, &metav1.GetOptions{}) endpoints.AddObjectParams(b.ws, route, &metav1.GetOptions{})
case "list", "deletecollection": case "list", "deletecollection":
endpoints.AddObjectParams(b.ws, route, &metav1.ListOptions{}) endpoints.AddObjectParams(b.ws, route, &metav1.ListOptions{})
case "put", "patch": case "put":
// TODO: PatchOption added in feature branch but not in master yet
endpoints.AddObjectParams(b.ws, route, &metav1.UpdateOptions{}) endpoints.AddObjectParams(b.ws, route, &metav1.UpdateOptions{})
case "patch":
endpoints.AddObjectParams(b.ws, route, &metav1.PatchOptions{})
case "post": case "post":
endpoints.AddObjectParams(b.ws, route, &metav1.CreateOptions{}) endpoints.AddObjectParams(b.ws, route, &metav1.CreateOptions{})
case "delete": case "delete":