Skip to content

(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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pau-hedgehog
Copy link
Contributor

No description provided.

@pau-hedgehog pau-hedgehog self-assigned this Mar 5, 2025
Copy link

github-actions bot commented Mar 5, 2025

🚀 Deployed on https://preview-71--hedgehog-docs.netlify.app

@github-actions github-actions bot temporarily deployed to pull request March 5, 2025 22:54 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 7, 2025 14:40 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 7, 2025 15:12 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 21, 2025 10:10 Inactive
@pau-hedgehog pau-hedgehog marked this pull request as ready for review March 21, 2025 10:24
@pau-hedgehog pau-hedgehog requested a review from a team as a code owner March 21, 2025 10:24
@pau-hedgehog pau-hedgehog requested a review from edipascale March 21, 2025 10:24
@edipascale
Copy link
Contributor

this looks good @pau-hedgehog, my only concern is that I feel there's a big overlap between the first section in this PR and what you previously added in the architecture overview section, and I wonder whether we should just collapse the two sections into one. That being said, having more documentation is never a bad thing, so I'm not against adding this if you / other people feel that they're better kept separate.

@mrbojangles3
Copy link
Contributor

I support adding it. I can see that a user might say, what happens when I do X, Y or Z. They would have those questions answered in the Fabric Management Workflow.

@github-actions github-actions bot temporarily deployed to pull request March 24, 2025 10:26 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 24, 2025 10:29 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 24, 2025 10:35 Inactive
@pau-hedgehog
Copy link
Contributor Author

I've made some amendments to try to make both @edipascale and @mrbojangles3 happy ;)

edipascale
edipascale previously approved these changes Mar 24, 2025

### **kubectl & kubectl fabric**
- [`kubectl`](https://kubernetes.io/docs/reference/kubectl/) is the standard CLI tool for [Kubernetes](https://kubernetes.io).
- `kubectl fabric` is a plugin that extends `kubectl` with fabric-specific commands and interacts with the Kubernetes API Server.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you're going into that details in k9s section it would be good to describe fabric plugin capability to do inspects, ssh/reboot/reinstall here as well to avoid creating an impression that it's only available through the k9s

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm adding:

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


---

## **GitOps Functionality (ArgoCD)**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit misleading this way. Please explain GitOps in general and that it could be used with any tools that supports K8s (e.g. ArgoCD, Flux, etc.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Changing to:

GitOps Integration

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 or Flux.

  • User Responsibilities:

    • Define Fabric Custom Resources (CRs) in YAML.
    • Commit and push these CRs to a Git repository for version control and collaboration.
  • 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.


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.

- **User Actions:**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could go as an example workflow with ArgoCD

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactored the GitOps section. See comment above


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/).

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Server isn't forwarding CRs, controllers watches API for CR changes

Fabricator -->|Applies CRs| K8S
KubectlFabric -->|Interacts with| K8S
K9s -->|UI Manages| K8S
K8S -->|Sends CRDs| FC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API Server isn't forwarding CRs, controllers watches API for CR changes

User -.->|CLI| Fabricator
User -.->|CLI| Kubectl
Kubectl -.->|Plugin| KubectlFabric
Fabricator -->|SSH access| K9s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what is represented by this, could you please elaborate?

Copy link
Contributor Author

@pau-hedgehog pau-hedgehog Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how you usually access k9s, but maybe it's too detailed for what we want to display

hhfab vlab ssh -n control-1
k9s


### **User**
- **Creates Fabric CR YAMLs** and applies them through standard Kubernetes resource management.
- **Directly interacts with SONiC switches** via the Fabricator CLI.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's about hhfab vlab ssh helper so it should be removed from here. Additionally, we don't allow users to do the changes on the switches

- `kubectl fabric` is a plugin that extends `kubectl` with fabric-specific commands and interacts with the Kubernetes API Server.

### **Fabricator**
- CLI tool that provides direct interaction with the Kubernetes API.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't provide it, what do you mean?

Copy link
Contributor Author

@pau-hedgehog pau-hedgehog Apr 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At that time I was thinking of hhfab init -w but it's not the expected workflow. I'm removing it


### **Fabricator**
- CLI tool that provides direct interaction with the Kubernetes API.
- Can apply configurations via **SSH access** (using **K9s**) or by directly managing Fabric CRs with YAML files.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda same - I guess you're talking about hhfab vlab ssh which shouldn't be mentioned outside of the vlab section of the docs

@github-actions github-actions bot temporarily deployed to pull request April 15, 2025 16:08 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 16, 2025 08:18 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 16, 2025 08:29 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 16, 2025 08:50 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 16, 2025 08:54 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 16, 2025 08:55 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 16, 2025 09:56 Inactive

---

## **Management Workflow Overview**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't go through the whole page, this is just a note in passing - I'd strongly recommend against manually formatting all section/subsection headings in bold. The formatting from the theme should be enough already, no need to add manual formatting; if we decided it's not enough, this is something we should change by tuning the CSS for the whole website, for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants