diff --git a/Cargo.nix b/Cargo.nix index cf857536..3baa6901 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -9991,7 +9991,7 @@ rec { "stackable-nifi-operator" = rec { crateName = "stackable-nifi-operator"; version = "0.0.0-dev"; - edition = "2021"; + edition = "2024"; crateBin = [ { name = "stackable-nifi-operator"; diff --git a/Cargo.toml b/Cargo.toml index 7ad6543a..bd12d391 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ resolver = "2" version = "0.0.0-dev" authors = ["Stackable GmbH "] license = "OSL-3.0" -edition = "2021" +edition = "2024" repository = "https://github.com/stackabletech/nifi-operator" [workspace.dependencies] diff --git a/rust/operator-binary/src/config/jvm.rs b/rust/operator-binary/src/config/jvm.rs index 22bb4f9d..af0aedc1 100644 --- a/rust/operator-binary/src/config/jvm.rs +++ b/rust/operator-binary/src/config/jvm.rs @@ -93,16 +93,16 @@ pub fn build_merged_jvm_config( // respects these JVM-wide SSL system properties. So there is no plugin-level configuration // available for truststore settings. This was last checked for version 1.7.0 of the Styra // OPA Java SDK. - if let Some(authz_config) = authorization_config { - if authz_config.has_opa_tls() { - jvm_args.push(format!( - "-Djavax.net.ssl.trustStore={STACKABLE_SERVER_TLS_DIR}/truststore.p12" - )); - jvm_args.push(format!( - "-Djavax.net.ssl.trustStorePassword={STACKABLE_TLS_STORE_PASSWORD}" - )); - jvm_args.push("-Djavax.net.ssl.trustStoreType=pkcs12".to_owned()); - } + if let Some(authz_config) = authorization_config + && authz_config.has_opa_tls() + { + jvm_args.push(format!( + "-Djavax.net.ssl.trustStore={STACKABLE_SERVER_TLS_DIR}/truststore.p12" + )); + jvm_args.push(format!( + "-Djavax.net.ssl.trustStorePassword={STACKABLE_TLS_STORE_PASSWORD}" + )); + jvm_args.push("-Djavax.net.ssl.trustStoreType=pkcs12".to_owned()); } let operator_generated = JvmArgumentOverrides::new_with_only_additions(jvm_args); diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index a2b0cd52..c5194be6 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -625,8 +625,8 @@ pub async fn reconcile_nifi( } // Only add the reporting task in case it is enabled. - if nifi.spec.cluster_config.create_reporting_task_job.enabled { - if let Some((reporting_task_job, reporting_task_service)) = build_maybe_reporting_task( + if nifi.spec.cluster_config.create_reporting_task_job.enabled + && let Some((reporting_task_job, reporting_task_service)) = build_maybe_reporting_task( nifi, &resolved_product_image, &client.kubernetes_cluster_info, @@ -634,17 +634,16 @@ pub async fn reconcile_nifi( &rbac_sa.name_any(), ) .context(ReportingTaskSnafu)? - { - cluster_resources - .add(client, reporting_task_service) - .await - .context(ApplyCreateReportingTaskServiceSnafu)?; + { + cluster_resources + .add(client, reporting_task_service) + .await + .context(ApplyCreateReportingTaskServiceSnafu)?; - cluster_resources - .add(client, reporting_task_job) - .await - .context(ApplyCreateReportingTaskJobSnafu)?; - } + cluster_resources + .add(client, reporting_task_job) + .await + .context(ApplyCreateReportingTaskJobSnafu)?; } // Remove any orphaned resources that still exist in k8s, but have not been added to diff --git a/rust/operator-binary/src/reporting_task/mod.rs b/rust/operator-binary/src/reporting_task/mod.rs index cdee4c54..730f3b62 100644 --- a/rust/operator-binary/src/reporting_task/mod.rs +++ b/rust/operator-binary/src/reporting_task/mod.rs @@ -191,11 +191,11 @@ fn get_reporting_task_service_selector_pod(nifi: &v1alpha1::NifiCluster) -> Resu selector_role_group = Some(role_group_name); } - if let Some(replicas) = role_group.replicas { - if replicas > 0 { - selector_role_group = Some(role_group_name); - break; - } + if let Some(replicas) = role_group.replicas + && replicas > 0 + { + selector_role_group = Some(role_group_name); + break; } } diff --git a/rust/operator-binary/src/webhooks/conversion.rs b/rust/operator-binary/src/webhooks/conversion.rs index 37aadf2b..6981ae86 100644 --- a/rust/operator-binary/src/webhooks/conversion.rs +++ b/rust/operator-binary/src/webhooks/conversion.rs @@ -40,7 +40,7 @@ pub async fn create_webhook_server( field_manager: FIELD_MANAGER.to_owned(), }; - let (conversion_webhook, _initial_reconcile_rx) = + let (conversion_webhook, _) = ConversionWebhook::new(crds_and_handlers, client, conversion_webhook_options); let webhook_server_options = WebhookServerOptions {