From 3ba2299cd2c20b4101d195840c4591965a7ec2f0 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Thu, 11 Mar 2021 17:06:33 +0000 Subject: [PATCH] Fix api installer to indicate PATCH may return a 201 for server side apply Kubernetes-commit: cb72ce975630b44ec8786d5b72b1e0ee8bb1a0e4 --- pkg/endpoints/installer.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/endpoints/installer.go b/pkg/endpoints/installer.go index 23fca8259..215ecf715 100644 --- a/pkg/endpoints/installer.go +++ b/pkg/endpoints/installer.go @@ -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 {