Skip to content

fix: mermaid diagrams for docsy #2461

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

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docsy/content/en/docs/dependent-resources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ the `Deployment` controller.
Controllers that deal with secondary resources typically need to perform the following steps, for
each secondary resource:

<div class="mermaid" markdown="0">
```mermaid
flowchart TD

compute[Compute desired secondary resource based on primary state] --> A
Expand All @@ -25,8 +25,7 @@ A -- No --> Create --> Done
match{Matches desired state?}
match -- Yes --> Done
match -- No --> Update --> Done

</div>
```

While these steps are not difficult in and of themselves, there are some subtleties that can lead to
bugs or sub-optimal code if not done right. As this process is pretty much similar for each
Expand Down
19 changes: 8 additions & 11 deletions docsy/content/en/docs/workflows/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,14 @@ Notation: The arrows depicts reconciliation ordering, thus following the reverse

#### Reconcile Sample

<div class="mermaid" markdown="0">

```mermaid
stateDiagram-v2
1 --> 2
1 --> 3
2 --> 4
3 --> 4
```

</div>

- Root nodes (i.e. nodes that don't depend on any others) are reconciled first. In this example,
DR `1` is reconciled first since it doesn't depend on others.
Expand All @@ -252,15 +251,15 @@ stateDiagram-v2

#### Sample with Reconcile Precondition

<div class="mermaid" markdown="0">


```mermaid
stateDiagram-v2
1 --> 2
1 --> 3
3 --> 4
3 --> 5
```

</div>

- If `3` has a reconcile pre-condition that is not met, `1` and `2` would be reconciled. However,
DR `3`,`4`,`5` would be deleted: `4` and `5` would be deleted concurrently but `3` would only
Expand All @@ -285,16 +284,14 @@ is not met, just for the whole workflow.
`Deleter` interface, it is considered as deleted automatically.

### Sample

<div class="mermaid" markdown="0">


```mermaid
stateDiagram-v2
1 --> 2
1 --> 3
2 --> 4
3 --> 4

</div>
```

- The DRs are deleted in the following order: `4` is deleted first, then `2` and `3` are deleted
concurrently, and, only after both are successfully deleted, `1` is deleted.
Expand Down
Loading