# konradjed/patroni-postgres-cluster architecture

> Architecture diagram of the GitHub repository konradjed/patroni-postgres-cluster, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/konradjed/patroni-postgres-cluster
- Repository: https://github.com/konradjed/patroni-postgres-cluster

## Overview

This repository appears to provide Ansible automation for preparing a Patroni/PostgreSQL cluster and MinIO storage. The tree identifies cluster setup, host preparation, database security and backup tasks, plus monitoring and secrets-related templates. The README contains only the project name, and no source excerpts were supplied, so the task and playbook names suggest capabilities but do not establish call or dispatch relationships. The graph therefore shows the main product areas without speculative edges.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Automation entrypoints"]
  node_cluster_playbook["Create cluster<br/>[create_cluster.yml]"]
  node_minio_playbook["Create MinIO<br/>[create_minio.yml]"]
end

subgraph group_cluster["PostgreSQL cluster"]
  node_patroni_role["Cluster role"]
  node_host_prep["Host preparation<br/>[prepare_hosts.yml]"]
  node_patroni_setup["Patroni setup<br/>[patroni.yml]"]
  node_etcd_setup["etcd setup<br/>[etcd.yml]"]
  node_disk_security["Volume encryption<br/>[luks2.yml]"]
  node_tde_setup["Postgres TDE<br/>[pg_tde.yml]"]
  node_backup_setup["Backup setup<br/>[backup.yml]"]
  node_status_check["Status checks<br/>[check_status.yml]"]
end

subgraph group_storage["MinIO storage"]
  node_minio_role["MinIO role"]
  node_bucket_setup["Bucket creation<br/>[create_bucket.yml]"]
end

subgraph group_support["Configuration and operations"]
  node_inventory["Inventory and variables"]
  node_cluster_templates["Cluster templates"]
  node_minio_defaults["MinIO defaults<br/>[main.yml]"]
  node_cluster_config["Ansible configuration<br/>[ansible.cfg]"]
end

node_operator(("Operator"))

click node_cluster_playbook "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/playbooks/create_cluster.yml"
click node_minio_playbook "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/playbooks/create_minio.yml"
click node_patroni_role "https://github.com/konradjed/patroni-postgres-cluster/tree/main/ansible/roles/patroni_create/tasks"
click node_host_prep "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/prepare_hosts.yml"
click node_patroni_setup "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/patroni.yml"
click node_etcd_setup "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/etcd.yml"
click node_disk_security "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/luks2.yml"
click node_tde_setup "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/pg_tde.yml"
click node_backup_setup "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/backup.yml"
click node_status_check "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/check_status.yml"
click node_minio_role "https://github.com/konradjed/patroni-postgres-cluster/tree/main/ansible/roles/minio/tasks"
click node_bucket_setup "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/minio/tasks/create_bucket.yml"
click node_inventory "https://github.com/konradjed/patroni-postgres-cluster/tree/main/ansible/inventory"
click node_cluster_templates "https://github.com/konradjed/patroni-postgres-cluster/tree/main/ansible/roles/patroni_create/templates"
click node_minio_defaults "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/minio/defaults/main.yml"
click node_cluster_config "https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/ansible.cfg"

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_cluster_playbook,node_minio_playbook toneBlue
class node_patroni_role,node_host_prep,node_patroni_setup,node_etcd_setup,node_disk_security,node_tde_setup,node_backup_setup,node_status_check toneAmber
class node_minio_role,node_bucket_setup toneMint
class node_inventory,node_cluster_templates,node_minio_defaults,node_cluster_config toneRose
class node_operator toneIndigo
```

## Components

### Automation entrypoints

- [Create cluster](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/playbooks/create_cluster.yml): `ansible/playbooks/create_cluster.yml`
- [Create MinIO](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/playbooks/create_minio.yml): `ansible/playbooks/create_minio.yml`

### PostgreSQL cluster

- [Cluster role](https://github.com/konradjed/patroni-postgres-cluster/tree/main/ansible/roles/patroni_create/tasks): `ansible/roles/patroni_create/tasks`
- [Host preparation](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/prepare_hosts.yml): `ansible/roles/patroni_create/tasks/prepare_hosts.yml`
- [Patroni setup](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/patroni.yml): `ansible/roles/patroni_create/tasks/patroni.yml`
- [etcd setup](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/etcd.yml): `ansible/roles/patroni_create/tasks/etcd.yml`
- [Volume encryption](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/luks2.yml): `ansible/roles/patroni_create/tasks/luks2.yml`
- [Postgres TDE](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/pg_tde.yml): `ansible/roles/patroni_create/tasks/pg_tde.yml`
- [Backup setup](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/backup.yml): `ansible/roles/patroni_create/tasks/backup.yml`
- [Status checks](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/patroni_create/tasks/check_status.yml): `ansible/roles/patroni_create/tasks/check_status.yml`

### MinIO storage

- [MinIO role](https://github.com/konradjed/patroni-postgres-cluster/tree/main/ansible/roles/minio/tasks): `ansible/roles/minio/tasks`
- [Bucket creation](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/minio/tasks/create_bucket.yml): `ansible/roles/minio/tasks/create_bucket.yml`

### Configuration and operations

- [Inventory and variables](https://github.com/konradjed/patroni-postgres-cluster/tree/main/ansible/inventory): `ansible/inventory`
- [Cluster templates](https://github.com/konradjed/patroni-postgres-cluster/tree/main/ansible/roles/patroni_create/templates): `ansible/roles/patroni_create/templates`
- [MinIO defaults](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/roles/minio/defaults/main.yml): `ansible/roles/minio/defaults/main.yml`
- [Ansible configuration](https://github.com/konradjed/patroni-postgres-cluster/blob/main/ansible/ansible.cfg): `ansible/ansible.cfg`

### Other components

- **Operator**
