MCPcopy Index your code
hub / github.com/kubernetes-client/python / server_side_apply

Method server_side_apply

kubernetes/base/dynamic/client.py:147–159  ·  view source on GitHub ↗
(self, resource, body=None, name=None, namespace=None, force_conflicts=None, **kwargs)

Source from the content-addressed store, hash-verified

145 return self.request('patch', path, body=body, content_type=content_type, **kwargs)
146
147 def server_side_apply(self, resource, body=None, name=None, namespace=None, force_conflicts=None, **kwargs):
148 body = self.serialize_body(body)
149 name = name or body.get('metadata', {}).get('name')
150 if not name:
151 raise ValueError("name is required to patch {}.{}".format(resource.group_version, resource.kind))
152 if resource.namespaced:
153 namespace = self.ensure_namespace(resource, namespace, body)
154
155 # force content type to 'application/apply-patch+yaml'
156 kwargs.update({'content_type': 'application/apply-patch+yaml'})
157 path = resource.path(name=name, namespace=namespace)
158
159 return self.request('patch', path, body=body, force_conflicts=force_conflicts, **kwargs)
160
161 def watch(self, resource, namespace=None, name=None, label_selector=None, field_selector=None, resource_version=None, timeout=None, watcher=None, allow_watch_bookmarks=None):
162 """

Callers 2

Calls 7

serialize_bodyMethod · 0.95
ensure_namespaceMethod · 0.95
requestMethod · 0.95
getMethod · 0.45
formatMethod · 0.45
updateMethod · 0.45
pathMethod · 0.45

Tested by 1