Skip to content

Commit

Permalink
Merge pull request #412 from TwinProduction/patch-1
Browse files Browse the repository at this point in the history
Add merge in ProtoClient
  • Loading branch information
k8s-ci-robot authored Nov 5, 2018
2 parents 6e621b2 + 5d07d60 commit 7028dc4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions util/src/main/java/io/kubernetes/client/ProtoClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,20 @@ public <T extends Message> ObjectOrStatus<T> update(
return request(obj.newBuilderForType(), path, "PUT", obj, apiVersion, kind);
}

/**
* Merge a Kubernetes API object using protocol buffer encoding. Performs a PATCH
*
* @param obj The object to merge
* @param path The URL path to call
* @param apiVersion The api version to use
* @param kind The kind of the object
* @return An ObjectOrStatus which contains the Object requested, or a Status about the request.
*/
public <T extends Message> ObjectOrStatus<T> merge(
T obj, String path, String apiVersion, String kind) throws ApiException, IOException {
return request(obj.newBuilderForType(), path, "PATCH", obj, apiVersion, kind);
}

/**
* Delete a kubernetes API object using protocol buffer encoding.
*
Expand Down

0 comments on commit 7028dc4

Please sign in to comment.