feat: added working examples to add self signed issuer and self signed certificate. modified get_resource_json_value to be able to get cluster scoped operators

This commit is contained in:
2026-01-14 16:18:59 -05:00
parent 25c5cd84fe
commit f576effeca
10 changed files with 217 additions and 30 deletions

View File

@@ -2,7 +2,9 @@ use harmony::{
inventory::Inventory,
modules::{
cert_manager::{
capability::CertificateManagementConfig, score_k8s::CertificateManagementScore,
capability::CertificateManagementConfig, score_create_cert::CertificateCreationScore,
score_create_issuer::CertificateIssuerScore,
score_operator::CertificateManagementScore,
},
postgresql::{PostgreSQLScore, capability::PostgreSQLConfig},
},
@@ -11,20 +13,32 @@ use harmony::{
#[tokio::main]
async fn main() {
let config = CertificateManagementConfig {
namespace: Some("test".to_string()),
acme_issuer: None,
ca_issuer: None,
self_signed: true,
};
let cert_manager = CertificateManagementScore {
config: CertificateManagementConfig {
name: todo!(),
namespace: todo!(),
acme_issuer: todo!(),
ca_issuer: todo!(),
self_signed: todo!(),
},
config: config.clone(),
};
let issuer = CertificateIssuerScore {
config: config.clone(),
issuer_name: "test-self-signed-issuer".to_string(),
};
let cert = CertificateCreationScore {
config: config.clone(),
cert_name: "test-self-signed-cert".to_string(),
issuer_name: "test-self-signed-issuer".to_string(),
};
harmony_cli::run(
Inventory::autoload(),
K8sAnywhereTopology::from_env(),
vec![Box::new(cert_manager)],
vec![Box::new(cert_manager), Box::new(issuer), Box::new(cert)],
None,
)
.await