async fn upgrade_kubectl(mf: &Manifest, tfile: &str) -> Result<()> {
    // upgrade it using the same command
    let applyvec = vec![
        "apply".into(),
        format!("-n={}", mf.namespace),
        "-f".into(),
        tfile.into(),
        "--prune".into(),
        // NB: assumes one deploy per namespace
        format!("-l=app.kubernetes.io/name={}", mf.name),
    ];
    info!("kubectl {}", applyvec.join(" "));
    kubectl::kexec(applyvec)
        .await
        .chain_err(|| ErrorKind::KubectlApplyFailure(mf.name.clone()))?;
    Ok(())
}
/// Shell out to kubectl apply
///
/// Assumes you have written your template file from `helm template`
Shell out to kubectl apply
Assumes you have written your template file from `helm template`
Shell out to kubectl apply Assumes you have written your template file from ` helm template `
async fn upgrade_kubectl(mf: &Manifest, tfile: &str) -> Result<()> {
    // upgrade it using the same command
    let applyvec = vec![
        "apply".into(),
        format!("-n={}", mf.namespace),
        "-f".into(),
        tfile.into(),
        "--prune".into(),
        // NB: assumes one deploy per namespace
        format!("-l=app.kubernetes.io/name={}", mf.name),
    ];
    info!("kubectl {}", applyvec.join(" "));
    kubectl::kexec(applyvec)
        .await
        .chain_err(|| ErrorKind::KubectlApplyFailure(mf.name.clone()))?;
    Ok(())
}
async fn upgrade_kubectl ( mf : & Manifest , tfile : & str ) -> Result < ( ) > { // upgrade it using the same command let applyvec = vec ! [ " " into ( ) format ( " " mf namespace ) " " into ( ) tfile into ( ) " " into ( ) // NB: assumes one deploy per namespace format ( " " mf name ) ] ; info ! ( " " applyvec join ( " " ) ) ; kubectl :: kexec ( applyvec ) . await . chain_err ( | | ErrorKind :: KubectlApplyFailure ( mf . name . clone ( ) ) ) ? ; Ok ( ( ) ) }
Shell out to kubectl apply
Assumes you have written your template file from `helm template`
Shell out to kubectl apply Assumes you have written your template file from ` helm template `
mf
&Manifest
tfile
&str
mf
&Manifest
tfile
&str