Skip to content

ADR-0002: Dual-Stack Architecture

Status: Accepted
Date: 2026-04-03
Deciders: danielscholl

OSDU has two deployment models on Azure: the Azure SPI implementation (which uses Azure PaaS services for data persistence and messaging) and the CIMPL community implementation (which runs all middleware in-cluster). Each model has trade-offs — SPI reduces operational burden via managed services but requires Azure-specific configuration, while CIMPL is cloud-agnostic and self-contained but requires managing stateful workloads. Supporting both on the same AKS cluster enables validation, comparison, and migration flexibility.

  • Need to validate CIMPL services against SPI services on the same cluster for functional comparison
  • Foundation operators (cert-manager, ECK, CNPG, ExternalDNS) are cluster-wide singletons — duplicating clusters for each model wastes resources
  • Each model requires different middleware: SPI uses Azure PaaS (CosmosDB, Service Bus, Storage), CIMPL uses in-cluster equivalents (PostgreSQL, RabbitMQ, MinIO, Keycloak)
  • Namespace-based isolation in Kubernetes provides sufficient workload separation
  1. Separate clusters per deployment model
  2. Single cluster with one deployment model only
  3. Single cluster with both models running side-by-side in isolated namespaces

Chosen option: Single cluster with both models side-by-side, because it maximizes resource sharing at the infrastructure and foundation layers while maintaining full isolation at the application layer via namespaces and Karpenter NodePools.

AspectSPI Stack (software/spi-stack/)CIMPL Stack (software/cimpl-stack/)
DatabaseAzure CosmosDB (SQL + Gremlin)In-cluster PostgreSQL (CNPG)
MessagingAzure Service BusIn-cluster RabbitMQ
Object StorageAzure StorageIn-cluster MinIO
Search/IndexIn-cluster Elasticsearch (ECK)In-cluster Elasticsearch (ECK)
CacheIn-cluster RedisIn-cluster Redis
WorkflowApache Airflow (Azure-backed DAG storage)Apache Airflow (MinIO-backed DAG storage)
Identity/AuthAzure Entra ID + Workload IdentityIn-cluster Keycloak
Secret ManagementAzure Key VaultKubernetes Secrets
Service DeploymentLocal Helm chart (osdu-spi-service)Upstream OSDU charts + Kustomize postrender
Namespacesplatform / osduplatform-cimpl / osdu-cimpl
  • Namespaces: Each stack gets its own platform-{id} and osdu-{id} namespaces
  • Karpenter NodePools: Dedicated node pools per stack with taints prevent cross-scheduling
  • Gateway API: Each stack manages its own HTTPRoutes with listener passthrough for shared Gateway resources
  • Terraform State: Each stack is a separate Terraform root module with independent state
  • Good: Functional comparison between SPI and CIMPL is possible on a single cluster
  • Good: Infrastructure and foundation layers are shared, reducing cost and management
  • Good: Either stack can be deployed independently — the other is not required
  • Good: Namespace isolation prevents resource naming conflicts
  • Bad: Total cluster resource consumption increases when both stacks run simultaneously
  • Bad: Gateway routing must coordinate across stacks via listener passthrough