Add "fieldManager" to flag to PATCH/CREATE/UPDATE

And add a corresponding flag in kubectl (for apply), even though the
value is defaulted in kubectl with "kubectl".

The flag is required for Apply patch-type, and optional for other PATCH,
CREATE and UPDATE (in which case we fallback on the user-agent).
This commit is contained in:
Antoine Pelisse
2019-02-16 20:16:11 -08:00
parent 8bde75e63f
commit eb904d8fa8
20 changed files with 378 additions and 34 deletions

View File

@@ -567,6 +567,9 @@ func TestRBAC(t *testing.T) {
if r.verb == "PATCH" {
// For patch operations, use the apply content type
req.Header.Add("Content-Type", string(types.ApplyPatchType))
q := req.URL.Query()
q.Add("fieldManager", "rbac_test")
req.URL.RawQuery = q.Encode()
}
if err != nil {