Fix api installer to indicate PATCH may return a 201 for server side apply
Kubernetes-commit: cb72ce975630b44ec8786d5b72b1e0ee8bb1a0e4
This commit is contained in:
parent
faa33164d5
commit
3ba2299cd2
|
|
@ -805,6 +805,8 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
|
|||
Operation("patch"+namespaced+kind+strings.Title(subresource)+operationSuffix).
|
||||
Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...).
|
||||
Returns(http.StatusOK, "OK", producedObject).
|
||||
// Patch can return 201 when a server side apply is requested
|
||||
Returns(http.StatusCreated, "Created", producedObject).
|
||||
Reads(metav1.Patch{}).
|
||||
Writes(producedObject)
|
||||
if err := AddObjectParams(ws, route, versionedPatchOptions); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue