use match
This commit is contained in:
parent
4147691337
commit
d7b38ab6d2
@ -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