Skip to content

Commit dbfb4a6

Browse files
authored
fix: mermaid diagrams for docsy (#2461)
Signed-off-by: Attila Mészáros <[email protected]>
1 parent 56d396c commit dbfb4a6

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

docsy/content/en/docs/dependent-resources/_index.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ the `Deployment` controller.
1414
Controllers that deal with secondary resources typically need to perform the following steps, for
1515
each secondary resource:
1616

17-
<div class="mermaid" markdown="0">
17+
```mermaid
1818
flowchart TD
1919
2020
compute[Compute desired secondary resource based on primary state] --> A
@@ -25,8 +25,7 @@ A -- No --> Create --> Done
2525
match{Matches desired state?}
2626
match -- Yes --> Done
2727
match -- No --> Update --> Done
28-
29-
</div>
28+
```
3029

3130
While these steps are not difficult in and of themselves, there are some subtleties that can lead to
3231
bugs or sub-optimal code if not done right. As this process is pretty much similar for each

docsy/content/en/docs/workflows/_index.md

+8-11
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,14 @@ Notation: The arrows depicts reconciliation ordering, thus following the reverse
230230

231231
#### Reconcile Sample
232232

233-
<div class="mermaid" markdown="0">
234-
233+
```mermaid
235234
stateDiagram-v2
236235
1 --> 2
237236
1 --> 3
238237
2 --> 4
239238
3 --> 4
239+
```
240240

241-
</div>
242241

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

253252
#### Sample with Reconcile Precondition
254253

255-
<div class="mermaid" markdown="0">
256-
254+
255+
```mermaid
257256
stateDiagram-v2
258257
1 --> 2
259258
1 --> 3
260259
3 --> 4
261260
3 --> 5
261+
```
262262

263-
</div>
264263

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

287286
### Sample
288-
289-
<div class="mermaid" markdown="0">
290-
287+
288+
```mermaid
291289
stateDiagram-v2
292290
1 --> 2
293291
1 --> 3
294292
2 --> 4
295293
3 --> 4
296-
297-
</div>
294+
```
298295

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

0 commit comments

Comments
 (0)