Add TODO for getting NS from kube, making it optional
This commit is contained in:
parent
217ca989ce
commit
c270548e6e
@ -14,7 +14,7 @@ use std::path::PathBuf;
|
|||||||
|
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
pub struct HelmChartScore {
|
pub struct HelmChartScore {
|
||||||
pub namespace: NonBlankString,
|
pub namespace: Option<NonBlankString>,
|
||||||
pub release_name: NonBlankString,
|
pub release_name: NonBlankString,
|
||||||
pub chart_name: NonBlankString,
|
pub chart_name: NonBlankString,
|
||||||
pub chart_version: NonBlankString,
|
pub chart_version: NonBlankString,
|
||||||
@ -43,9 +43,14 @@ impl<T: Topology + HelmCommand> Interpret<T> for HelmChartInterpret {
|
|||||||
_inventory: &Inventory,
|
_inventory: &Inventory,
|
||||||
_topology: &T,
|
_topology: &T,
|
||||||
) -> Result<Outcome, InterpretError> {
|
) -> Result<Outcome, InterpretError> {
|
||||||
|
let ns = self
|
||||||
|
.score
|
||||||
|
.namespace
|
||||||
|
.as_ref()
|
||||||
|
.unwrap_or(todo!("Get namespace from active kubernetes cluster"));
|
||||||
let helm_executor = DefaultHelmExecutor::new();
|
let helm_executor = DefaultHelmExecutor::new();
|
||||||
let res = helm_executor.install_or_upgrade(
|
let res = helm_executor.install_or_upgrade(
|
||||||
&self.score.namespace,
|
ns,
|
||||||
&self.score.release_name,
|
&self.score.release_name,
|
||||||
&self.score.chart_name,
|
&self.score.chart_name,
|
||||||
Some(&self.score.chart_version),
|
Some(&self.score.chart_version),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user