Skip to content
Open
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
2 changes: 1 addition & 1 deletion Cargo.nix

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resolver = "2"
version = "0.0.0-dev"
authors = ["Stackable GmbH <info@stackable.tech>"]
license = "OSL-3.0"
edition = "2021"
edition = "2024"
repository = "https://github.com/stackabletech/nifi-operator"

[workspace.dependencies]
Expand Down
20 changes: 10 additions & 10 deletions rust/operator-binary/src/config/jvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
23 changes: 11 additions & 12 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,26 +625,25 @@ 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,
&authentication_config,
&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
Expand Down
10 changes: 5 additions & 5 deletions rust/operator-binary/src/reporting_task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
2 changes: 1 addition & 1 deletion rust/operator-binary/src/webhooks/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down