Skip to content

chore: Update to stackable-operator 0.95.0 #887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
885 changes: 447 additions & 438 deletions Cargo.lock

Large diffs are not rendered by default.

1,979 changes: 1,159 additions & 820 deletions Cargo.nix

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ repository = "https://github.com/stackabletech/kafka-operator"

[workspace.dependencies]
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.7.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.94.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.95.0" }

anyhow = "1.0"
built = { version = "0.8", features = ["chrono", "git2"] }
clap = "4.5"
const_format = "0.2"
futures = "0.3"
indoc = "2.0"
rstest = "0.25"
rstest = "0.26"
semver = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
14 changes: 7 additions & 7 deletions crate-hashes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/operator-binary/src/crd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ use stackable_operator::{
product_logging::{self, spec::Logging},
role_utils::{GenericRoleConfig, JavaCommonConfig, Role, RoleGroup, RoleGroupRef},
schemars::{self, JsonSchema},
shared::time::Duration,
status::condition::{ClusterCondition, HasStatusCondition},
time::Duration,
utils::cluster_info::KubernetesClusterInfo,
versioned::versioned,
};
Expand Down
2 changes: 1 addition & 1 deletion rust/operator-binary/src/crd/security.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use stackable_operator::{
product_logging::framework::{
create_vector_shutdown_file_command, remove_vector_shutdown_file_command,
},
time::Duration,
shared::time::Duration,
utils::COMMON_BASH_TRAP_FUNCTIONS,
};

Expand Down
24 changes: 16 additions & 8 deletions rust/operator-binary/src/kafka_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ use stackable_operator::{
},
cluster_resources::{ClusterResourceApplyStrategy, ClusterResources},
commons::{
opa::OpaApiVersion, product_image_selection::ResolvedProductImage,
opa::OpaApiVersion,
product_image_selection::{self, ResolvedProductImage},
rbac::build_rbac_resources,
},
crd::{authentication::core, listener},
Expand Down Expand Up @@ -62,11 +63,11 @@ use stackable_operator::{
},
},
role_utils::{GenericRoleConfig, RoleGroupRef},
shared::time::Duration,
status::condition::{
compute_conditions, operations::ClusterOperationsConditionBuilder,
statefulset::StatefulSetConditionBuilder,
},
time::Duration,
utils::cluster_info::KubernetesClusterInfo,
};
use strum::{EnumDiscriminants, IntoStaticStr};
Expand Down Expand Up @@ -342,6 +343,11 @@ pub enum Error {

#[snafu(display("failed to construct JVM arguments"))]
ConstructJvmArguments { source: crate::config::jvm::Error },

#[snafu(display("failed to resolve product image"))]
ResolveProductImage {
source: product_image_selection::Error,
},
}
type Result<T, E = Error> = std::result::Result<T, E>;

Expand Down Expand Up @@ -408,6 +414,7 @@ impl ReconcilerError for Error {
Error::FailedToValidateAuthenticationMethod { .. } => None,
Error::InvalidKafkaCluster { .. } => None,
Error::ConstructJvmArguments { .. } => None,
Error::ResolveProductImage { .. } => None,
}
}
}
Expand All @@ -430,7 +437,8 @@ pub async fn reconcile_kafka(
let resolved_product_image = kafka
.spec
.image
.resolve(DOCKER_IMAGE_BASE_NAME, crate::built_info::PKG_VERSION);
.resolve(DOCKER_IMAGE_BASE_NAME, crate::built_info::PKG_VERSION)
.context(ResolveProductImageSnafu)?;

let mut cluster_resources = ClusterResources::new(
APP_NAME,
Expand Down Expand Up @@ -649,7 +657,7 @@ pub fn build_broker_rolegroup_bootstrap_listener(
.with_recommended_labels(build_recommended_labels(
kafka,
KAFKA_CONTROLLER_NAME,
&resolved_product_image.app_version_label,
&resolved_product_image.app_version_label_value,
&rolegroup.role,
&rolegroup.role_group,
))
Expand Down Expand Up @@ -707,7 +715,7 @@ fn build_broker_rolegroup_config_map(
.with_recommended_labels(build_recommended_labels(
kafka,
KAFKA_CONTROLLER_NAME,
&resolved_product_image.app_version_label,
&resolved_product_image.app_version_label_value,
&rolegroup.role,
&rolegroup.role_group,
))
Expand Down Expand Up @@ -764,7 +772,7 @@ fn build_broker_rolegroup_service(
.with_recommended_labels(build_recommended_labels(
kafka,
KAFKA_CONTROLLER_NAME,
&resolved_product_image.app_version_label,
&resolved_product_image.app_version_label_value,
&rolegroup.role,
&rolegroup.role_group,
))
Expand Down Expand Up @@ -813,7 +821,7 @@ fn build_broker_rolegroup_statefulset(
let recommended_object_labels = build_recommended_labels(
kafka,
KAFKA_CONTROLLER_NAME,
&resolved_product_image.app_version_label,
&resolved_product_image.app_version_label_value,
&rolegroup_ref.role,
&rolegroup_ref.role_group,
);
Expand Down Expand Up @@ -1134,7 +1142,7 @@ fn build_broker_rolegroup_statefulset(
.with_recommended_labels(build_recommended_labels(
kafka,
KAFKA_CONTROLLER_NAME,
&resolved_product_image.app_version_label,
&resolved_product_image.app_version_label_value,
&rolegroup_ref.role,
&rolegroup_ref.role_group,
))
Expand Down
11 changes: 5 additions & 6 deletions rust/operator-binary/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ async fn main() -> anyhow::Result<()> {
ProductOperatorRun {
product_config,
watch_namespace,
telemetry_arguments,
cluster_info_opts,
operator_environment: _,
telemetry,
cluster_info,
},
..
}) => {
// NOTE (@NickLarsenNZ): Before stackable-telemetry was used:
// - The console log level was set by `KAFKA_OPERATOR_LOG`, and is now `CONSOLE_LOG` (when using Tracing::pre_configured).
// - The file log level was set by `KAFKA_OPERATOR_LOG`, and is now set via `FILE_LOG` (when using Tracing::pre_configured).
// - The file log directory was set by `KAFKA_OPERATOR_LOG_DIRECTORY`, and is now set by `ROLLING_LOGS_DIR` (or via `--rolling-logs <DIRECTORY>`).
let _tracing_guard =
Tracing::pre_configured(built_info::PKG_NAME, telemetry_arguments).init()?;
let _tracing_guard = Tracing::pre_configured(built_info::PKG_NAME, telemetry).init()?;

tracing::info!(
built_info.pkg_version = built_info::PKG_VERSION,
Expand All @@ -104,8 +104,7 @@ async fn main() -> anyhow::Result<()> {
"/etc/stackable/kafka-operator/config-spec/properties.yaml",
])?;
let client =
client::initialize_operator(Some(OPERATOR_NAME.to_string()), &cluster_info_opts)
.await?;
client::initialize_operator(Some(OPERATOR_NAME.to_string()), &cluster_info).await?;
create_controller(client, product_config, watch_namespace).await;
}
};
Expand Down
Loading