# wmde/wbaas-deploy architecture

> Architecture diagram of the GitHub repository wmde/wbaas-deploy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wmde/wbaas-deploy
- Repository: https://github.com/wmde/wbaas-deploy

## Overview

wbaas-deploy is infrastructure-as-code for Wikibase.Cloud’s production and development environments. The documented operator workflow uses OpenTofu and Helmfile, with scripts for deployment interaction; Helmfile deploys Helm charts to Kubernetes. The repository also includes Kubernetes job manifests, Argo CD configuration, local-development support, and monitoring and backup infrastructure. The README establishes only the broad tool and directory roles, so the graph avoids asserting connections between individual components whose implementation was not sampled.

Main entry points: [`k8s/helmfile/helmfile.yaml.gotmpl`](https://github.com/wmde/wbaas-deploy/blob/main/k8s/helmfile/helmfile.yaml.gotmpl) (Helmfile releases), [`tf/env`](https://github.com/wmde/wbaas-deploy/tree/main/tf/env) (OpenTofu environments), [`bin`](https://github.com/wmde/wbaas-deploy/tree/main/bin) (Deployment scripts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_infra["Cloud infrastructure"]
  node_opentofu["OpenTofu environments"]
  node_tfmodules["Infrastructure modules"]
  node_monitoring["Monitoring resources"]
end

subgraph group_kube["Kubernetes deployment"]
  node_helmfile["Helmfile releases"]
  node_envvalues["Environment values"]
  node_argocd["Argo CD config"]
  node_k8sjobs["Kubernetes jobs"]
end

subgraph group_ops["Operations tools"]
  node_opsbin["Deployment scripts"]
  node_backups["Backup procedures"]
end

subgraph group_local["Local development"]
  node_skaffold["Local development<br/>[skaffold.yaml]"]
  node_localenv["Local environment"]
end

node_operator(("Operator"))
node_cluster["Kubernetes"]

node_operator -->|"configures infrastructure"| node_opentofu
node_operator -->|"deploys releases"| node_helmfile
node_helmfile -->|"deploys Helm charts"| node_cluster
node_operator -->|"interacts with deployments"| node_opsbin

click node_opentofu "https://github.com/wmde/wbaas-deploy/tree/main/tf/env"
click node_tfmodules "https://github.com/wmde/wbaas-deploy/tree/main/tf/modules"
click node_helmfile "https://github.com/wmde/wbaas-deploy/blob/main/k8s/helmfile/helmfile.yaml.gotmpl"
click node_envvalues "https://github.com/wmde/wbaas-deploy/tree/main/k8s/helmfile/env"
click node_argocd "https://github.com/wmde/wbaas-deploy/tree/main/k8s/argocd"
click node_k8sjobs "https://github.com/wmde/wbaas-deploy/tree/main/k8s/jobs"
click node_opsbin "https://github.com/wmde/wbaas-deploy/tree/main/bin"
click node_backups "https://github.com/wmde/wbaas-deploy/tree/main/doc/backups"
click node_monitoring "https://github.com/wmde/wbaas-deploy/tree/main/tf/modules/monitoring"
click node_skaffold "https://github.com/wmde/wbaas-deploy/blob/main/skaffold/skaffold.yaml"
click node_localenv "https://github.com/wmde/wbaas-deploy/tree/main/tf/env/local"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_opentofu,node_tfmodules,node_monitoring toneBlue
class node_helmfile,node_envvalues,node_argocd,node_k8sjobs toneAmber
class node_opsbin,node_backups toneMint
class node_skaffold,node_localenv toneRose
class node_operator,node_cluster toneIndigo
```

## Components

### Cloud infrastructure

- [OpenTofu environments](https://github.com/wmde/wbaas-deploy/tree/main/tf/env): `tf/env`
- [Infrastructure modules](https://github.com/wmde/wbaas-deploy/tree/main/tf/modules): `tf/modules`
- [Monitoring resources](https://github.com/wmde/wbaas-deploy/tree/main/tf/modules/monitoring): `tf/modules/monitoring`

### Kubernetes deployment

- [Helmfile releases](https://github.com/wmde/wbaas-deploy/blob/main/k8s/helmfile/helmfile.yaml.gotmpl): `k8s/helmfile/helmfile.yaml.gotmpl`
- [Environment values](https://github.com/wmde/wbaas-deploy/tree/main/k8s/helmfile/env): `k8s/helmfile/env`
- [Argo CD config](https://github.com/wmde/wbaas-deploy/tree/main/k8s/argocd): `k8s/argocd`
- [Kubernetes jobs](https://github.com/wmde/wbaas-deploy/tree/main/k8s/jobs): `k8s/jobs`

### Operations tools

- [Deployment scripts](https://github.com/wmde/wbaas-deploy/tree/main/bin): `bin`
- [Backup procedures](https://github.com/wmde/wbaas-deploy/tree/main/doc/backups): `doc/backups`

### Local development

- [Local development](https://github.com/wmde/wbaas-deploy/blob/main/skaffold/skaffold.yaml): `skaffold/skaffold.yaml`
- [Local environment](https://github.com/wmde/wbaas-deploy/tree/main/tf/env/local): `tf/env/local`

### Other components

- **Operator**
- **Kubernetes**

## Connections

- Operator → OpenTofu environments: configures infrastructure (evidence: `README.md`)
- Operator → Helmfile releases: deploys releases (evidence: `README.md`)
- Helmfile releases → Kubernetes: deploys Helm charts (evidence: `README.md`)
- Operator → Deployment scripts: interacts with deployments (evidence: `README.md`)
