From 8209ae13a15f947db2c71e6c903098c120deafbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86gir=20M=C3=A1ni=20Hauksson?= <54936225+sourcehawk@users.noreply.github.com> Date: Wed, 8 Apr 2026 03:10:43 +0100 Subject: [PATCH] add mermaid diagram --- README.md | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f8a6cd5..5cb7b34 100644 --- a/README.md +++ b/README.md @@ -21,22 +21,40 @@ matters. --- -## Mental Model +## Architecture An operator built with this framework has two layers between the controller and raw Kubernetes objects: -``` -Controller - └─ Component - └─ Resource Primitive - └─ Kubernetes Object +```mermaid +graph TB + subgraph controller [" "] + R["⚪ Your Reconciler"] + end + + subgraph components [" "] + C1["🔵 Web Interface component"] + C2["🔵 Monitoring component"] + end + + subgraph primitives [" "] + P1["🟢 ConfigMap"] + P2["🟢 Deployment"] + P3["🟢 Service"] + P4["🟢 ServiceAccount"] + P5["🟢 DaemonSet"] + end + + subgraph cluster [" "] + K["⚪ Kubernetes API"] + end + + R --> C1 & C2 + C1 --> P1 & P2 & P3 + C2 --> P4 & P5 + P1 & P2 & P3 & P4 & P5 --> K ``` -| Layer | Responsibility | -| ---------------------- | --------------------------------------------------------------------------------------- | -| **Controller** | Determines which components should exist; orchestrates reconciliation at a high level | -| **Component** | Represents one logical feature; reconciles its resources and reports a single condition | -| **Resource Primitive** | Encapsulates desired state and lifecycle behavior for a single Kubernetes object | +> ⚪ What you already have   🔵 OCF component layer   🟢 OCF primitive layer ## Features