remove_finalizer

Function remove_finalizer 

Source
pub async fn remove_finalizer<T>(
    client: &Client,
    resource: &T,
    finalizer: &str,
) -> Result<()>
where T: Resource<DynamicType = (), Scope = NamespaceResourceScope> + ResourceExt + Clone + Debug + Serialize + for<'de> Deserialize<'de>,
Expand description

Remove a finalizer from a resource.

This function removes the specified finalizer from the resource if present. The operation is idempotent - calling it multiple times has no effect if the finalizer is already absent.

Note: Typically you should use handle_deletion() instead of calling this function directly, as it performs cleanup before removing the finalizer.

§Arguments

  • client - Kubernetes client for accessing the API
  • resource - The resource to remove the finalizer from
  • finalizer - The finalizer string to remove

§Returns

Returns Ok(()) if the finalizer was removed or already absent.

§Errors

Returns an error if:

  • The resource has no namespace (for namespaced resources)
  • The API patch operation fails