Files
harmony/docs/catalogs/topologies.md
Ian Letourneau bb6b4b7f88
All checks were successful
Run Check Script / check (pull_request) Successful in 1m43s
docs: New docs structure & rustdoc for HostNetworkConfigScore
2025-11-13 18:42:26 -05:00

1.9 KiB

Topologies Catalog

A Topology is the logical representation of your infrastructure and its Capabilities. You select a Topology in your Harmony project to define where your Scores will be applied.

HAClusterTopology

  • HAClusterTopology::autoload()

This Topology represents a high-availability, bare-metal cluster. It is designed for production-grade deployments like OKD.

It models an environment consisting of:

  • At least 3 cluster nodes (for control plane/workers)
  • 2 redundant firewalls (e.g., OPNsense)
  • 2 redundant network switches

Provided Capabilities: This topology provides a rich set of capabilities required for bare-metal provisioning and cluster management, including:

  • K8sClient (once the cluster is bootstrapped)
  • DnsServer
  • LoadBalancer
  • DhcpServer
  • TftpServer
  • Router (via the firewalls)
  • Switch
  • NetworkManager (for host-level network config)

K8sAnywhereTopology

  • K8sAnywhereTopology::from_env()

This Topology is designed for development and application deployment. It provides a simple, abstract way to deploy to any Kubernetes cluster.

How it works:

  1. By default (from_env() with no env vars), it automatically provisions a local K3D (k3s-in-docker) cluster on your machine. This is perfect for local development and testing.
  2. If you provide a KUBECONFIG environment variable, it will instead connect to that existing Kubernetes cluster (e.g., your staging or production OKD cluster).

This allows you to use the exact same code to deploy your application locally as you do to deploy it to production.

Provided Capabilities:

  • K8sClient
  • HelmCommand
  • TenantManager
  • Ingress
  • Monitoring
  • ...and more.