Compare commits
No commits in common. "78fffcd725d3c5f38feee4d68a1d99eed946b731" and "1c3669cb47e9a04edccef1d6500cc62f485afc8a" have entirely different histories.
78fffcd725
...
1c3669cb47
@ -24,7 +24,6 @@ async fn main() {
|
||||
// This config can be extended as needed for more complicated configurations
|
||||
config: LAMPConfig {
|
||||
project_root: "./php".into(),
|
||||
database_size: format!("2Gi").into(),
|
||||
..Default::default()
|
||||
},
|
||||
};
|
||||
|
||||
@ -18,8 +18,8 @@ use crate::{
|
||||
data::{Id, Version},
|
||||
interpret::{Interpret, InterpretError, InterpretName, InterpretStatus, Outcome},
|
||||
inventory::Inventory,
|
||||
modules::k8s::deployment::K8sDeploymentScore,
|
||||
score::Score,
|
||||
modules::k8s::deployment::K8sDeploymentScore,
|
||||
score::Score,
|
||||
topology::{K8sclient, Topology, Url},
|
||||
};
|
||||
|
||||
@ -37,7 +37,7 @@ pub struct LAMPScore {
|
||||
pub struct LAMPConfig {
|
||||
pub project_root: PathBuf,
|
||||
pub ssl_enabled: bool,
|
||||
pub database_size: Option<String>,
|
||||
pub database_size: String,
|
||||
}
|
||||
|
||||
impl Default for LAMPConfig {
|
||||
@ -45,7 +45,7 @@ impl Default for LAMPConfig {
|
||||
LAMPConfig {
|
||||
project_root: Path::new("./src").to_path_buf(),
|
||||
ssl_enabled: true,
|
||||
database_size: None,
|
||||
database_size: "2Gi".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -159,13 +159,11 @@ impl LAMPInterpret {
|
||||
inventory: &Inventory,
|
||||
topology: &T,
|
||||
) -> Result<Outcome, InterpretError> {
|
||||
let mut values_overrides = HashMap::new();
|
||||
if let Some(database_size) = self.score.config.database_size.clone() {
|
||||
values_overrides.insert(
|
||||
NonBlankString::from_str("primary.persistence.size").unwrap(),
|
||||
database_size,
|
||||
);
|
||||
}
|
||||
let mut mariadb_overrides = HashMap::new();
|
||||
mariadb_overrides.insert(
|
||||
NonBlankString::from_str("primary.persistence.size").unwrap(),
|
||||
self.score.config.database_size.clone(),
|
||||
);
|
||||
let score = HelmChartScore {
|
||||
namespace: self.get_namespace(),
|
||||
release_name: NonBlankString::from_str(&format!("{}-database", self.score.name))
|
||||
@ -175,7 +173,7 @@ impl LAMPInterpret {
|
||||
)
|
||||
.unwrap(),
|
||||
chart_version: None,
|
||||
values_overrides: Some(values_overrides),
|
||||
values_overrides: Some(mariadb_overrides),
|
||||
create_namespace: true,
|
||||
install_only: true,
|
||||
values_yaml: None,
|
||||
@ -183,6 +181,7 @@ impl LAMPInterpret {
|
||||
|
||||
score.create_interpret().execute(inventory, topology).await
|
||||
}
|
||||
|
||||
fn build_dockerfile(&self, score: &LAMPScore) -> Result<PathBuf, Box<dyn std::error::Error>> {
|
||||
let mut dockerfile = Dockerfile::new();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user