diff --git a/rust/crd/src/constants.rs b/rust/crd/src/constants.rs index fc63bbcd..bd677a35 100644 --- a/rust/crd/src/constants.rs +++ b/rust/crd/src/constants.rs @@ -47,6 +47,17 @@ pub const MAX_SPARK_LOG_FILES_SIZE: MemoryQuantity = MemoryQuantity { unit: BinaryMultiple::Mebi, }; +// Spark applications can have up to three init containers. +// * `job` - copies user's application jar file from a volume to the expected location. +// * `requirements` - install Python packages. +// * `tls` - Generates a java trust store. +// All of these containers have their output captured by Vector via `capture_shell_output` +// and therefore also need space on the logging volume. +pub const MAX_INIT_LOG_FILES_SIZE: MemoryQuantity = MemoryQuantity { + value: 3.0, // 1Mib for each possible container. + unit: BinaryMultiple::Mebi, +}; + pub const OPERATOR_NAME: &str = "spark.stackable.tech"; pub const CONTROLLER_NAME: &str = "sparkapplication"; pub const POD_DRIVER_CONTROLLER_NAME: &str = "pod-driver"; diff --git a/rust/crd/src/lib.rs b/rust/crd/src/lib.rs index 6681b078..17ca743e 100644 --- a/rust/crd/src/lib.rs +++ b/rust/crd/src/lib.rs @@ -325,7 +325,7 @@ impl SparkApplication { .with_empty_dir( None::, Some(product_logging::framework::calculate_log_volume_size_limit( - &[MAX_SPARK_LOG_FILES_SIZE], + &[MAX_SPARK_LOG_FILES_SIZE, MAX_INIT_LOG_FILES_SIZE], )), ) .build(),