Some checks failed
Run Check Script / check (pull_request) Failing after 33s
27 lines
793 B
Rust
27 lines
793 B
Rust
use harmony::{
|
|
inventory::Inventory,
|
|
modules::postgresql::{PostgreSQLScore, capability::PostgreSQLConfig},
|
|
topology::K8sAnywhereTopology,
|
|
};
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let postgresql = PostgreSQLScore {
|
|
config: PostgreSQLConfig {
|
|
cluster_name: "harmony-postgres-example".to_string(), // Override default name
|
|
namespace: "harmony-postgres-example".to_string(),
|
|
..Default::default() // Use harmony defaults, they are based on CNPG's default values :
|
|
// "default" namespace, 1 instance, 1Gi storage
|
|
},
|
|
};
|
|
|
|
harmony_cli::run(
|
|
Inventory::autoload(),
|
|
K8sAnywhereTopology::from_env(),
|
|
vec![Box::new(postgresql)],
|
|
None,
|
|
)
|
|
.await
|
|
.unwrap();
|
|
}
|