Skip to content

Commit 800c61d

Browse files
Increase the size limit of the log volume (#383)
# Description Increase the size limit of the log volume.
1 parent d586446 commit 800c61d

6 files changed

Lines changed: 26 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
### Changed
1414

15-
`operator-rs` `0.40.2` -> `0.42.2` ([#360], [#371]).
15+
`operator-rs` `0.40.2` -> `0.44.0` ([#360], [#371], [#383]).
1616
- Use 0.0.0-dev product images for testing ([#361]).
1717
- Use testing-tools 0.2.0 ([#361]).
1818
- Added kuttl test suites ([#373]).
@@ -21,6 +21,7 @@
2121
### Fixed
2222

2323
- Operator now errors out when `credentialsSecret` is missing ([#375]).
24+
- Increase the size limit of the log volume ([#383]).
2425

2526
[#360]: https://github.com/stackabletech/superset-operator/pull/360
2627
[#361]: https://github.com/stackabletech/superset-operator/pull/361
@@ -32,6 +33,7 @@
3233
[#375]: https://github.com/stackabletech/superset-operator/pull/375
3334
[#377]: https://github.com/stackabletech/superset-operator/pull/377
3435
[#379]: https://github.com/stackabletech/superset-operator/pull/379
36+
[#383]: https://github.com/stackabletech/superset-operator/pull/383
3537

3638
## [23.4.0] - 2023-04-17
3739

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/crd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ publish = false
1111
[dependencies]
1212
serde = "1.0"
1313
serde_json = "1.0"
14-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.42.2" }
14+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.44.0" }
1515
strum = { version = "0.24", features = ["derive"] }
1616
snafu = "0.7"
1717
tracing = "0.1"

rust/crd/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use stackable_operator::{
2020
config::{fragment, fragment::Fragment, fragment::ValidationError, merge::Merge},
2121
k8s_openapi::apimachinery::pkg::api::resource::Quantity,
2222
kube::{runtime::reflector::ObjectRef, CustomResource, ResourceExt},
23+
memory::{BinaryMultiple, MemoryQuantity},
2324
product_config::flask_app_config_writer::{FlaskAppConfigOptions, PythonType},
2425
product_config_utils::{ConfigError, Configuration},
2526
product_logging::{self, spec::Logging},
@@ -36,7 +37,10 @@ pub const LOG_CONFIG_DIR: &str = "/stackable/log_config";
3637
pub const LOG_DIR: &str = "/stackable/log";
3738
pub const PYTHONPATH: &str = "/stackable/app/pythonpath";
3839
pub const SUPERSET_CONFIG_FILENAME: &str = "superset_config.py";
39-
pub const LOG_VOLUME_SIZE_IN_MIB: u32 = 10;
40+
pub const MAX_LOG_FILES_SIZE: MemoryQuantity = MemoryQuantity {
41+
value: 10.0,
42+
unit: BinaryMultiple::Mebi,
43+
};
4044

4145
#[derive(Debug, Snafu)]
4246
pub enum Error {

rust/operator-binary/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ futures = { version = "0.3", features = ["compat"] }
1616
indoc = "1.0"
1717
serde = "1.0"
1818
snafu = "0.7"
19-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.42.2" }
19+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.44.0" }
2020
stackable-superset-crd = { path = "../crd" }
2121
strum = { version = "0.24", features = ["derive"] }
2222
tokio = { version = "1.25", features = ["macros", "rt-multi-thread"] }
2323
tracing = "0.1"
2424

2525
[build-dependencies]
2626
built = { version = "0.6", features = ["chrono", "git2"] }
27-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.42.2" }
27+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.44.0" }
2828
stackable-superset-crd = { path = "../crd" }

rust/operator-binary/src/controller_commons.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
use stackable_operator::{
22
builder::VolumeBuilder,
3-
k8s_openapi::{
4-
api::core::v1::{ConfigMapVolumeSource, EmptyDirVolumeSource, Volume},
5-
apimachinery::pkg::api::resource::Quantity,
6-
},
7-
product_logging::spec::{
8-
ConfigMapLogConfig, ContainerLogConfig, ContainerLogConfigChoice, CustomContainerLogConfig,
3+
k8s_openapi::api::core::v1::{ConfigMapVolumeSource, EmptyDirVolumeSource, Volume},
4+
product_logging::{
5+
self,
6+
spec::{
7+
ConfigMapLogConfig, ContainerLogConfig, ContainerLogConfigChoice,
8+
CustomContainerLogConfig,
9+
},
910
},
1011
};
11-
use stackable_superset_crd::LOG_VOLUME_SIZE_IN_MIB;
12+
use stackable_superset_crd::MAX_LOG_FILES_SIZE;
1213

1314
pub const CONFIG_VOLUME_NAME: &str = "config";
1415
pub const LOG_CONFIG_VOLUME_NAME: &str = "log-config";
@@ -29,7 +30,9 @@ pub fn create_volumes(
2930
name: LOG_VOLUME_NAME.into(),
3031
empty_dir: Some(EmptyDirVolumeSource {
3132
medium: None,
32-
size_limit: Some(Quantity(format!("{LOG_VOLUME_SIZE_IN_MIB}Mi"))),
33+
size_limit: Some(product_logging::framework::calculate_log_volume_size_limit(
34+
&[MAX_LOG_FILES_SIZE],
35+
)),
3336
}),
3437
..Volume::default()
3538
});

0 commit comments

Comments
 (0)