MCPcopy Create free account
hub / github.com/Qovery/engine / helm_pull

Method helm_pull

lib-engine/src/cmd/helm.rs:645–745  ·  view source on GitHub ↗
(
        &self,
        engine_helm_registry: &Registry,
        chart_name: &str,
        chart_version: &str,
        envs: &[(&str, &str)],
        cmd_killer: &CommandKiller,
        tmpdir: &Tem

Source from the content-addressed store, hash-verified

643 }
644
645 fn helm_pull(
646 &self,
647 engine_helm_registry: &Registry,
648 chart_name: &str,
649 chart_version: &str,
650 envs: &[(&str, &str)],
651 cmd_killer: &CommandKiller,
652 tmpdir: &TempDir,
653 url_with_credentials: &Url,
654 skip_tls_verification: bool,
655 ) -> Result<(), HelmError> {
656 let registry_url = engine_helm_registry.get_url();
657 let url_with_chart_name = match registry_url.join(chart_name) {
658 Ok(url_with_chart_name) => url_with_chart_name,
659 Err(e) => {
660 error!(
661 "Can't join chart_name '{}' to registry url '{}': {}",
662 chart_name, registry_url, e
663 );
664 return Err(InvalidRepositoryConfig(format!(
665 "Can't build chart FQDN: failed to join chart name '{}' to registry URL '{}': {}",
666 chart_name, registry_url, e
667 )));
668 }
669 };
670
671 let (registry_config_path, repository_config_path, repository_cache_path) =
672 Self::get_helm_cmd_paths(tmpdir.path());
673 let mut helm_pull_args = vec![
674 "pull",
675 "--debug", // there is no debug log but if someday they appear
676 url_with_chart_name.as_str(),
677 "--version",
678 chart_version,
679 "--untar",
680 "--untardir",
681 tmpdir.path().to_str().unwrap_or_default(),
682 "--registry-config",
683 &registry_config_path,
684 "--repository-config",
685 &repository_config_path,
686 "--repository-cache",
687 &repository_cache_path,
688 ];
689
690 if skip_tls_verification {
691 helm_pull_args.push("--insecure-skip-tls-verify");
692 }
693
694 let mut error_message: Vec<String> = Vec::new();
695 let helm_ret = helm_exec_with_output(
696 helm_pull_args.as_slice(),
697 envs,
698 &mut |line| {
699 info!("{}", line);
700 },
701 &mut |line| {
702 warn!("chart {}: {}", chart_name, line);

Callers 1

download_oci_chartMethod · 0.80

Calls 6

helm_exec_with_outputFunction · 0.85
TimeoutEnum · 0.85
get_urlMethod · 0.80
pushMethod · 0.80
pathMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected