feat: added app to fill a pvc in 1GB increments #24
@ -26,6 +26,7 @@ async fn main() {
|
||||
project_root: "./php".into(),
|
||||
..Default::default()
|
||||
},
|
||||
db_size: "2Gi".to_string(),
|
||||
|
|
||||
};
|
||||
|
||||
// You can choose the type of Topology you want, we suggest starting with the
|
||||
|
||||
@ -3,6 +3,7 @@ use dockerfile_builder::instruction::{CMD, COPY, ENV, EXPOSE, FROM, RUN, WORKDIR
|
||||
use dockerfile_builder::{Dockerfile, instruction_builder::EnvBuilder};
|
||||
use non_blank_string_rs::NonBlankString;
|
||||
use serde_json::json;
|
||||
use std::collections::HashMap;
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::str::FromStr;
|
||||
@ -30,6 +31,7 @@ pub struct LAMPScore {
|
||||
pub domain: Url,
|
||||
pub config: LAMPConfig,
|
||||
pub php_version: Version,
|
||||
pub database_size: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
@ -156,6 +158,11 @@ impl LAMPInterpret {
|
||||
inventory: &Inventory,
|
||||
topology: &T,
|
||||
) -> Result<Outcome, InterpretError> {
|
||||
let mut mariadb_overrides = HashMap::new();
|
||||
mariadb_overrides.insert(
|
||||
NonBlankString::from_str("primary.persistence.size").unwrap(),
|
||||
self.score.database_size.clone(),
|
||||
);
|
||||
let score = HelmChartScore {
|
||||
namespace: self.get_namespace(),
|
||||
release_name: NonBlankString::from_str(&format!("{}-database", self.score.name))
|
||||
@ -165,7 +172,7 @@ impl LAMPInterpret {
|
||||
)
|
||||
.unwrap(),
|
||||
chart_version: None,
|
||||
values_overrides: None,
|
||||
values_overrides: Some(mariadb_overrides),
|
||||
create_namespace: true,
|
||||
install_only: true,
|
||||
values_yaml: None,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user
This belongs in the LAMPConfig struct and should use the default option. I think 2G is a sensible default for now.