Skip to content

Commit

Permalink
chore: mermaid diagrams replaced by ditaa diagrams (#1956)
Browse files Browse the repository at this point in the history
  • Loading branch information
dadrus authored Nov 10, 2024
1 parent aecae33 commit 21379c8
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 2,417 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env:
KUBECONFORM_VERSION: "0.6.7"
KUBERNETES_API_VERSION: "1.27.0"
NODE_VERSION: "22.7"
RUBY_VERSION: "3.2"
COSIGN_VERSION: "v2.4.0"
CYCLONEDX_GOMOD_VERSION: "v1.7.0"
DOCUMENTATION_URL: "https://dadrus.github.io/heimdall/"
Expand Down Expand Up @@ -154,12 +155,14 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Redocly CLI
run: npm i -g @redocly/cli@1.10.5
run: npm i -g @redocly/cli@1.25.9
- name: Run Redocly Lint
run: redocly lint

lint-dockerfiles:
runs-on: ubuntu-24.04
permissions:
pull-requests: write
needs:
- check-changes
if: >
Expand All @@ -177,7 +180,7 @@ jobs:
uses: reviewdog/action-hadolint@73fec8b28091e5082c19df69815dd749d97b882a # v1.46.0
with:
reporter: github-pr-review
fail_on_error: true
reviewdog_flags: -fail-level=error

lint-helm-chart:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -649,11 +652,11 @@ jobs:
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 17.7
node-version: ${{ env.NODE_VERSION }}
- name: Setup ruby
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0
with:
ruby-version: 3.1.3
ruby-version: ${{ env.RUBY_VERSION }}
- name: Install asciidoctor
run: gem install asciidoctor asciidoctor-diagram asciidoctor-html5s rouge
- name: Install dependencies
Expand Down Expand Up @@ -704,13 +707,11 @@ jobs:
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 17.7
- name: Install mermaid
run: npm install -g @mermaid-js/mermaid-cli@10.8.0
node-version: ${{ env.NODE_VERSION }}
- name: Setup ruby
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0
with:
ruby-version: 2.7
ruby-version: ${{ env.RUBY_VERSION }}
- name: Install asciidoctor
run: gem install asciidoctor asciidoctor-diagram asciidoctor-html5s rouge
- name: Install dependencies
Expand All @@ -730,11 +731,16 @@ jobs:
replace: "${{ needs.prepare-release.outputs.tag_name }}"
regex: false
include: docs/**
- name: Prepare image version
id: image-version
run: |
export version=$(echo ${{ needs.prepare-release.outputs.tag_name }} | sed 's/v//g')
echo "result=$version" >> $GITHUB_OUTPUT
- name: Update used image tags to the released version
uses: jacobtomlinson/gha-find-replace@2ff30f644d2e0078fc028beb9193f5ff0dcad39e # v3
with:
find: "heimdall:dev"
replace: "heimdall:${{ needs.prepare-release.outputs.tag_name }}"
replace: "heimdall:${{ steps.image-version.outputs.result }}"
regex: false
include: docs/**
- name: Build documentation
Expand Down
45 changes: 36 additions & 9 deletions docs/content/docs/concepts/rules.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,43 @@ To minimize the memory footprint, heimdall instanciates all defined mechanisms o

The diagram below sketches the logic executed by heimdall for each and every incoming request.

[mermaid, format=svg]
[ditaa, format=svg]
....
flowchart TD
req[Request] --> findRule{1: any\nrule\nmatching\nrequest?}
findRule -->|no| err2[404 Not Found]
findRule -->|yes| regularPipeline[2: execute\nauthentication & authorization\npipeline]
regularPipeline --> failed{failed?}
failed -->|yes| errPipeline[execute error pipeline]
failed -->|no| success[3: forward request,\nrespectively respond\nto the API gateway]
errPipeline --> errResult[4: result of the\nused error handler]
/---------------\
|c035Request |
\---------------/
|
v
+-------------------+
no | {c} 1. Any | yes
/------| rule matching |------\
| |cED5 request? | |
| +-------------------+ |
| |
v v
/---------------\ /-----------------------------\
| 404 Not Found | | 2. execute authentication & |
| cE9F | |c035authorization pipeline |
\---------------/ \-----------------------------/
|
v
+-------------------+
yes |cED5 | no
/-----|{c} Failed? |-----\
| | | |
| +-------------------+ |
v v
/-------------------\ /------------------------\
| execute error | |3. forward request, or |
| pipeline cE9F| | respond to the API |
\-------------------/ | gateway c035 |
| \------------------------/
v
/-------------------\
|4. result of the |
| used error |
| handler cE9F|
\-------------------/
....

. *Any rule matching request?* - This is the first step executed by heimdall in which it tries to find a link:{{< relref "#_matching_of_rules" >}}[matching rule]. If there is no matching rule, heimdall either falls back to the default rule if available, or the request is denied. Otherwise, the rule specific authentication & authorization pipeline is executed.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/getting_started/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Heimdall can be installed via a Helm chart with a few simple steps, depending on

=== Prerequisites

* A Kubernetes version >= 1.19 or >= 1.23 if you would like to use HPA
* A Kubernetes version >= 1.27
* https://helm.sh/docs/intro/install/[Helm] 3.0+

=== Adding the Helm Repository
Expand Down
5 changes: 0 additions & 5 deletions docs/osv-scanner.toml

This file was deleted.

Loading

0 comments on commit 21379c8

Please sign in to comment.