(
&self,
chart_name: &str,
namespace: Option<&str>,
envs: &[(&str, &str)],
)
| 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, |
no test coverage detected