Skip to content

Commit 3037974

Browse files
authored
bump: operator-rs to 0.56.1 (#309)
* bump: operator-rs to 0.56.1 * fix: external product-config crate * fix: renamed create_vector_shutdown_file_command function
1 parent ec1e19e commit 3037974

File tree

9 files changed

+209
-86
lines changed

9 files changed

+209
-86
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[workspace]
2-
members = [
3-
"rust/crd", "rust/operator-binary"
4-
]
2+
members = ["rust/crd", "rust/operator-binary"]
53

64
[workspace.package]
75
version = "0.0.0-dev"
@@ -12,16 +10,17 @@ repository = "https://github.com/stackabletech/spark-k8s-operator"
1210

1311
[workspace.dependencies]
1412
anyhow = "1.0"
15-
built = { version = "0.6", features = ["chrono", "git2"] }
13+
built = { version = "0.6", features = ["chrono", "git2"] }
1614
clap = "4.3"
1715
futures = { version = "0.3", features = ["compat"] }
16+
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.6.0" }
1817
rstest = "0.18"
1918
semver = "1.0"
2019
serde = { version = "1.0", features = ["derive"] }
2120
serde_json = "1.0"
2221
serde_yaml = "0.9"
2322
snafu = "0.7"
24-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.55.0" }
23+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.56.1" }
2524
strum = { version = "0.25", features = ["derive"] }
2625
tokio = { version = "1.29", features = ["full"] }
2726
tracing = "0.1"

rust/crd/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ repository.workspace = true
99
publish = false
1010

1111
[dependencies]
12+
product-config.workspace = true
1213
semver.workspace = true
1314
serde.workspace = true
1415
serde_json.workspace = true

rust/crd/src/history.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::{affinity::history_affinity, constants::*};
22

3+
use product_config::{types::PropertyNameKind, ProductConfigManager};
34
use serde::{Deserialize, Serialize};
45
use snafu::{OptionExt, ResultExt, Snafu};
56
use stackable_operator::role_utils::RoleGroup;
@@ -21,7 +22,6 @@ use stackable_operator::{
2122
k8s_openapi::apimachinery::pkg::api::resource::Quantity,
2223
kube::CustomResource,
2324
kube::{runtime::reflector::ObjectRef, ResourceExt},
24-
product_config::{types::PropertyNameKind, ProductConfigManager},
2525
product_config_utils::{
2626
transform_all_roles_to_config, validate_all_roles_and_groups_config, Configuration,
2727
ValidatedRoleConfigByPropertyKind,

rust/crd/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ pub mod tlscerts;
1010
pub use crate::roles::*;
1111
use constants::*;
1212
use history::LogFileDirectorySpec;
13+
use product_config::{types::PropertyNameKind, ProductConfigManager};
1314
use s3logdir::S3LogDir;
1415
use serde::{Deserialize, Serialize};
1516
use snafu::{OptionExt, ResultExt, Snafu};
1617
use stackable_operator::builder::SecretFormat;
17-
use stackable_operator::product_config::ProductConfigManager;
1818
use stackable_operator::product_config_utils::{
1919
transform_all_roles_to_config, validate_all_roles_and_groups_config,
2020
ValidatedRoleConfigByPropertyKind,
@@ -35,7 +35,6 @@ use stackable_operator::{
3535
kube::{CustomResource, ResourceExt},
3636
labels::ObjectLabels,
3737
memory::{BinaryMultiple, MemoryQuantity},
38-
product_config::types::PropertyNameKind,
3938
product_logging,
4039
role_utils::{CommonConfiguration, Role, RoleGroup},
4140
schemars::{self, JsonSchema},
@@ -892,11 +891,11 @@ mod tests {
892891
use crate::{cores_from_quantity, resources_to_executor_props, RoleConfig};
893892
use crate::{resources_to_driver_props, SparkApplication};
894893
use crate::{Quantity, SparkStorageConfig};
894+
use product_config::{types::PropertyNameKind, ProductConfigManager};
895895
use stackable_operator::commons::affinity::StackableAffinity;
896896
use stackable_operator::commons::resources::{
897897
CpuLimits, MemoryLimits, NoRuntimeLimits, Resources,
898898
};
899-
use stackable_operator::product_config::{types::PropertyNameKind, ProductConfigManager};
900899
use stackable_operator::product_config_utils::ValidatedRoleConfigByPropertyKind;
901900
use stackable_operator::product_logging::spec::Logging;
902901

rust/operator-binary/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ publish = false
1212
stackable-spark-k8s-crd = { path = "../crd" }
1313

1414
anyhow.workspace = true
15+
product-config.workspace = true
1516
semver.workspace = true
1617
serde.workspace = true
1718
serde_json.workspace = true

rust/operator-binary/src/history/history_controller.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use crate::history::operations::pdb::add_pdbs;
22
use crate::product_logging::{self, resolve_vector_aggregator_address};
33
use crate::Ctx;
4+
use product_config::{types::PropertyNameKind, writer::to_java_properties_string};
45
use stackable_operator::{
56
builder::{ConfigMapBuilder, ContainerBuilder, ObjectMetaBuilder, PodBuilder, VolumeBuilder},
67
cluster_resources::{ClusterResourceApplyStrategy, ClusterResources},
@@ -21,7 +22,6 @@ use stackable_operator::{
2122
Resource, ResourceExt,
2223
},
2324
labels::{role_group_selector_labels, role_selector_labels, ObjectLabels},
24-
product_config::{types::PropertyNameKind, writer::to_java_properties_string},
2525
product_logging::{
2626
framework::{calculate_log_volume_size_limit, vector_container},
2727
spec::{
@@ -134,7 +134,7 @@ pub enum Error {
134134
rolegroup
135135
))]
136136
JvmSecurityProperties {
137-
source: stackable_operator::product_config::writer::PropertiesWriterError,
137+
source: product_config::writer::PropertiesWriterError,
138138
rolegroup: String,
139139
},
140140
#[snafu(display("failed to create PodDisruptionBudget"))]

rust/operator-binary/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ use std::sync::Arc;
88
use clap::{crate_description, crate_version, Parser};
99
use futures::StreamExt;
1010
use history::history_controller;
11+
use product_config::ProductConfigManager;
1112
use stackable_operator::cli::{Command, ProductOperatorRun};
1213
use stackable_operator::k8s_openapi::api::apps::v1::StatefulSet;
1314
use stackable_operator::k8s_openapi::api::core::v1::Pod;
1415
use stackable_operator::k8s_openapi::api::core::v1::{ConfigMap, Service};
1516
use stackable_operator::kube::runtime::{controller::Controller, watcher};
1617
use stackable_operator::logging::controller::report_controller_reconciled;
17-
use stackable_operator::product_config::ProductConfigManager;
1818
use stackable_operator::CustomResourceExt;
1919
use stackable_spark_k8s_crd::constants::{
2020
CONTROLLER_NAME, HISTORY_CONTROLLER_NAME, OPERATOR_NAME, POD_DRIVER_CONTROLLER_NAME,

rust/operator-binary/src/spark_k8s_controller.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ use std::{
66
vec,
77
};
88

9-
use stackable_operator::{product_config::writer::to_java_properties_string, time::Duration};
9+
use product_config::writer::to_java_properties_string;
10+
use stackable_operator::time::Duration;
1011
use stackable_spark_k8s_crd::{
1112
constants::*, s3logdir::S3LogDir, tlscerts, RoleConfig, SparkApplication, SparkApplicationRole,
1213
SparkContainer, SubmitConfig,
1314
};
1415

1516
use crate::product_logging::{self, resolve_vector_aggregator_address};
17+
use product_config::types::PropertyNameKind;
1618
use snafu::{OptionExt, ResultExt, Snafu};
1719
use stackable_operator::builder::resources::ResourceRequirementsBuilder;
1820
use stackable_operator::k8s_openapi::DeepMerge;
@@ -39,10 +41,9 @@ use stackable_operator::{
3941
ResourceExt,
4042
},
4143
logging::controller::ReconcilerError,
42-
product_config::types::PropertyNameKind,
4344
product_config_utils::ValidatedRoleConfigByPropertyKind,
4445
product_logging::{
45-
framework::{capture_shell_output, shutdown_vector_command, vector_container},
46+
framework::{capture_shell_output, create_vector_shutdown_file_command, vector_container},
4647
spec::{
4748
ConfigMapLogConfig, ContainerLogConfig, ContainerLogConfigChoice,
4849
CustomContainerLogConfig, Logging,
@@ -116,7 +117,7 @@ pub enum Error {
116117
},
117118
#[snafu(display("failed to serialize [{JVM_SECURITY_PROPERTIES_FILE}] for {}", role))]
118119
JvmSecurityProperties {
119-
source: stackable_operator::product_config::writer::PropertiesWriterError,
120+
source: product_config::writer::PropertiesWriterError,
120121
role: SparkApplicationRole,
121122
},
122123
#[snafu(display("failed to generate product config"))]
@@ -467,7 +468,7 @@ fn pod_template(
467468
[
468469
// Wait for Vector to gather the logs.
469470
"sleep 10",
470-
&shutdown_vector_command(VOLUME_MOUNT_PATH_LOG),
471+
&create_vector_shutdown_file_command(VOLUME_MOUNT_PATH_LOG),
471472
]
472473
.join("; "),
473474
);
@@ -713,7 +714,7 @@ fn spark_job(
713714
if job_config.logging.enable_vector_agent {
714715
// Wait for Vector to gather the logs.
715716
args.push("sleep 10".into());
716-
args.push(shutdown_vector_command(VOLUME_MOUNT_PATH_LOG));
717+
args.push(create_vector_shutdown_file_command(VOLUME_MOUNT_PATH_LOG));
717718
}
718719

719720
cb.image_from_product_image(spark_image)

0 commit comments

Comments
 (0)