fix rest client patch and re-apply it
This commit is contained in:
parent
1712b52f14
commit
1b0efe4720
@ -155,6 +155,10 @@ class RESTClientObject(object):
|
||||
if query_params:
|
||||
url += '?' + urlencode(query_params)
|
||||
if re.search('json', headers['Content-Type'], re.IGNORECASE):
|
||||
if headers['Content-Type'] == 'application/json-patch+json':
|
||||
if not isinstance(body, list):
|
||||
headers['Content-Type'] = \
|
||||
'application/strategic-merge-patch+json'
|
||||
request_body = None
|
||||
if body is not None:
|
||||
request_body = json.dumps(body)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
diff --git a/kubernetes/client/rest.py b/kubernetes/client/rest.py
|
||||
index 13b16c2f..41c53429 100644
|
||||
index 0bb15d8..acf7b2b 100644
|
||||
--- a/kubernetes/client/rest.py
|
||||
+++ b/kubernetes/client/rest.py
|
||||
@@ -155,6 +155,10 @@ class RESTClientObject(object):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user