cargo fmt
All checks were successful
Run Check Script / check (pull_request) Successful in 1m46s

This commit is contained in:
2026-01-14 16:19:56 -05:00
parent f576effeca
commit f319f74edf
6 changed files with 16 additions and 14 deletions

View File

@@ -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 {

View File

@@ -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<PreparationOutcome, PreparationError>;
async fn install(&self) -> Result<PreparationOutcome, PreparationError>;
async fn ensure_certificate_management_ready(
&self,

View File

@@ -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::*;

View File

@@ -47,7 +47,11 @@ impl<T: Topology + CertificateManagement> Interpret<T> for CertificateCreationIn
topology: &T,
) -> Result<Outcome, InterpretError> {
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()))?;

View File

@@ -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 {

View File

@@ -40,7 +40,6 @@ impl<T: Topology + CertificateManagement> Interpret<T> for CertificateManagement
inventory: &Inventory,
topology: &T,
) -> Result<Outcome, InterpretError> {
topology
.ensure_certificate_management_ready(&self.config)
.await