Skip to content

Commit 3776f85

Browse files
committed
chore: clarify workflows and diagrams
Signed-off-by: Pau Capdevila <[email protected]>
1 parent fccedac commit 3776f85

File tree

1 file changed

+33
-25
lines changed

1 file changed

+33
-25
lines changed

docs/architecture/management.md

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ The installation of a Hedgehog Fabric deployment is carried out using Fabricator
66

77
In this workflow, the Kubernetes API Server processes the Fabric Custom Resources (CRs) and forwards them to the Fabric Controller. The Fabric Controller then translates these high-level network intents into concrete network configurations and manages their application to the underlying infrastructure. The Controller continuously monitors the state of the network resources, ensuring they match the desired state defined in the CRs.
88

9+
In this workflow, the user interacts with the Kubernetes API Server by creating or modifying Fabric Custom Resources (CRs). The Fabric Controller watches the Kubernetes API for changes to these CRs. Upon detecting a change, the Controller translates the high-level network intent into concrete configurations and applies them to the fabric switches.
10+
11+
The Controller continuously reconciles the actual network state with the desired state declared in the CRs, ensuring consistency and reliability across the fabric.
12+
913
The diagram below illustrates the general workflow for fabric management:
1014

1115
```mermaid
1216
graph TD
1317
14-
%% Define the nodes (General Workflow excludes Git & ArgoCD)
18+
%% Define the nodes
1519
User[User]
1620
Kubectl[kubectl]
17-
Fabricator[Fabricator]
1821
1922
%% Control Node components
2023
subgraph ControlNode["Control Node"]
@@ -26,14 +29,12 @@ end
2629
2730
%% Define the relationships
2831
Kubectl -.->|Direct kubectl commands| K8S
29-
User -.->|CLI| Fabricator
32+
User -.->|SSH Control| K9s
3033
User -.->|CLI| Kubectl
31-
Kubectl -.->|Plugin| KubectlFabric
32-
Fabricator -->|SSH access| K9s
33-
Fabricator -->|Applies CRs| K8S
34+
User -.->|SSH Control| KubectlFabric
3435
KubectlFabric -->|Interacts with| K8S
3536
K9s -->|UI Manages| K8S
36-
K8S -->|Sends CRDs| FC
37+
FC -->|Watches CRDs| K8S
3738
```
3839

3940
---
@@ -42,7 +43,6 @@ K8S -->|Sends CRDs| FC
4243

4344
### **User**
4445
- **Creates Fabric CR YAMLs** and applies them through standard Kubernetes resource management.
45-
- **Directly interacts with SONiC switches** via the Fabricator CLI.
4646
- **Uses [`kubectl`](https://kubernetes.io/docs/reference/kubectl/) and `kubectl fabric`** to interact with the Kubernetes API for fabric resource management.
4747

4848
### **Kubernetes API Server (K8S)**
@@ -53,7 +53,7 @@ K8S -->|Sends CRDs| FC
5353
- [`kubectl`](https://kubernetes.io/docs/reference/kubectl/) is the standard CLI tool for [Kubernetes](https://kubernetes.io).
5454
- `kubectl fabric` is a plugin that extends `kubectl` with fabric-specific commands and interacts with the Kubernetes API Server. It supports the following commands:
5555
- **vpc** – Manage VPCs: create, attach, peer, or wipe all related resources
56-
- **switch** – Manage switches: IP, SSH, serial, reboot, reinstall
56+
- **switch** – Manage switches: get IP, SSH, serial, reboot, reinstall
5757
- **connection** – View connections: management, fabric, vpc-loopback
5858
- **switchgroup** – Create SwitchGroups
5959
- **external** – Manage external BGP peers and VPC peering
@@ -81,36 +81,44 @@ K8S -->|Sends CRDs| FC
8181

8282
---
8383

84-
## **GitOps Functionality (ArgoCD)**
84+
## **GitOps Integration**
85+
86+
GitOps is a continuous deployment approach where the desired state of a Kubernetes cluster is stored in Git. A GitOps controller monitors this repository and ensures the actual cluster state matches the declared state, using the Kubernetes API.
87+
88+
Hedgehog Fabric is fully compatible with GitOps workflows and can be managed declaratively using any GitOps-compatible tool such as [ArgoCD](https://argo-cd.readthedocs.io/en/stable/) or [Flux](https://fluxcd.io).
8589

86-
GitOps workflows can be leveraged using [ArgoCD](https://argo-cd.readthedocs.io/en/stable/). This is an alternative approach to show that a Fabric can be used with industry standard tools seamlessly.
90+
- **User Responsibilities:**
91+
- Define Fabric Custom Resources (CRs) in YAML.
92+
- Commit and push these CRs to a [Git repository](https://git-scm.com) for version control and collaboration.
8793

88-
- **User Actions:**
89-
- The user **creates Fabric CR YAMLs** and pushes them to a [Git repository](https://git-scm.com) for version control.
90-
- **ArgoCD Actions:**
91-
- [ArgoCD](https://argo-cd.readthedocs.io/en/stable/) monitors the Git repository.
92-
- ArgoCD **pulls the CRs from Git** and applies them to [Kubernetes](https://kubernetes.io) via the Kubernetes API Server.
94+
- **GitOps Tool Responsibilities:**
95+
- Monitor the Git repository for updates.
96+
- Apply changes to the cluster automatically via the Kubernetes API Server.
97+
98+
This enables seamless integration of Hedgehog Fabric into modern CI/CD pipelines and Git-centric workflows.
9399

94100
```mermaid
95101
graph TD
96102
97-
%% Define the nodes (GitOps includes Git & ArgoCD)
98-
User[User]
103+
%% Define the nodes
104+
User[User]
99105
Kubectl[kubectl]
100-
Git[Git Repository]
101-
ArgoCD[ArgoCD]
102-
106+
Git[Git Repository]
107+
GitOps[GitOps]
103108
%% Control Node components
104109
subgraph ControlNode["Control Node"]
105110
K8S[Kubernetes API Server]
106111
FC[Fabric Controller]
107112
end
108-
109113
%% Define the relationships
110114
User -->|Fabric CR YAMLs| Git
111115
Kubectl -.->|Direct kubectl commands| K8S
112116
User -.->|CLI| Kubectl
113-
Git -.->|ArgoCD pulls| ArgoCD
114-
ArgoCD -->|Applies CRs| K8S
115-
K8S -->|Sends CRDs| FC
117+
Git -.->|GitOps pulls| GitOps
118+
GitOps -->|Applies CRs| K8S
119+
%% Keep rel with empty text to keep layout
120+
K8S -->| | FC
121+
FC -->|Watches CRDs| K8S
122+
%% Style the original arrow invisible
123+
linkStyle 5 stroke:none,fill:none;
116124
```

0 commit comments

Comments
 (0)