Implement Strategic Merge Patch in apiserver

This commit is contained in:
Sam Ghods
2015-03-13 17:43:14 -07:00
parent e912d5204c
commit 2c977db1b3
13 changed files with 1601 additions and 62 deletions

View File

@@ -21,6 +21,7 @@ import (
"strings"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
)
@@ -106,8 +107,8 @@ func (c *RESTClient) Put() *Request {
}
// Patch begins a PATCH request. Short for c.Verb("Patch").
func (c *RESTClient) Patch() *Request {
return c.Verb("PATCH")
func (c *RESTClient) Patch(pt api.PatchType) *Request {
return c.Verb("PATCH").SetHeader("Content-Type", string(pt))
}
// Get begins a GET request. Short for c.Verb("GET").