Skip to content

Commit

Permalink
Added log volume space for init containers.
Browse files Browse the repository at this point in the history
  • Loading branch information
razvan committed Jul 14, 2023
1 parent 7bb59a1 commit 19c9264
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions rust/crd/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion rust/crd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ impl SparkApplication {
.with_empty_dir(
None::<String>,
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(),
Expand Down

0 comments on commit 19c9264

Please sign in to comment.