From f319f74edf870c780aed76bbc864cfc10a0346e7 Mon Sep 17 00:00:00 2001 From: wjro Date: Wed, 14 Jan 2026 16:19:56 -0500 Subject: [PATCH] cargo fmt --- .../src/domain/topology/k8s_anywhere/k8s_anywhere.rs | 6 +----- harmony/src/modules/cert_manager/capability.rs | 4 +--- harmony/src/modules/cert_manager/mod.rs | 2 +- harmony/src/modules/cert_manager/score_create_cert.rs | 6 +++++- .../src/modules/cert_manager/score_create_issuer.rs | 11 ++++++++--- harmony/src/modules/cert_manager/score_operator.rs | 1 - 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/harmony/src/domain/topology/k8s_anywhere/k8s_anywhere.rs b/harmony/src/domain/topology/k8s_anywhere/k8s_anywhere.rs index dc50236..4760b2e 100644 --- a/harmony/src/domain/topology/k8s_anywhere/k8s_anywhere.rs +++ b/harmony/src/domain/topology/k8s_anywhere/k8s_anywhere.rs @@ -394,11 +394,7 @@ impl CertificateManagement for K8sAnywhereTopology { }; //TODO make this generic across k8s distributions using k8s family match k8s_client - .get_resource_json_value( - "cert-manager.openshift-operators", - None, - &gvk, - ) + .get_resource_json_value("cert-manager.openshift-operators", None, &gvk) .await { Ok(_ready) => Ok(PreparationOutcome::Success { diff --git a/harmony/src/modules/cert_manager/capability.rs b/harmony/src/modules/cert_manager/capability.rs index 0cad041..a280660 100644 --- a/harmony/src/modules/cert_manager/capability.rs +++ b/harmony/src/modules/cert_manager/capability.rs @@ -9,9 +9,7 @@ use crate::{ ///TODO rust doc explaining issuer, certificate etc #[async_trait] pub trait CertificateManagement: Send + Sync { - async fn install( - &self, - ) -> Result; + async fn install(&self) -> Result; async fn ensure_certificate_management_ready( &self, diff --git a/harmony/src/modules/cert_manager/mod.rs b/harmony/src/modules/cert_manager/mod.rs index 9b09876..d1ff660 100644 --- a/harmony/src/modules/cert_manager/mod.rs +++ b/harmony/src/modules/cert_manager/mod.rs @@ -3,7 +3,7 @@ pub mod cluster_issuer; pub mod crd; mod helm; pub mod operator; -pub mod score_operator; pub mod score_create_cert; pub mod score_create_issuer; +pub mod score_operator; pub use helm::*; diff --git a/harmony/src/modules/cert_manager/score_create_cert.rs b/harmony/src/modules/cert_manager/score_create_cert.rs index ceb109d..23e761b 100644 --- a/harmony/src/modules/cert_manager/score_create_cert.rs +++ b/harmony/src/modules/cert_manager/score_create_cert.rs @@ -47,7 +47,11 @@ impl Interpret for CertificateCreationIn topology: &T, ) -> Result { let _certificate = topology - .create_certificate(self.cert_name.clone(), self.issuer_name.clone(), &self.config) + .create_certificate( + self.cert_name.clone(), + self.issuer_name.clone(), + &self.config, + ) .await .map_err(|e| InterpretError::new(e.to_string()))?; diff --git a/harmony/src/modules/cert_manager/score_create_issuer.rs b/harmony/src/modules/cert_manager/score_create_issuer.rs index 7ccc548..447ddf6 100644 --- a/harmony/src/modules/cert_manager/score_create_issuer.rs +++ b/harmony/src/modules/cert_manager/score_create_issuer.rs @@ -3,9 +3,14 @@ use harmony_types::id::Id; use log::debug; use serde::Serialize; -use crate::{data::Version, interpret::{Interpret, InterpretError, InterpretName, InterpretStatus, Outcome}, inventory::Inventory, modules::cert_manager::capability::{CertificateManagement, CertificateManagementConfig}, score::Score, topology::Topology}; - - +use crate::{ + data::Version, + interpret::{Interpret, InterpretError, InterpretName, InterpretStatus, Outcome}, + inventory::Inventory, + modules::cert_manager::capability::{CertificateManagement, CertificateManagementConfig}, + score::Score, + topology::Topology, +}; #[derive(Debug, Clone, Serialize)] pub struct CertificateIssuerScore { diff --git a/harmony/src/modules/cert_manager/score_operator.rs b/harmony/src/modules/cert_manager/score_operator.rs index 61c2456..b13e085 100644 --- a/harmony/src/modules/cert_manager/score_operator.rs +++ b/harmony/src/modules/cert_manager/score_operator.rs @@ -40,7 +40,6 @@ impl Interpret for CertificateManagement inventory: &Inventory, topology: &T, ) -> Result { - topology .ensure_certificate_management_ready(&self.config) .await