@@ -121,6 +121,10 @@ def get_resources_for_api_version(self, prefix, group, version, preferred):
121
121
subresources [resource ][name ] = subresource
122
122
123
123
for resource in resources_raw :
124
+ # Prevent duplicate keys
125
+ for key in ('prefix' , 'group' , 'api_version' , 'client' , 'preferred' ):
126
+ resource .pop (key , None )
127
+
124
128
resources [resource ['kind' ]] = Resource (
125
129
prefix = prefix ,
126
130
group = group ,
@@ -186,9 +190,9 @@ def patch(self, resource, body=None, name=None, namespace=None, **kwargs):
186
190
namespace = self .ensure_namespace (resource , namespace , body )
187
191
188
192
content_type = kwargs .pop ('content_type' , 'application/strategic-merge-patch+json' )
189
- path = resource .path (name = name , namespace = namespace , ** kwargs )
193
+ path = resource .path (name = name , namespace = namespace )
190
194
191
- return self .request ('patch' , path , body = body , content_type = content_type )
195
+ return self .request ('patch' , path , body = body , content_type = content_type , ** kwargs )
192
196
193
197
194
198
def request (self , method , path , body = None , ** params ):
0 commit comments