mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
docs: enable mermaid diagrams in wiki
This commit is contained in:
1 parent
6a143c2396
commit
39111fc762
4 files changed
+89
-2
No files matched your search
@@ -72,3 +72,36 @@ after:
|
||||
mkdocs build
|
||||
```
|
||||
|
||||
## Diagrams
|
||||
|
||||
Use Mermaid for state machines and sequence diagrams:
|
||||
|
||||
````markdown
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
Ready --> Blocked: evidence fault
|
||||
Blocked --> Unknown: evidence stale
|
||||
Unknown --> Ready: fresh verified evidence
|
||||
```
|
||||
````
|
||||
|
||||
Avoid screenshots for state machines. Mermaid diagrams stay reviewable in Git
|
||||
and can be updated with the code.
|
||||
|
||||
## Code Links
|
||||
|
||||
For links to Markdown docs inside `docs/`, use normal relative Markdown links.
|
||||
MkDocs renders those as site links.
|
||||
|
||||
For links to source code under `cmd/`, `core/`, `charts/`, `scripts/`, or
|
||||
`testops/`, prefer GitHub source links when the target should be clickable in
|
||||
the built site:
|
||||
|
||||
```markdown
|
||||
[operator_status_controller.go](https://github.com/seaweedfs/seaweed-block/blob/main/core/ops/operator_status_controller.go)
|
||||
```
|
||||
|
||||
MkDocs' default site only serves files under `docs_dir`. It does not render
|
||||
repo-root source files as pages unless we add a source-link plugin or copy
|
||||
generated code references into `docs/`. Keep wiki pages as explanations and
|
||||
link to source-of-truth code rather than duplicating code.
|
||||
@@ -38,6 +38,21 @@ failback would add more states than the product can safely explain.
|
||||
|
||||
Phase 44 closes this path:
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
A[Helm install] --> B[First PVC]
|
||||
B --> C[CSI creates SwBlockVolume CR]
|
||||
C --> D[lifecycle-owner adds protection finalizer]
|
||||
D --> E[operator-status writes status and Events]
|
||||
E --> F[Delete requested]
|
||||
F --> G{cleanup evidence}
|
||||
G -->|missing/stale/residue| H[hold finalizer]
|
||||
G -->|fresh clean| I[release protection finalizer]
|
||||
H --> E
|
||||
I --> J[CR deletion completes]
|
||||
J --> K[uninstall zero residue]
|
||||
```
|
||||
|
||||
```text
|
||||
install
|
||||
-> first PVC
|
||||
@@ -68,4 +83,3 @@ Which gate proves no false Ready=True?
|
||||
|
||||
Returned-replica rebuild/failback is the natural next major product capability
|
||||
because it can reuse the operation-layer model built in Phases 35-44.
|
||||
|
||||
@@ -54,6 +54,17 @@ masked by CSI pod not ready.
|
||||
|
||||
Delete-safety is evidence-driven:
|
||||
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
[*] --> Requested: delete timestamp observed
|
||||
Requested --> HoldUnknown: cleanup evidence missing or stale
|
||||
Requested --> HoldBlocked: residue evidence present
|
||||
HoldUnknown --> Releasable: fresh clean cleanup evidence
|
||||
HoldBlocked --> Releasable: residue cleared and fresh clean evidence
|
||||
Releasable --> Released: lifecycle-owner removes protection finalizer
|
||||
Released --> [*]: CR deletion completes
|
||||
```
|
||||
|
||||
```text
|
||||
missing cleanup evidence -> unknown/requested -> hold finalizer
|
||||
stale cleanup evidence -> unknown/requested -> hold finalizer
|
||||
@@ -66,6 +77,23 @@ by operator-status.
|
||||
|
||||
## Finalizer Lifecycle
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant CSI
|
||||
participant CR as SwBlockVolume CR
|
||||
participant OS as operator-status
|
||||
participant LO as lifecycle-owner
|
||||
participant QA as cleanup evidence
|
||||
|
||||
CSI->>CR: create/update identity spec after CreateVolume
|
||||
LO->>CR: add protection finalizer
|
||||
OS->>CR: publish Ready status and Events
|
||||
CR->>OS: deletionTimestamp observed
|
||||
OS->>QA: read cleanup-summary evidence
|
||||
OS->>CR: publish deleteSafety hold or releasable status
|
||||
LO->>CR: remove only protection finalizer if releasable
|
||||
```
|
||||
|
||||
```text
|
||||
SwBlockVolume created
|
||||
-> lifecycle-owner adds protection finalizer
|
||||
@@ -93,4 +121,3 @@ detect corruption
|
||||
|
||||
This is the model for future dirty failures such as partial writes, stale
|
||||
replicas, and returned-replica rebuild.
|
||||
|
||||
@@ -16,6 +16,19 @@ theme:
|
||||
plugins:
|
||||
- search
|
||||
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- pymdownx.details
|
||||
- pymdownx.superfences:
|
||||
custom_fences:
|
||||
- name: mermaid
|
||||
class: mermaid
|
||||
format: !!python/name:pymdownx.superfences.fence_code_format
|
||||
- pymdownx.highlight
|
||||
- pymdownx.inlinehilite
|
||||
- toc:
|
||||
permalink: true
|
||||
|
||||
nav:
|
||||
- Home: wiki/index.md
|
||||
- Developer Guide:
|
||||
|
||||
Reference in new issue
Block a user