This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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()))?;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user