68 lines
1.5 KiB
Rust
68 lines
1.5 KiB
Rust
use std::{collections::HashMap, str::FromStr};
|
|
|
|
use harmony::{
|
|
inventory::Inventory,
|
|
modules::helm::chart::{HelmChartScore, HelmRepository, NonBlankString},
|
|
topology::K8sAnywhereTopology,
|
|
};
|
|
use harmony_macros::hurl;
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let values_yaml = Some(
|
|
r#"server:
|
|
standalone:
|
|
enabled: true
|
|
config: |
|
|
listener "tcp" {
|
|
tls_disable = true
|
|
address = "[::]:8200"
|
|
cluster_address = "[::]:8201"
|
|
}
|
|
|
|
storage "file" {
|
|
path = "/openbao/data"
|
|
}
|
|
|
|
service:
|
|
enabled: true
|
|
|
|
dataStorage:
|
|
enabled: true
|
|
size: 10Gi
|
|
storageClass: null
|
|
accessMode: ReadWriteOnce
|
|
|
|
auditStorage:
|
|
enabled: true
|
|
size: 10Gi
|
|
storageClass: null
|
|
accessMode: ReadWriteOnce"#
|
|
.to_string(),
|
|
);
|
|
let openbao = HelmChartScore {
|
|
namespace: Some(NonBlankString::from_str("openbao").unwrap()),
|
|
release_name: NonBlankString::from_str("openbao").unwrap(),
|
|
chart_name: NonBlankString::from_str("openbao/openbao").unwrap(),
|
|
chart_version: None,
|
|
values_overrides: None,
|
|
values_yaml,
|
|
create_namespace: true,
|
|
install_only: true,
|
|
repository: Some(HelmRepository::new(
|
|
"openbao".to_string(),
|
|
hurl!("https://openbao.github.io/openbao-helm"),
|
|
true,
|
|
)),
|
|
};
|
|
|
|
harmony_cli::run(
|
|
Inventory::autoload(),
|
|
K8sAnywhereTopology::from_env(),
|
|
vec![Box::new(openbao)],
|
|
None,
|
|
)
|
|
.await
|
|
.unwrap();
|
|
}
|