Compare commits

..

1 Commits

Author SHA1 Message Date
1b19638df4 wip(failover): Started implementation of the FailoverTopology with PostgreSQL capability
All checks were successful
Run Check Script / check (pull_request) Successful in 1m32s
This is our first Higher Order Topology (see ADR-015)
2025-12-10 21:15:51 -05:00
10 changed files with 24 additions and 13 deletions

15
Cargo.lock generated
View File

@@ -1835,6 +1835,21 @@ dependencies = [
"url", "url",
] ]
[[package]]
name = "example-operatorhub-catalogsource"
version = "0.1.0"
dependencies = [
"cidr",
"env_logger",
"harmony",
"harmony_cli",
"harmony_macros",
"harmony_types",
"log",
"tokio",
"url",
]
[[package]] [[package]]
name = "example-opnsense" name = "example-opnsense"
version = "0.1.0" version = "0.1.0"

View File

@@ -3,13 +3,12 @@ use std::str::FromStr;
use harmony::{ use harmony::{
inventory::Inventory, inventory::Inventory,
modules::{k8s::apps::OperatorHubCatalogSourceScore, tenant::TenantScore}, modules::{k8s::apps::OperatorHubCatalogSourceScore, tenant::TenantScore},
topology::{tenant::TenantConfig, K8sAnywhereTopology}, topology::{K8sAnywhereTopology, tenant::TenantConfig},
}; };
use harmony_types::id::Id; use harmony_types::id::Id;
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
let operatorhub_catalog = OperatorHubCatalogSourceScore::default(); let operatorhub_catalog = OperatorHubCatalogSourceScore::default();
harmony_cli::run( harmony_cli::run(

View File

@@ -1,6 +1,6 @@
mod failover;
mod ha_cluster; mod ha_cluster;
pub mod ingress; pub mod ingress;
mod failover;
pub use failover::*; pub use failover::*;
use harmony_types::net::IpAddress; use harmony_types::net::IpAddress;
mod host_binding; mod host_binding;

View File

@@ -1,4 +1,2 @@
mod catalogsources_operators_coreos_com; mod catalogsources_operators_coreos_com;
pub use catalogsources_operators_coreos_com::*; pub use catalogsources_operators_coreos_com::*;

View File

@@ -1,4 +1,3 @@
mod operatorhub; mod operatorhub;
pub use operatorhub::*; pub use operatorhub::*;
pub mod crd; pub mod crd;

View File

@@ -1,5 +1,5 @@
pub mod apps;
pub mod deployment; pub mod deployment;
pub mod ingress; pub mod ingress;
pub mod namespace; pub mod namespace;
pub mod resource; pub mod resource;
pub mod apps;

View File

@@ -13,8 +13,8 @@ pub mod load_balancer;
pub mod monitoring; pub mod monitoring;
pub mod okd; pub mod okd;
pub mod opnsense; pub mod opnsense;
pub mod postgresql;
pub mod prometheus; pub mod prometheus;
pub mod storage; pub mod storage;
pub mod tenant; pub mod tenant;
pub mod tftp; pub mod tftp;
pub mod postgresql;

View File

@@ -18,7 +18,10 @@ pub trait PostgreSQL: Send + Sync {
/// Returns None if no public endpoint (internal-only cluster). /// Returns None if no public endpoint (internal-only cluster).
/// UNSTABLE: This is opinionated for initial multisite use cases. Networking abstraction is complex /// UNSTABLE: This is opinionated for initial multisite use cases. Networking abstraction is complex
/// (cf. k8s Ingress -> Gateway API evolution); may move to higher-order Networking/PostgreSQLNetworking trait. /// (cf. k8s Ingress -> Gateway API evolution); may move to higher-order Networking/PostgreSQLNetworking trait.
async fn get_public_endpoint(&self, cluster_name: &str) -> Result<Option<PostgreSQLEndpoint>, String>; async fn get_public_endpoint(
&self,
cluster_name: &str,
) -> Result<Option<PostgreSQLEndpoint>, String>;
} }
#[derive(Clone, Debug, Serialize)] #[derive(Clone, Debug, Serialize)]

View File

@@ -1,7 +1,4 @@
pub mod capability; pub mod capability;
mod score; mod score;
pub mod failover; pub mod failover;

View File

@@ -1,4 +1,4 @@
pub mod id; pub mod id;
pub mod net; pub mod net;
pub mod switch;
pub mod storage; pub mod storage;
pub mod switch;