feat(HelmScore): Add values yaml option to helm chart score #23
| @ -52,12 +52,14 @@ impl<T: Topology + HelmCommand> Interpret<T> for HelmChartInterpret { | |||||||
|             .as_ref() |             .as_ref() | ||||||
|             .unwrap_or_else(|| todo!("Get namespace from active kubernetes cluster")); |             .unwrap_or_else(|| todo!("Get namespace from active kubernetes cluster")); | ||||||
| 
 | 
 | ||||||
|         let mut yaml_path: Option<&Path> = None; |  | ||||||
|         let tf: TempFile; |         let tf: TempFile; | ||||||
|  | |||||||
|         if self.score.values_yaml.is_some() { |         let yaml_path: Option<&Path> = match self.score.values_yaml.as_ref() { | ||||||
|             tf = temp_file::with_contents(self.score.values_yaml.as_ref().unwrap().as_bytes()); |             Some(yaml_str) => { | ||||||
|             yaml_path = Some(tf.path()); |                 tf = temp_file::with_contents(yaml_str.as_bytes()); | ||||||
|         } |                 Some(tf.path()) | ||||||
|  |             } | ||||||
|  |             None => None, | ||||||
|  |         }; | ||||||
| 
 | 
 | ||||||
|         let helm_executor = DefaultHelmExecutor::new(); |         let helm_executor = DefaultHelmExecutor::new(); | ||||||
|         let res = helm_executor.install_or_upgrade( |         let res = helm_executor.install_or_upgrade( | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	
No need for a mut here. This would be more readable as a match :