-
Notifications
You must be signed in to change notification settings - Fork 8
(architecture): add Fabric Management page #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
83d1e38
2a88681
fccedac
3776f85
1c2857f
cc32af6
7c25e26
2a57442
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
nav: | ||
- Overview: overview.md | ||
- Fabric Management: management.md | ||
- Fabric Implementation: fabric.md | ||
- ... |
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,127 @@ | ||||||||||||
# Fabric Management | ||||||||||||
|
||||||||||||
This section focuses on operational aspects of Hedgehog Fabric, explaining available tools and typical workflows for administrators. It builds upon the architectural concepts explained in the [Overview](overview.md). | ||||||||||||
|
||||||||||||
The installation of a Hedgehog Fabric deployment is carried out using Fabricator (hhfab CLI). Once deployed, ongoing operations are managed via the [Kubernetes](https://kubernetes.io) CLI, [`kubectl`](https://kubernetes.io/docs/reference/kubectl/). | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
For consistency with kubectl formatting. |
||||||||||||
|
||||||||||||
In this workflow, the Kubernetes API Server stores and serves the Fabric Custom Resources (CRs), which define high-level network intents. The Fabric Controller watches the API for changes to these CRs, translates them into concrete network configurations, and applies them to the underlying infrastructure. The Controller continuously monitors the actual state of the network resources to ensure they match the desired state defined in the CRs. | ||||||||||||
|
||||||||||||
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. | ||||||||||||
|
||||||||||||
The Controller continuously reconciles the actual network state with the desired state declared in the CRs, ensuring consistency and reliability across the fabric. | ||||||||||||
|
||||||||||||
The diagram below illustrates the general workflow for fabric management: | ||||||||||||
|
||||||||||||
```mermaid | ||||||||||||
graph TD | ||||||||||||
|
||||||||||||
%% Define the nodes | ||||||||||||
User[User] | ||||||||||||
Kubectl[kubectl] | ||||||||||||
|
||||||||||||
%% Control Node components | ||||||||||||
subgraph ControlNode["Control Node"] | ||||||||||||
K8S[Kubernetes API Server] | ||||||||||||
FC[Fabric Controller] | ||||||||||||
K9s[K9s] | ||||||||||||
KubectlK3s[kubectl] | ||||||||||||
KubectlFabric["kubectl fabric"] | ||||||||||||
end | ||||||||||||
|
||||||||||||
%% Define the relationships | ||||||||||||
Kubectl -.->|Sends CRs and queries| K8S | ||||||||||||
KubectlK3s -.->|Sends CRs and queries| K8S | ||||||||||||
KubectlK3s -.->|Invokes| KubectlFabric | ||||||||||||
User -.->|SSH Control| KubectlK3s | ||||||||||||
User -.->|SSH Control| K9s | ||||||||||||
User -.->|CLI| Kubectl | ||||||||||||
KubectlFabric -->|Applies/inspects CRs| K8S | ||||||||||||
K9s -->|Reads/writes CRs via API| K8S | ||||||||||||
FC -->|Watches CRs| K8S | ||||||||||||
``` | ||||||||||||
|
||||||||||||
--- | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (why the rule?) |
||||||||||||
|
||||||||||||
## Management Workflow Overview | ||||||||||||
|
||||||||||||
### User | ||||||||||||
- **Creates Fabric CR YAMLs** and applies them through standard Kubernetes resource management. | ||||||||||||
- **Uses [`kubectl`](https://kubernetes.io/docs/reference/kubectl/) and `kubectl fabric`** to interact with the Kubernetes API for fabric resource management. | ||||||||||||
- Can use their **own `kubectl` installation** or the one pre-installed on the control node as part of [k3s](https://k3s.io). | ||||||||||||
|
||||||||||||
### Kubernetes API Server (K8S) | ||||||||||||
- Part of [Kubernetes](https://kubernetes.io). | ||||||||||||
- Manages Fabric Custom Resources (CRs) and interacts with the **Fabric Controller**. | ||||||||||||
|
||||||||||||
### kubectl & kubectl fabric | ||||||||||||
- [`kubectl`](https://kubernetes.io/docs/reference/kubectl/) is the standard CLI tool for [Kubernetes](https://kubernetes.io). | ||||||||||||
Comment on lines
+49
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: I wouldn't keep all the web links to kubectl, k3s, Kubernetes this far down in the document, I find them more distracting than useful. Having them mentioned at the top is enough. Seeing the link to “k3s”, I'd rather expect it to link to a section of our docs that tells how k3s is used and what for, rather than to redirect me to the k3s website. |
||||||||||||
- `kubectl fabric` is a plugin that extends `kubectl` with fabric-specific commands and interacts with the Kubernetes API Server. It supports the following commands: | ||||||||||||
- **vpc** – Manage VPCs: create, attach, peer, or wipe all related resources | ||||||||||||
- **switch** – Manage switches: get IP, SSH, serial, reboot, reinstall | ||||||||||||
- **connection** – View connections: management, fabric, vpc-loopback | ||||||||||||
- **switchgroup** – Create SwitchGroups | ||||||||||||
- **external** – Manage external BGP peers and VPC peering | ||||||||||||
- **wiring** – Export fabric wiring diagrams | ||||||||||||
- **inspect** – Inspect and troubleshoot fabric resources: | ||||||||||||
- `fabric` – Overview of control nodes and switches | ||||||||||||
- `switch`, `port` – Status, counters, and usage | ||||||||||||
- `server`, `connection` – VPC/external attachments and link details | ||||||||||||
- `vpc` – Subnet attachments and reachability | ||||||||||||
- `bgp`, `lldp` – Neighbor status checks | ||||||||||||
- `ip`, `mac` – Lookup usage across the fabric | ||||||||||||
- `access` – Check reachability between VPCs, servers, and IPs | ||||||||||||
Comment on lines
+59
to
+72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a mix between the architectural description (rest of the doc) and a command reference. Do we need these here to understand the operational aspects? Should it link to a command reference instead? |
||||||||||||
|
||||||||||||
### Fabricator | ||||||||||||
- Using the **hhfab** CLI you can **SSH** the control node and use **K9s** or **kubectl** and **kubectl fabric** to manage or monitor Fabric API objects. | ||||||||||||
Comment on lines
+74
to
+75
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for a list?
Suggested change
|
||||||||||||
|
||||||||||||
### K9s | ||||||||||||
- K9s is a terminal based Kubernetes UI that provides visibility and control over Kubernetes resources, allowing you to manage pods, nodes, services, logs, and Fabric resources efficiently. It includes some helper plugins: | ||||||||||||
Comment on lines
+77
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for level-1 list?
Suggested change
Comment on lines
+77
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'd mention they're specific to the Open Network Fabric (to make it explicit it's not some random plug-ins available on the web that we've only packaged). |
||||||||||||
- **SSH** – SSH into a fabric switch | ||||||||||||
- **Serial** – Open a serial connection to a fabric switch | ||||||||||||
- **Reboot** – Reboot a fabric switch | ||||||||||||
- **Power Reset** Perform a power reset on a fabric switch in the NOS | ||||||||||||
- **Reinstall** – Reinstall a fabric switch | ||||||||||||
|
||||||||||||
--- | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Why the rule?) |
||||||||||||
|
||||||||||||
## GitOps Integration | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might deserve a one-line transition to better tie it to the rest of the document? I don't know, maybe something like: “Given that the Fabric configuration heavily relies on Custom Definitions, users often rely on Git-centric workflows to manage them. GitOps is ...” |
||||||||||||
|
||||||||||||
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. | ||||||||||||
|
||||||||||||
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). | ||||||||||||
|
||||||||||||
- **User Responsibilities:** | ||||||||||||
- Define Fabric Custom Resources (CRs) in YAML. | ||||||||||||
- Commit and push these CRs to a [Git repository](https://git-scm.com) for version control and collaboration. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really need to provide a link for Git? 😄 |
||||||||||||
|
||||||||||||
- **GitOps Tool Responsibilities:** | ||||||||||||
- Monitor the Git repository for updates. | ||||||||||||
- Apply changes to the cluster automatically via the Kubernetes API Server. | ||||||||||||
|
||||||||||||
This enables seamless integration of Hedgehog Fabric into modern CI/CD pipelines and Git-centric workflows. | ||||||||||||
|
||||||||||||
```mermaid | ||||||||||||
graph TD | ||||||||||||
|
||||||||||||
%% Define the nodes | ||||||||||||
User[User] | ||||||||||||
Kubectl[kubectl] | ||||||||||||
Git[Git Repository] | ||||||||||||
GitOps[GitOps] | ||||||||||||
%% Control Node components | ||||||||||||
subgraph ControlNode["Control Node"] | ||||||||||||
K8S[Kubernetes API Server] | ||||||||||||
FC[Fabric Controller] | ||||||||||||
end | ||||||||||||
%% Define the relationships | ||||||||||||
User -->|Fabric CR YAMLs| Git | ||||||||||||
Kubectl -.->|Direct kubectl commands| K8S | ||||||||||||
User -.->|CLI| Kubectl | ||||||||||||
Git -.->|GitOps pulls| GitOps | ||||||||||||
GitOps -->|Applies CRs| K8S | ||||||||||||
%% Keep rel with empty text to keep layout | ||||||||||||
K8S -->| | FC | ||||||||||||
FC -->|Watches CRs| K8S | ||||||||||||
%% Style the original arrow invisible | ||||||||||||
linkStyle 5 stroke:none,fill:none; | ||||||||||||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's about operational aspects and typical workflows, then why is this located in the “Architecture” section, and not in “Use guides” for example?