Skip to main content

apply_webhook_patch

Function apply_webhook_patch 

Source
pub fn apply_webhook_patch(
    webhook_name: &str,
    object: &Value,
    ops: &Value,
    gvk: &Gvk,
) -> Result<Value, WebhookError>
Expand description

Apply a webhook’s RFC6902 op array (already decoded) to object, returning the mutated object. Reuses the apiserver’s canonical json-patch engine.

§Errors

WebhookError::PatchApply when the ops don’t form a valid RFC6902 array or applying them fails.