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

Method get_chart_version

lib-engine/src/cmd/helm.rs:509–533  ·  view source on GitHub ↗
(
        &self,
        chart_name: &str,
        namespace: Option<&str>,
        envs: &[(&str, &str)],
    )

Source from the content-addressed store, hash-verified

507 }
508
509 pub fn get_chart_version(
510 &self,
511 chart_name: &str,
512 namespace: Option<&str>,
513 envs: &[(&str, &str)],
514 ) -> Result<Option<HelmChartVersions>, HelmError> {
515 let deployed_charts = match (&self.list_cache, namespace) {
516 (Some(cache), Some(ns)) => {
517 let ns = ns.to_string();
518 cache.get_or_fetch(&ns, || self.list_release(Some(&ns), envs))?
519 }
520 _ => self.list_release(namespace, envs)?,
521 };
522 for chart in deployed_charts {
523 if chart.name == chart_name {
524 return Ok(Some(HelmChartVersions {
525 chart_version: chart.chart_version,
526 app_version: chart.app_version,
527 }));
528 }
529 }
530
531 // found nothing ;'(
532 Ok(None)
533 }
534
535 pub fn download_chart(
536 &self,

Callers 4

execMethod · 0.80
update_crds_on_upgradeFunction · 0.80

Calls 2

get_or_fetchMethod · 0.80
list_releaseMethod · 0.80

Tested by

no test coverage detected