MCPcopy Create free account
hub / github.com/flant/shell-operator / JSONPatch

Method JSONPatch

pkg/kube/object_patch/patch_collector.go:100–102  ·  view source on GitHub ↗

JSONPatch applies a json patch to the specified object using API call Patch. Options: - WithSubresource — a subresource argument for Patch call. - IgnoreMissingObject — do not return error if the specified object is missing. - IgnoreHookError — allows applying patches for a Status subresource even

(jsonPatch any, apiVersion, kind, namespace, name string, opts ...sdkpkg.PatchCollectorOption)

Source from the content-addressed store, hash-verified

98// - IgnoreMissingObject — do not return error if the specified object is missing.
99// - IgnoreHookError — allows applying patches for a Status subresource even if the hook fails
100func (dop *PatchCollector) JSONPatch(jsonPatch any, apiVersion, kind, namespace, name string, opts ...sdkpkg.PatchCollectorOption) {
101 dop.add(NewJSONPatchOperation(jsonPatch, apiVersion, kind, namespace, name, opts...))
102}
103
104// Filter retrieves a specified object, modified it with
105// filterFunc and calls update.

Callers

nothing calls this directly

Calls 2

addMethod · 0.95
NewJSONPatchOperationFunction · 0.85

Tested by

no test coverage detected