Skip to main content

modify_deployment_for_caproni

Function modify_deployment_for_caproni 

Source
pub fn modify_deployment_for_caproni(
    deployment: &mut Value,
    target_name: &str,
    image: &str,
    containers: &[String],
) -> Result<(), CopyError>
Expand description

Modifies a deployment’s JSON structure for use as a -caproni copy. Renames the deployment, removes health probes, and replaces container commands with sleep infinity. When containers is non-empty, only those containers are modified; all others are left unchanged.

§Errors

Returns CopyError::InvalidDeploymentStructure if the JSON does not have the expected shape, or CopyError::ContainerNotFound if a named container in containers does not exist in the deployment.