Compare commits
388 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b404f34f6f | ||
|
|
5a118093b1 | ||
|
|
1a86c28b76 | ||
|
|
a5c4533f72 | ||
|
|
916e2ac6f3 | ||
|
|
b19134594f | ||
|
|
6b0a629e78 | ||
|
|
ba9facadcc | ||
|
|
8a64794085 | ||
|
|
37bb689197 | ||
|
|
e71aa716f8 | ||
|
|
60a009d255 | ||
|
|
8dd7dae669 | ||
|
|
569c46cc09 | ||
|
|
c66c3a67fd | ||
|
|
764b66f280 | ||
|
|
b2f6acabee | ||
|
|
000f9bc30a | ||
|
|
010210c07e | ||
|
|
ea663a2ba4 | ||
|
|
599b974c82 | ||
|
|
cda4e6ced3 | ||
|
|
52c2675623 | ||
|
|
e9ab655a96 | ||
|
|
59cb59d7d9 | ||
|
|
e4868de5c4 | ||
|
|
f3b087334c | ||
|
|
8ccab3d850 | ||
|
|
9f1db1b900 | ||
|
|
75c8d11579 | ||
|
|
7b510372b5 | ||
|
|
a15ab25f3b | ||
|
|
d91f8fee4e | ||
|
|
05f5d0db68 | ||
|
|
e26b86ae07 | ||
|
|
2c37579a81 | ||
|
|
c11695ee48 | ||
|
|
01e42a137c | ||
|
|
5027db2bd4 | ||
|
|
a7c0106111 | ||
|
|
2c5824559f | ||
|
|
dfeb0f0491 | ||
|
|
ef7708ef73 | ||
|
|
99f725c314 | ||
|
|
9c98493162 | ||
|
|
4f994008d9 | ||
|
|
cd413e4347 | ||
|
|
fe8ea4e472 | ||
|
|
846ed30c5f | ||
|
|
93c7915f89 | ||
|
|
d164bc00d6 | ||
|
|
2b79d60d66 | ||
|
|
8b6368204a | ||
|
|
f8d84a588c | ||
|
|
07741b16cf | ||
|
|
025984a1ea | ||
|
|
dfc5202460 | ||
|
|
1d370ae5cc | ||
|
|
11f10fa1af | ||
|
|
e2dded6490 | ||
|
|
46f860db2d | ||
|
|
d61b8cf4cb | ||
|
|
7f91680588 | ||
|
|
cf3b78d9b7 | ||
|
|
320bec7022 | ||
|
|
68a04ebcc8 | ||
|
|
e354ca8080 | ||
|
|
340adaeadb | ||
|
|
f29f3399b6 | ||
|
|
4b997c816a | ||
|
|
706107f510 | ||
|
|
eca9c42c57 | ||
|
|
2933e90736 | ||
|
|
0af1e54d85 | ||
|
|
52df92bcc5 | ||
|
|
829a4cc882 | ||
|
|
7c5647bbbf | ||
|
|
9dfcbf0da5 | ||
|
|
aed86a99d5 | ||
|
|
b99d9ed186 | ||
|
|
f65d88a8d4 | ||
|
|
b2a8d46af5 | ||
|
|
2b9743fbb9 | ||
|
|
50f2e968b8 | ||
|
|
303736730c | ||
|
|
e5705cca3d | ||
|
|
7ea19af36f | ||
|
|
1e3f9f75e6 | ||
|
|
18af9be2fc | ||
|
|
133a1f1fb9 | ||
|
|
2315fb73c8 | ||
|
|
45650d786b | ||
|
|
ebfddb9393 | ||
|
|
be6efbb5f0 | ||
|
|
2b75cf49f8 | ||
|
|
3f8dbb7c73 | ||
|
|
5c33bbcbe8 | ||
|
|
9ebac0f2c7 | ||
|
|
4a5a85696b | ||
|
|
f8e1777513 | ||
|
|
a69319d23a | ||
|
|
5294173477 | ||
|
|
78e318a292 | ||
|
|
f1bde71352 | ||
|
|
8f53e0de5e | ||
|
|
e7674ebb6b | ||
|
|
0c0839ab04 | ||
|
|
d29cc160d5 | ||
|
|
666723658e | ||
|
|
f4d79d33cb | ||
|
|
881e139427 | ||
|
|
2da5f372a4 | ||
|
|
32eb90bc27 | ||
|
|
d709f3abda | ||
|
|
f9851f0599 | ||
|
|
9a41cc1d8e | ||
|
|
64e32c0ff2 | ||
|
|
b09f1f5e00 | ||
|
|
1fdb51810c | ||
|
|
cf649626ee | ||
|
|
f46f3cd242 | ||
|
|
1f6bce87ad | ||
|
|
a7c3d4bce7 | ||
|
|
c5212561af | ||
|
|
610cdc8953 | ||
|
|
779711569f | ||
|
|
785883dfc7 | ||
|
|
82384f7a17 | ||
|
|
a2554e7234 | ||
|
|
19eb1a7f8f | ||
|
|
ce5ab24449 | ||
|
|
a162ee61cb | ||
|
|
6f033c5d8c | ||
|
|
b7b24afd06 | ||
|
|
c80abe21a4 | ||
|
|
2ccb3738cc | ||
|
|
a4eee518ef | ||
|
|
956ba255b1 | ||
|
|
369b11c95f | ||
|
|
2d9b240a99 | ||
|
|
e8b3f0e3fd | ||
|
|
35294f2857 | ||
|
|
59314dcb04 | ||
|
|
32239c8d17 | ||
|
|
31a8abe6f2 | ||
|
|
151923ac56 | ||
|
|
7d8690ff40 | ||
|
|
418abc901c | ||
|
|
c711c9ced9 | ||
|
|
6a80b9c9f8 | ||
|
|
416f92ed6d | ||
|
|
926e2f3d76 | ||
|
|
5d876a32ff | ||
|
|
8024cd7251 | ||
|
|
7a060a7e05 | ||
|
|
a6a8cb8809 | ||
|
|
5330e72da3 | ||
|
|
48b40d02ed | ||
|
|
60b383c932 | ||
|
|
c2475e6c00 | ||
|
|
0d270372f3 | ||
|
|
39cdc289c7 | ||
|
|
5e5760ff22 | ||
|
|
7bed0ebe32 | ||
|
|
cbd96c87b9 | ||
|
|
e2e90b1c5c | ||
|
|
f76f7e21f1 | ||
|
|
3fbb513560 | ||
|
|
6669cbfdef | ||
|
|
5b89ab10a8 | ||
|
|
2df1476164 | ||
|
|
aa7f6165a4 | ||
|
|
524f4b1ef5 | ||
|
|
4fae752f4a | ||
|
|
8fc5d0a204 | ||
|
|
c16a48f660 | ||
|
|
d87549a44b | ||
|
|
657c22d66f | ||
|
|
9a11317189 | ||
|
|
53ec9322a7 | ||
|
|
bdb21e5b67 | ||
|
|
ad89347ec7 | ||
|
|
99fef3aa21 | ||
|
|
ced206e5df | ||
|
|
e2bc4cfb31 | ||
|
|
fcf5ada8b3 | ||
|
|
98bd69e7ef | ||
|
|
cbd3796130 | ||
|
|
c8e84f993c | ||
|
|
066c79e5a9 | ||
|
|
5f710e08cb | ||
|
|
91bd7df188 | ||
|
|
f1759f08ce | ||
|
|
73c3d1e10d | ||
|
|
b1017ad8a3 | ||
|
|
ee4a848bcd | ||
|
|
bd28ccd242 | ||
|
|
9470c05699 | ||
|
|
75dfacdda5 | ||
|
|
fb9944602b | ||
|
|
b91ae5abed | ||
|
|
5548ad73d2 | ||
|
|
90259e849a | ||
|
|
b086631509 | ||
|
|
a032fc4a57 | ||
|
|
541e24f3a0 | ||
|
|
45372eb3cf | ||
|
|
7c86dc4986 | ||
|
|
5b1b2d5d54 | ||
|
|
3438367a49 | ||
|
|
7015af1a61 | ||
|
|
77bc260dcf | ||
|
|
f4307db75f | ||
|
|
29d4da05c0 | ||
|
|
15873c171e | ||
|
|
b3a74accd1 | ||
|
|
06754ae1f4 | ||
|
|
57b148642e | ||
|
|
f7b9275eba | ||
|
|
799f36262a | ||
|
|
4fab485086 | ||
|
|
4131a0a946 | ||
|
|
79fd0bf211 | ||
|
|
b24328b89e | ||
|
|
970d84bc0d | ||
|
|
cbe26ca0bb | ||
|
|
1962c4fb17 | ||
|
|
f6e0a4687c | ||
|
|
7a086300b4 | ||
|
|
4811e81b34 | ||
|
|
2ef8558aa7 | ||
|
|
fa1017b13b | ||
|
|
44dd59dae1 | ||
|
|
63794be9cb | ||
|
|
95d92598b3 | ||
|
|
391273e4b0 | ||
|
|
8cb6537239 | ||
|
|
ef7f4ed92f | ||
|
|
ff30a70b99 | ||
|
|
a498382041 | ||
|
|
3cf3b88705 | ||
|
|
cc8c950747 | ||
|
|
03aa338985 | ||
|
|
b1423a335d | ||
|
|
687de73a34 | ||
|
|
037619d85a | ||
|
|
f1b84869ff | ||
|
|
2bdfea9dc1 | ||
|
|
e02119b055 | ||
|
|
836c7a7566 | ||
|
|
1eb60106ac | ||
|
|
0b07640b49 | ||
|
|
daf0913071 | ||
|
|
340a900d5b | ||
|
|
a71ed2d8c2 | ||
|
|
237104596b | ||
|
|
f036870a48 | ||
|
|
b3d4a871c5 | ||
|
|
d089964bc7 | ||
|
|
877fac3659 | ||
|
|
e4645bd6a1 | ||
|
|
d63e81cb43 | ||
|
|
234d3b470b | ||
|
|
d4c5c34a77 | ||
|
|
ad56c69451 | ||
|
|
4fd73da41f | ||
|
|
0a7be456bd | ||
|
|
aa741940ba | ||
|
|
031885c5bf | ||
|
|
9059d64ec4 | ||
|
|
40a97c862c | ||
|
|
a85022a0c4 | ||
|
|
c93aa2f607 | ||
|
|
504a072137 | ||
|
|
80c34a5c4e | ||
|
|
5818261c41 | ||
|
|
f1f5e79433 | ||
|
|
ce5b1f8109 | ||
|
|
0fba87443d | ||
|
|
87b173a35c | ||
|
|
8f663f0d2e | ||
|
|
5dd277346e | ||
|
|
9e973b5427 | ||
|
|
6131c10b58 | ||
|
|
a72c0874fa | ||
|
|
da3c1bf5a2 | ||
|
|
85f2bd4937 | ||
|
|
8dd96ae33c | ||
|
|
1beb8136fb | ||
|
|
44a2961421 | ||
|
|
1f59fdf571 | ||
|
|
0fdf24a7da | ||
|
|
cd5e1b0d43 | ||
|
|
0ed7c4fc88 | ||
|
|
457a0056f0 | ||
|
|
8a6a055ef9 | ||
|
|
e77f83ac7b | ||
|
|
1b6b8962e1 | ||
|
|
82c24650ca | ||
|
|
5160393350 | ||
|
|
3b1a554bcd | ||
|
|
257cbea1af | ||
|
|
5b15d7a714 | ||
|
|
8b71d7afde | ||
|
|
e3fb7d4c5d | ||
|
|
684eeba20c | ||
|
|
8330536ea7 | ||
|
|
83c68f145b | ||
|
|
24b67d844e | ||
|
|
71998702e4 | ||
|
|
289dadb094 | ||
|
|
7b14123a33 | ||
|
|
d48f9a2a00 | ||
|
|
40965906b0 | ||
|
|
aae7b2e643 | ||
|
|
dc31ac9bbc | ||
|
|
beeca78fb6 | ||
|
|
8673f9913d | ||
|
|
3448665119 | ||
|
|
56f709c487 | ||
|
|
c880b8ed65 | ||
|
|
bb7733ba4c | ||
|
|
9b1a7de070 | ||
|
|
a3c80efd37 | ||
|
|
ab8b150408 | ||
|
|
706555513b | ||
|
|
e362fc84c2 | ||
|
|
4ce139fd6c | ||
|
|
2852355c96 | ||
|
|
2d3f1ca721 | ||
|
|
2fa36d0802 | ||
|
|
82bc04b633 | ||
|
|
df262248ad | ||
|
|
f4d79b7081 | ||
|
|
6406484a59 | ||
|
|
d21dea53cb | ||
|
|
8f3dd04468 | ||
|
|
c01d82b177 | ||
|
|
0e76d96d79 | ||
|
|
91e35edd86 | ||
|
|
99a493cfb2 | ||
|
|
5a3d4d0b95 | ||
|
|
080b16fa74 | ||
|
|
d1e44be1f3 | ||
|
|
67d974b5dc | ||
|
|
f96147e9f7 | ||
|
|
526367d176 | ||
|
|
57e71a27bf | ||
|
|
407da22c12 | ||
|
|
7eccc2c00c | ||
|
|
f69fcacc3b | ||
|
|
a6aa0f5ffd | ||
|
|
bb56da7f0e | ||
|
|
68fc82eb0b | ||
|
|
f04f695dbc | ||
|
|
dc660578c7 | ||
|
|
12b9ecd6ab | ||
|
|
037b7999f6 | ||
|
|
2642fb2dfc | ||
|
|
a479d40a57 | ||
|
|
12dd005b57 | ||
|
|
986d9a30ea | ||
|
|
d2c5281d32 | ||
|
|
1af0865366 | ||
|
|
3e5272b6e9 | ||
|
|
0815515df8 | ||
|
|
e7aafa5494 | ||
|
|
f8b7f740c4 | ||
|
|
3b8a569dee | ||
|
|
d092b41289 | ||
|
|
a5de5cc244 | ||
|
|
3c0f9af8e9 | ||
|
|
61a6391e7c | ||
|
|
7d00ce2475 | ||
|
|
0942d9da3c | ||
|
|
f3400acc2a | ||
|
|
6e04b6c26e | ||
|
|
65d7471745 | ||
|
|
ccb56f96b0 | ||
|
|
4b66c26b1f | ||
|
|
163bad9065 | ||
|
|
fcf062d581 | ||
|
|
adef10e794 | ||
|
|
2aa6d13673 | ||
|
|
02abf4c39c | ||
|
|
25c23f244e | ||
|
|
3491c210c8 | ||
|
|
9fa638f29b |
11
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "pip" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
40
.github/workflows/docker-image.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Docker Image CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'bin/**'
|
||||
- Dockerfile
|
||||
- .github/workflows/docker-image.yml
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'bin/**'
|
||||
- Dockerfile
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
tags: philippemerle/kubediagrams:latest
|
||||
31
.github/workflows/pylint.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Pylint
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- .pylintrc
|
||||
- bin/kube-diagrams
|
||||
- '**.py'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pylint setuptools PyYAML diagrams
|
||||
- name: Analysing the code with pylint
|
||||
run: |
|
||||
pylint $(git ls-files '*.py') bin/kube-diagrams
|
||||
89
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
# When a release is created, this workflow will
|
||||
# - build and upload KubeDiagrams Python Package to PyPI
|
||||
# - build and upload KubeDiagrams images to DockerHub
|
||||
|
||||
name: Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-pypa:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Build release distributions
|
||||
run: |
|
||||
python -m pip install build
|
||||
python -m build
|
||||
|
||||
- name: Upload distributions
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-dists
|
||||
path: dist/
|
||||
|
||||
pypi-publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-pypa
|
||||
permissions:
|
||||
# IMPORTANT: this permission is mandatory for trusted publishing
|
||||
id-token: write
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/project/KubeDiagrams/${{ github.event.release.name }}
|
||||
steps:
|
||||
- name: Retrieve release distributions
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: release-dists
|
||||
path: dist/
|
||||
|
||||
- name: Publish release distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
packages-dir: dist/
|
||||
|
||||
build-publish-images:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Extract version from release tag
|
||||
id: get_version
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build and push Docker multi-arch image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/kubediagrams:${{ env.VERSION }}
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/kubediagrams:latest
|
||||
25
.github/workflows/test-action.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: "Test Action"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate diagram from Helm chart"
|
||||
uses: philippemerle/KubeDiagrams@main
|
||||
with:
|
||||
type: "helm"
|
||||
args: 'https://charts.jetstack.io/cert-manager'
|
||||
|
||||
- name: "Upload diagram artifact"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cert-manager.png
|
||||
path: cert-manager.png
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
30
.github/workflows/tmp.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Release Image 0.6.0
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: philippemerle/kubediagrams:0.6.0
|
||||
26
.github/workflows/update-examples.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: "Update Examples"
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update-examples:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout repository"
|
||||
uses: actions/checkout@v4
|
||||
- name: "Update examples used in repository"
|
||||
uses: philippemerle/KubeDiagrams@main
|
||||
with:
|
||||
type: "kubernetes"
|
||||
args: "-o examples/cassandra/cassandra.png examples/cassandra/cassandra.yml"
|
||||
- name: "Commit changes"
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
commit_message: "chore: update example diagrams"
|
||||
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
|
||||
file_pattern: "examples/cassandra/*.png"
|
||||
3
.gitignore
vendored
@@ -1,2 +1,5 @@
|
||||
KubeDiagrams.egg-info/
|
||||
dist/
|
||||
|
||||
# Direnv stuff
|
||||
.direnv
|
||||
32
.pylintrc
Normal file
@@ -0,0 +1,32 @@
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifiers separated by comma (,) or put this
|
||||
# option multiple times (only on the command line, not in the configuration
|
||||
# file where it should appear only once). You can also use "--disable=all" to
|
||||
# disable everything first and then reenable specific checks. For example, if
|
||||
# you want to run only the similarities checker, you can use "--disable=all
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use "--disable=all --enable=classes
|
||||
# --disable=W".
|
||||
disable=invalid-name,
|
||||
too-many-branches,
|
||||
too-many-arguments,
|
||||
too-many-positional-arguments,
|
||||
too-many-lines,
|
||||
too-many-public-methods
|
||||
|
||||
[REPORTS]
|
||||
|
||||
# Python expression which should return a note less than 10 (10 is the highest
|
||||
# note). You have access to the variables errors warning, statement which
|
||||
# respectively contain the number of errors / warnings messages and the total
|
||||
# number of statements analyzed. This is used by the global evaluation report
|
||||
# (RP0004).
|
||||
#evaluation=10.0 - ((float(5 * error + warning + refactor + convention + info) / statement) * 10)
|
||||
|
||||
|
||||
[FORMAT]
|
||||
|
||||
# Maximum number of characters on a single line.
|
||||
#max-line-length=160
|
||||
7
CONTRIBUTING.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Contributing
|
||||
|
||||
All contributions are welcome, just submit pull requests, and we will review and integrate them as soon as possible.
|
||||
|
||||
## Development Environment
|
||||
|
||||
If you have [`nix`](https://nixos.org/download) installed on your machine, you can enter into the development environment via `nix develop`.
|
||||
8
Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM docker.io/alpine/helm:3 AS helm
|
||||
|
||||
FROM docker.io/python:3.13-alpine AS base
|
||||
RUN apk update && apk add graphviz bash
|
||||
RUN pip install --upgrade pip && pip install PyYAML diagrams
|
||||
ADD bin /usr/local/bin/
|
||||
COPY --from=helm /usr/bin/helm /usr/local/bin/helm
|
||||
WORKDIR /work
|
||||
875
LICENSE
@@ -1,674 +1,201 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
808
README.md
@@ -1,15 +1,42 @@
|
||||
# KubeDiagrams
|
||||
|
||||
[](https://landscape.cncf.io/?item=app-definition-and-development--application-definition-image-build--kubediagrams)
|
||||
[](https://github.com/philippemerle/KubeDiagrams/blob/main/LICENSE)
|
||||
[](https://badge.fury.io/py/KubeDiagrams)
|
||||
[](https://pepy.tech/projects/KubeDiagrams)
|
||||

|
||||
[](https://socket.dev/pypi/package/KubeDiagrams/overview/0.4.0/tar-gz)
|
||||
[](https://badge.fury.io/py/KubeDiagrams)
|
||||
[](https://pepy.tech/projects/kubediagrams)
|
||||
[](https://hub.docker.com/r/philippemerle/kubediagrams)
|
||||
[](https://hub.docker.com/r/philippemerle/kubediagrams)
|
||||
[](https://hub.docker.com/r/philippemerle/kubediagrams)
|
||||

|
||||
|
||||
Generate Kubernetes architecture diagrams from Kubernetes manifest files, kustomization files, Helm charts, and actual cluster state.
|
||||
<a href="https://trendshift.io/repositories/14300" target="_blank"><img src="https://trendshift.io/api/badge/repositories/14300" alt="philippemerle%2FKubeDiagrams | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
||||
|
||||
There are several tools to generate Kubernetes architecture diagrams (see **[here](https://github.com/philippemerle/Awesome-Kubernetes-Architecture-Diagrams)**).
|
||||
The main originality of **KubeDiagrams** is its **[configurability](https://github.com/philippemerle/KubeDiagrams/blob/main/bin/kube-diagrams.yaml)** allowing for instance to deal with custom Kubernetes resources.
|
||||

|
||||
|
||||
Generate Kubernetes architecture diagrams from Kubernetes manifest files, kustomization files, Helm charts, helmfile descriptors, and actual cluster state.
|
||||
|
||||
There are several tools to generate Kubernetes architecture diagrams, see **[here](https://github.com/philippemerle/Awesome-Kubernetes-Architecture-Diagrams)** for a detailed list.
|
||||
Compared to these existing tools, the main originalities of **KubeDiagrams** are the support of:
|
||||
|
||||
* **[most of all Kubernetes built-in resources](https://github.com/philippemerle/KubeDiagrams#kubernetes-built-in-resources)**,
|
||||
* **[any Kubernetes custom resources](https://github.com/philippemerle/KubeDiagrams#kubernetes-custom-resources)**,
|
||||
* **[customizable resource clustering](https://github.com/philippemerle/KubeDiagrams#kubernetes-resources-clustering)**,
|
||||
* **[any Kubernetes resource relationships](https://github.com/philippemerle/KubeDiagrams#kubernetes-resource-relationships)**,
|
||||
* **[declarative custom diagrams](https://github.com/philippemerle/KubeDiagrams#declarative-custom-diagrams)**,
|
||||
* **[an interactive diagram viewer](https://github.com/philippemerle/KubeDiagrams#kubediagrams-interactive-viewer)**,
|
||||
* **main input formats** such as Kubernetes manifest files, customization files, Helm charts, helmfile descriptors, and actual cluster state,
|
||||
* **main output formats** such as DOT, GIF, JPEG, PDF, PNG, SVG, and TIFF,
|
||||
* **[a very large set of examples](https://github.com/philippemerle/KubeDiagrams#examples)**.
|
||||
|
||||
**KubeDiagrams** is available as a [Python package in PyPI](https://pypi.org/project/KubeDiagrams), a [container image in DockerHub](https://hub.docker.com/r/philippemerle/kubediagrams), a `kubectl` plugin, a Nix flake, and a GitHub Action, see [here](https://github.com/philippemerle/KubeDiagrams#getting-started) for more details.
|
||||
|
||||
An **Online KubeDiagrams Service** is freely available at **[https://kubediagrams.lille.inria.fr/](https://kubediagrams.lille.inria.fr/)**.
|
||||
|
||||
Read **[Real-World Use Cases](https://github.com/philippemerle/KubeDiagrams#real-world-use-cases)** and **[What do they say about it](https://github.com/philippemerle/KubeDiagrams#what-do-they-say-about-it)** to discover how **KubeDiagrams** is really used and appreciated.
|
||||
|
||||
Try it on your own Kubernetes manifests, Helm charts, helmfiles, and actual cluster state!
|
||||
|
||||
## Examples
|
||||
|
||||
@@ -45,41 +72,125 @@ Architecture diagram for a deployed **CronJob** instance:
|
||||
|
||||
Architecture diagram for **NetworkPolicy** resources: 
|
||||
|
||||
Architecture diagram for an **Argo CD** example:
|
||||

|
||||
|
||||
Architecture diagram for an **Argo Events** example:
|
||||

|
||||
|
||||
Many other architecture diagrams are available into [examples/](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/).
|
||||
|
||||
All the examples are
|
||||
1. [official Kubernetes WordPress tutorial](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/wordpress/)
|
||||
1. [official Kubernetes ZooKeeper tutorial](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/zookeeper/)
|
||||
1. [official Kubernetes Cassandra tutorial](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/cassandra/)
|
||||
### Business Applications
|
||||
|
||||
1. [Bank of Anthos](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/bank-of-anthos/)
|
||||
1. [DeathStarBench](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/deathstarbench/)
|
||||
1. [Official Kubernetes WordPress tutorial](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/wordpress/)
|
||||
1. [Official Kubernetes ZooKeeper tutorial](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/zookeeper/)
|
||||
1. [Official Kubernetes Cassandra tutorial](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/cassandra/)
|
||||
1. [Online Boutique](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/online-boutique/)
|
||||
1. [OpenTelemetry Demo](https://github.com/philippemerle/KubeDiagrams/tree/main/examples/opentelemetry-demo)
|
||||
1. [TeaStore](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/teastore/)
|
||||
1. [Train Ticket](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/train-ticket/)
|
||||
1. [minikube architecture diagrams](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/minikube/)
|
||||
1. [k0s architecture diagrams](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/k0s/)
|
||||
1. [Kube Prometheus Stack](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/kube-prometheus-stack/)
|
||||
|
||||
### 5G Core Network Functions
|
||||
|
||||
1. [free5gc-k8s](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/free5gc-k8s/)
|
||||
1. [docker-open5gs](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/docker-open5gs/)
|
||||
1. [Gradiant 5G Charts](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/gradiant-5g-charts)
|
||||
1. [open5gs-k8s](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/open5gs-k8s/)
|
||||
1. [OpenAirInterface 5G Core Network](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/oai-5g-cn/)
|
||||
1. [Towards5GS-helm](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/towards5gs-helm/)
|
||||
1. [Miscellaneous examples](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/miscellaneous/)
|
||||
|
||||
### Kubernetes Operators
|
||||
|
||||
1. [Argo](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/argo/)
|
||||
1. [cert-manager](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/cert-manager/)
|
||||
1. [External Secrets Operator](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/external-secrets/)
|
||||
1. [Istio](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/istio/)
|
||||
1. [Kube Prometheus Stack](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/kube-prometheus-stack/)
|
||||
1. [LeaderWorkerSet API](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/lws/)
|
||||
|
||||
### Kubernetes Control Planes
|
||||
|
||||
1. [k0s architecture diagrams](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/k0s/)
|
||||
1. [minikube architecture diagrams](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/minikube/)
|
||||
|
||||
### Other examples
|
||||
|
||||
1. [Custom Object Items](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/custom-object-items/)
|
||||
1. [Some Helm charts](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/helm-charts/)
|
||||
1. [helmfile](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/helmfile/)
|
||||
1. [Inside workloads](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/inside-workloads/)
|
||||
1. [Miscellaneous examples](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/miscellaneous/)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Following software must be installed:
|
||||
* [Python](https://www.python.org) 3.9 or higher
|
||||
* `dot` command ([Graphviz](https://www.graphviz.org/))
|
||||
|
||||
- [Python](https://www.python.org) 3.9 or higher
|
||||
- `dot` command ([Graphviz](https://www.graphviz.org/))
|
||||
|
||||
## Getting Started
|
||||
|
||||
### From PyPI
|
||||
|
||||
Following command installs **KubeDiagrams** and all its Python dependencies, i.e., [PyYAML](https://pyyaml.org) and [Diagrams](https://diagrams.mingrammer.com/).
|
||||
|
||||
```ssh
|
||||
# using pip (pip3)
|
||||
$ pip install KubeDiagrams
|
||||
pip install KubeDiagrams
|
||||
```
|
||||
|
||||
### From Nix
|
||||
|
||||
Alternatively, you can install via Nix:
|
||||
|
||||
```sh
|
||||
nix shell github:philippemerle/KubeDiagrams
|
||||
```
|
||||
|
||||
### From Docker Hub
|
||||
|
||||
**KubeDiagrams** container images are available in [Docker Hub](https://hub.docker.com/r/philippemerle/kubediagrams).
|
||||
You can download the latest container image via:
|
||||
|
||||
```sh
|
||||
docker pull philippemerle/kubediagrams
|
||||
```
|
||||
|
||||
### From source
|
||||
|
||||
You can start directly from source:
|
||||
|
||||
```sh
|
||||
# clone the KubeDiagrams repository
|
||||
git clone https://github.com/philippemerle/KubeDiagrams.git
|
||||
|
||||
# install required Python packages
|
||||
pip install PyYAML diagrams
|
||||
|
||||
# make KubeDiagrams commands available into $PATH
|
||||
PATH=$(pwd)/KubeDiagrams/bin:$PATH
|
||||
```
|
||||
|
||||
### From Windows
|
||||
|
||||
To use **KubeDiagrams** from Windows operating system, only the container image is supported currently.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> Any contribution would be welcome to translate KubeDiagrams' Unix-based scripts to Windows-based scripts.
|
||||
|
||||
## Usage
|
||||
|
||||
**KubeDiagrams** provides two commands: `kube-diagrams` and `helm-diagrams`.
|
||||
|
||||
### `kube-diagrams`
|
||||
|
||||
`kube-diagrams` generates a Kubernetes architecture diagram from one or several Kubernetes manifest files.
|
||||
|
||||
```sh
|
||||
$ kube-diagrams -h
|
||||
kube-diagrams -h
|
||||
usage: kube-diagrams [-h] [-o OUTPUT] [-f FORMAT] [-c CONFIG] [-v] [--without-namespace] filename [filename ...]
|
||||
|
||||
Generate Kubernetes architecture diagrams from Kubernetes manifest files
|
||||
@@ -89,114 +200,597 @@ positional arguments:
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
-o OUTPUT, --output OUTPUT
|
||||
output diagram filename
|
||||
-f FORMAT, --format FORMAT
|
||||
output format, allowed formats are png (default), jpg, svg, pdf, and dot
|
||||
-c CONFIG, --config CONFIG
|
||||
custom kube-diagrams configuration file
|
||||
-o, --output OUTPUT output diagram filename
|
||||
-f, --format FORMAT output format, allowed formats are dot, dot_json, gif, jp2, jpe, jpeg, jpg, pdf, png, svg, tif, tiff, set to png by default
|
||||
--embed-all-icons embed all icons into svg or dot_json output diagrams
|
||||
-c, --config CONFIG custom kube-diagrams configuration file
|
||||
-n, --namespace NAMESPACE
|
||||
visualize only the resources inside a given namespace
|
||||
-v, --verbose verbosity, set to false by default
|
||||
--without-namespace disable namespace cluster generation
|
||||
```
|
||||
|
||||
Examples:
|
||||
|
||||
```sh
|
||||
# generate a diagram from a manifest
|
||||
kube-diagrams -o cassandra.png examples/cassandra/cassandra.yml
|
||||
|
||||
# generate a diagram from a kustomize folder
|
||||
kubectl kustomize path_to_a_kustomize_folder | kube-diagrams - -o diagram.png
|
||||
|
||||
# generate a diagram from a helmfile descriptor
|
||||
helmfile template -f helmfile.yaml | kube-diagrams - -o diagram.png
|
||||
|
||||
# generate a diagram from the actual default namespace state
|
||||
kubectl get all -o yaml | kube-diagrams -o default-namespace.png -
|
||||
|
||||
# generate a diagram of all workload and service resources from all namespaces
|
||||
kubectl get all --all-namespaces -o yaml | kube-diagrams -o all-namespaces.png -
|
||||
```
|
||||
|
||||
#### 🧩 `kubectl` Plugin Support
|
||||
|
||||
You can use KubeDiagrams as a `kubectl` plugin as well for a more integrated Kubernetes workflow. This allows you to run commands like:
|
||||
|
||||
```sh
|
||||
kubectl diagrams all -o diagram.png
|
||||
```
|
||||
|
||||
To enable this, simply symlink or copy the [`kubectl-diagrams`](./bin/kubectl-diagrams) script onto your `$PATH`:
|
||||
|
||||
```sh
|
||||
ln -s $(which kubectl-diagrams) /usr/local/bin/kubectl-diagrams
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> You will also already need `kube-diagrams` on your `$PATH` as well for this to work.
|
||||
|
||||
You can alternatively install it via Nix:
|
||||
|
||||
```sh
|
||||
nix shell github:philippemerle/KubeDiagrams#kubectl-diagrams
|
||||
```
|
||||
|
||||
### `helm-diagrams`
|
||||
|
||||
`helm-diagrams` generates a Kubernetes architecture diagram from an Helm chart.
|
||||
|
||||
```sh
|
||||
Usage: helm-diagrams <helm-chart-url> [OPTIONS] [FLAGS]
|
||||
|
||||
A script to generate a diagram of an Helm chart using kube-diagrams.
|
||||
|
||||
Options:
|
||||
-o, --output <file> Specify the output file for the diagram
|
||||
-f, --format <format> Specify the output format (e.g., png, svg)
|
||||
--embed-all-icons Embed all icons into svg or dot_json output diagrams
|
||||
-c, --config <file> Specify the custom kube-diagrams configuration file
|
||||
-h, --help Display this help message
|
||||
|
||||
Any flag supported by helm template, e.g.:
|
||||
-g, --generate-name Generate the name (and omit the NAME parameter)
|
||||
--include-crds Include CRDs in the templated output
|
||||
-l, --labels stringToString Labels that would be added to release metadata. Should be divided by comma. (default [])
|
||||
--name-template string Specify template used to name the release
|
||||
--set stringArray Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
--set-file stringArray Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)
|
||||
--set-json stringArray Set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2)
|
||||
--set-literal stringArray Set a literal STRING value on the command line
|
||||
--set-string stringArray Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
|
||||
-f, --values strings Specify values in a YAML file or a URL (can specify multiple)
|
||||
--version string Specify a version constraint for the chart version to use. This constraint can be a specific tag (e.g. 1.1.1) or it may reference a valid range (e.g. ^2.0.0). If this is not specified, the latest version is used
|
||||
|
||||
Examples:
|
||||
helm-diagrams https://charts.jetstack.io/cert-manager -o diagram.png
|
||||
helm-diagrams https://charts.jetstack.io/cert-manager --set crds.enabled=true -o cert-manager.png
|
||||
helm-diagrams oci://ghcr.io/argoproj/argo-helm/argo-cd -f svg
|
||||
helm-diagrams --help
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> `helm-diagrams` requires that the `helm` command was installed.
|
||||
|
||||
Examples:
|
||||
|
||||
```ssh
|
||||
# generate a diagram for the Helm chart 'cert-manager' available in HTTP repository 'charts.jetstack.io'
|
||||
helm-diagrams https://charts.jetstack.io/cert-manager
|
||||
|
||||
# generate a diagram for the Helm chart 'argo-cd' available in OCI repository 'ghcr.io'
|
||||
helm-diagrams oci://ghcr.io/argoproj/argo-helm/argo-cd
|
||||
|
||||
# generate a diagram for the Helm chart 'some-chart' available locally
|
||||
helm-diagrams some-path/some-chart
|
||||
```
|
||||
|
||||
### With Docker/Podman
|
||||
|
||||
**KubeDiagrams** images are available in [Docker Hub](https://hub.docker.com/r/philippemerle/kubediagrams).
|
||||
|
||||
```ssh
|
||||
# For usage with Podman, replace 'docker' by 'podman' in the following lines.
|
||||
|
||||
# generate a diagram from a manifest
|
||||
docker run -v "$(pwd)":/work philippemerle/kubediagrams kube-diagrams -o cassandra.png examples/cassandra/cassandra.yml
|
||||
|
||||
# generate a diagram from a kustomize folder
|
||||
kubectl kustomize path_to_a_kustomize_folder | docker run -v "$(pwd)":/work -i philippemerle/kubediagrams kube-diagrams - -o diagram.png
|
||||
|
||||
# generate a diagram from a helmfile descriptor
|
||||
helmfile template -f helmfile.yaml | docker run -v "$(pwd)":/work -i philippemerle/kubediagrams kube-diagrams - -o diagram.png
|
||||
|
||||
# generate a diagram from the actual default namespace state
|
||||
kubectl get all -o yaml | docker run -v "$(pwd)":/work -i philippemerle/kubediagrams kube-diagrams -o default-namespace.png -
|
||||
|
||||
# generate a diagram of all workload and service resources from all namespaces
|
||||
kubectl get all --all-namespaces -o yaml | docker run -v "$(pwd)":/work -i philippemerle/kubediagrams kube-diagrams -o all-namespaces.png -
|
||||
|
||||
# generate a diagram for the Helm chart 'cert-manager' available in HTTP repository 'charts.jetstack.io'
|
||||
docker run -v "$(pwd)":/work philippemerle/kubediagrams helm-diagrams https://charts.jetstack.io/cert-manager
|
||||
|
||||
# generate a diagram for the Helm chart 'argo-cd' available in OCI repository 'ghcr.io'
|
||||
docker run -v "$(pwd)":/work philippemerle/kubediagrams helm-diagrams oci://ghcr.io/argoproj/argo-helm/argo-cd
|
||||
```
|
||||
|
||||
### GitHub Action
|
||||
|
||||
You can use **KubeDiagrams** (and Helm Diagrams) in your GitHub Action workflows.
|
||||
|
||||
```yaml
|
||||
name: "Your GitHub Action Name"
|
||||
on:
|
||||
workflow_dispatch: # add your specific triggers (https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows)
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate diagram from Kubernetes manifest"
|
||||
uses: philippemerle/KubeDiagrams@main
|
||||
with:
|
||||
type: "kubernetes"
|
||||
args: "-o examples/cassandra/cassandra.png examples/cassandra/cassandra.yml"
|
||||
|
||||
- name: "Generate diagram from Helm chart"
|
||||
uses: philippemerle/KubeDiagrams@main
|
||||
with:
|
||||
type: "helm"
|
||||
args: "https://charts.jetstack.io/cert-manager"
|
||||
```
|
||||
|
||||
Action `philippemerle/KubeDiagrams@main` is available [here](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/action.yml).
|
||||
|
||||
## Features
|
||||
|
||||
### Kubernetes resources
|
||||
### Kubernetes built-in resources
|
||||
|
||||
Supported `kind`/`apiVersion` resource types are 42 ones:
|
||||
* APIService/apiregistration.k8s.io/v1
|
||||
* ClusterRole/rbac.authorization.k8s.io/v1
|
||||
* ClusterRoleBinding/rbac.authorization.k8s.io/v1
|
||||
* ConfigMap/v1
|
||||
* CronJob/batch/v1
|
||||
* CustomResourceDefinition/apiextensions.k8s.io/v1
|
||||
* CSIDriver/storage.k8s.io/v1
|
||||
* DaemonSet/apps/v1
|
||||
* Deployment/apps/v1
|
||||
* Endpoints/v1
|
||||
* EndpointSlice/discovery.k8s.io/v1
|
||||
* Group/rbac.authorization.k8s.io/v1
|
||||
* HorizontalPodAutoscaler/autoscaling/v1
|
||||
* HorizontalPodAutoscaler/autoscaling/v2
|
||||
* Ingress/networking.k8s.io/v1
|
||||
* IngressClass/networking.k8s.io/v1
|
||||
* Job/batch/v1
|
||||
* Lease/coordination.k8s.io/v1
|
||||
* LimitRange/v1
|
||||
* MutatingWebhookConfiguration/admissionregistration.k8s.io/v1
|
||||
* Namespace/v1
|
||||
* NetworkAttachmentDefinition/k8s.cni.cncf.io/v1
|
||||
* NetworkPolicy/networking.k8s.io/v1
|
||||
* Node/v1
|
||||
* PersistentVolume/v1
|
||||
* PersistentVolumeClaim/v1
|
||||
* PriorityClass/scheduling.k8s.io/v1
|
||||
* Pod/v1
|
||||
* PodDisruptionBudget/policy/v1
|
||||
* PodSecurityPolicy/policy/v1beta1
|
||||
* ReplicaSet/apps/v1
|
||||
* ResourceQuota/v1
|
||||
* Role/rbac.authorization.k8s.io/v1
|
||||
* RoleBinding/rbac.authorization.k8s.io/v1
|
||||
* Secret/v1
|
||||
* Service/v1
|
||||
* ServiceAccount/v1
|
||||
* StatefulSet/apps/v1
|
||||
* StorageClass/storage.k8s.io/v1
|
||||
* User/rbac.authorization.k8s.io/v1
|
||||
* ValidatingWebhookConfiguration/admissionregistration.k8s.io/v1
|
||||
* VolumeAttachment/storage.k8s.io/v1
|
||||
**KubeDiagrams** supported the following 47 Kubernetes resource types:
|
||||
|
||||
**Note**: The mapping between these supported Kubernetes resources and architecture diagrams is defined into [bin/kube-diagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/bin/kube-diagrams.yaml#L65).
|
||||
| Kind | ApiGroup | Versions | Icon |
|
||||
| :------------------------------: | :----------------------------: | :---------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------: |
|
||||
| `APIService` | `apiregistration.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `ClusterRole` | `rbac.authorization.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `ClusterRoleBinding` | `rbac.authorization.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `ConfigMap` | | `v1` |  |
|
||||
| `CronJob` | `batch` | `v1beta1` `v1` |  |
|
||||
| `CSIDriver` | `storage.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `CSINode` | `storage.k8s.io` | `v1` |  |
|
||||
| `CSIStorageCapacity` | `storage.k8s.io` | `v1` |  |
|
||||
| `CustomResourceDefinition` | `apiextensions.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `DaemonSet` | `apps` `extensions` | `v1beta1` `v1beta2` `v1` |  |
|
||||
| `Deployment` | `apps` `extensions` | `v1beta1` `v1beta2` `v1` |  |
|
||||
| `Endpoints` | | `v1` |  |
|
||||
| `EndpointSlice` | `discovery.k8s.io` | `v1` |  |
|
||||
| `Group` | `rbac.authorization.k8s.io` | `v1` |  |
|
||||
| `HorizontalPodAutoscaler` | `autoscaling` | `v1` `v2beta1` `v2beta2` `v2` |  |
|
||||
| `Ingress` | `networking.k8s.io` `extensions` | `v1beta1` `v1` |  |
|
||||
| `IngressClass` | `networking.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `Job` | `batch` | `v1beta1` `v1` |  |
|
||||
| `Lease` | `coordination.k8s.io` | `v1` |  |
|
||||
| `LimitRange` | | `v1` |  |
|
||||
| `MutatingWebhookConfiguration` | `admissionregistration.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `Namespace` | | `v1` |  |
|
||||
| `NetworkAttachmentDefinition` | `k8s.cni.cncf.io` | `v1` |  |
|
||||
| `NetworkPolicy` | `networking.k8s.io` | `v1` |  |
|
||||
| `Node` | | `v1` |  |
|
||||
| `PersistentVolume` | | `v1` |  |
|
||||
| `PersistentVolumeClaim` | | `v1` |  |
|
||||
| `Pod` | | `v1` |  |
|
||||
| `PodDisruptionBudget` | `policy` | `v1beta1` `v1` |  |
|
||||
| `PodSecurityPolicy` | `policy` `extensions` | `v1beta1` `v1` |  |
|
||||
| `PodTemplate` | | `v1` |  |
|
||||
| `PriorityClass` | `scheduling.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `ReplicaSet` | `apps` | `v1` |  |
|
||||
| `ReplicationController` | | `v1` |  |
|
||||
| `ResourceQuota` | | `v1` |  |
|
||||
| `Role` | `rbac.authorization.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `RoleBinding` | `rbac.authorization.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `RuntimeClass` | `node.k8s.io` | `v1` |  |
|
||||
| `Secret` | | `v1` |  |
|
||||
| `Service` | | `v1` |  |
|
||||
| `ServiceAccount` | | `v1` |  |
|
||||
| `StatefulSet` | `apps` | `v1beta1` `v1beta2` `v1` |  |
|
||||
| `StorageClass` | `storage.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `User` | `rbac.authorization.k8s.io` | `v1` |  |
|
||||
| `ValidatingWebhookConfiguration` | `admissionregistration.k8s.io` | `v1beta1` `v1` |  |
|
||||
| `VerticalPodAutoscaler` | `autoscaling.k8s.io` | `v1` |  |
|
||||
| `VolumeAttachment` | `storage.k8s.io` | `v1` |  |
|
||||
|
||||
**Note**: The mapping for any Kubernetes custom resources can be also defined into **KubeDiagrams** configuration files as illustrated in [examples/k0s/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/k0s/KubeDiagrams.yml#L10) and [examples/kube-prometheus-stack/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/kube-prometheus-stack/KubeDiagrams.yaml#L3).
|
||||
**Note**: The mapping between these supported Kubernetes resources and architecture diagrams is defined into [bin/kube-diagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/bin/kube-diagrams.yaml#L103).
|
||||
|
||||
Currently, unsupported `kind`/`apiGroup` resource types are 20 ones:
|
||||
* Binding/
|
||||
* ComponentStatus/
|
||||
* Event/
|
||||
* PodTemplate/
|
||||
* ReplicationController/
|
||||
* ControllerRevision/apps
|
||||
* TokenReview/authentication.k8s.io
|
||||
* LocalSubjectAccessReview/authorization.k8s.io
|
||||
* SelfSubjectAccessReview/authorization.k8s.io
|
||||
* SelfSubjectRulesReview/authorization.k8s.io
|
||||
* SubjectAccessReview/authorization.k8s.io
|
||||
* CertificateSigningRequest/certificates.k8s.io
|
||||
* Event/events.k8s.io
|
||||
* FlowSchema/flowcontrol.apiserver.k8s.io
|
||||
* PriorityLevelConfiguration/flowcontrol.apiserver.k8s.io
|
||||
* NodeMetrics/metrics.k8s.io
|
||||
* PodMetrics/metrics.k8s.io
|
||||
* RuntimeClass/node.k8s.io
|
||||
* CSINode/storage.k8s.io
|
||||
* CSIStorageCapacity/storage.k8s.io
|
||||
Currently, there are 16 unsupported Kubernetes resource types:
|
||||
|
||||
| Kind | ApiGroup |
|
||||
| :--------------------------: | :----------------------------: |
|
||||
| `Binding` | |
|
||||
| `ComponentStatus` | |
|
||||
| `Event` | |
|
||||
| `ControllerRevision` | `apps` |
|
||||
| `TokenReview` | `authentication.k8s.io` |
|
||||
| `LocalSubjectAccessReview` | `authorization.k8s.io` |
|
||||
| `SelfSubjectAccessReview` | `authorization.k8s.io` |
|
||||
| `SelfSubjectReview` | `authorization.k8s.io` |
|
||||
| `SelfSubjectRulesReview` | `authorization.k8s.io` |
|
||||
| `SubjectAccessReview` | `authorization.k8s.io` |
|
||||
| `CertificateSigningRequest` | `certificates.k8s.io` |
|
||||
| `Event` | `events.k8s.io` |
|
||||
| `FlowSchema` | `flowcontrol.apiserver.k8s.io` |
|
||||
| `PriorityLevelConfiguration` | `flowcontrol.apiserver.k8s.io` |
|
||||
| `NodeMetrics` | `metrics.k8s.io` |
|
||||
| `PodMetrics` | `metrics.k8s.io` |
|
||||
|
||||
### Kubernetes custom resources
|
||||
|
||||
The mapping for any Kubernetes custom resources can be also defined into **KubeDiagrams** configuration files as illustrated in [examples/k0s/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/k0s/KubeDiagrams.yml#L10), [examples/kube-prometheus-stack/monitoring.coreos.com.kdc](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/kube-prometheus-stack/monitoring.coreos.com.kdc#L4), [examples/lws/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/lws/KubeDiagrams.yml#L19),
|
||||
[examples/argo/KubeDiagrams.yaml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/argo/KubeDiagrams.yaml#L22), and [examples/external-secrets/external-secrets.io.kdc](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/external-secrets/external-secrets.io.kdc#L1).
|
||||
Following lists some custom resources already supported in [examples](https://github.com/philippemerle/KubeDiagrams/blob/main/examples).
|
||||
|
||||
| Kind | ApiGroup | Versions | Icon |
|
||||
| :------------------------------: | :----------------------------: | :---------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------: |
|
||||
| `Application` | `argoproj.io` | `v1alpha1` |  |
|
||||
| `EventBus` | `argoproj.io` | `v1alpha1` |  |
|
||||
| `EventSource` | `argoproj.io` | `v1alpha1` |  |
|
||||
| `Rollout` | `argoproj.io` | `v1alpha1` |  |
|
||||
| `Sensor` | `argoproj.io` | `v1alpha1` |  |
|
||||
| `Workflow` | `argoproj.io` | `v1alpha1` |  |
|
||||
| `Service` | `serving.knative.dev` | `v1` |  |
|
||||
| `Route` | `route.openshift.io` | `v1` |  |
|
||||
| `Chart` | `helm.k0sproject.io` | `v1beta1` |  |
|
||||
| `ControlNode` | `autopilot.k0sproject.io` | `v1beta2` |  |
|
||||
| `EtcdMember` | `etcd.k0sproject.io` | `v1beta1` |  |
|
||||
| `Plan` | `autopilot.k0sproject.io` | `v1beta2` |  |
|
||||
| `UpdateConfig` | `autopilot.k0sproject.io` | `v1beta2` |  |
|
||||
| `Alertmanager` | `monitoring.coreos.com` | `v1` |  |
|
||||
| `Prometheus` | `monitoring.coreos.com` | `v1` |  |
|
||||
| `PrometheusRule` | `monitoring.coreos.com` | `v1` |  |
|
||||
| `ServiceMonitor` | `monitoring.coreos.com` | `v1` |  |
|
||||
| `LeaderWorkerSet` | `leaderworkerset.x-k8s.io` | `v1` |  |
|
||||
| `Certificate` | `cert-manager.io` | `v1alpha1` `v1alpha2` `v1` |  |
|
||||
| `ClusterIssuer` | `cert-manager.io` | `v1alpha1` `v1alpha2` `v1` |  |
|
||||
| `Issuer` | `cert-manager.io` | `v1alpha1` `v1alpha2` `v1` |  |
|
||||
| `ExternalSecret` | `external-secrets.io` | `v1alpha1` `v1beta1` `v1` |  |
|
||||
| `SecretStore` | `external-secrets.io` | `v1alpha1` `v1beta1` `v1` |  |
|
||||
|
||||
### Kubernetes resources clustering
|
||||
|
||||
With **KubeDiagrams**, Kubernetes resources can be clustered within the architecture diagrams automatically. **KubeDiagrams** uses the `metadata.namespace` resource field as first clustering criteria. Then, the `metadata.labels` keys can be used to define subclusters. Following table lists the predefined mappings between label keys and cluster titles as defined in the [bin/kube-diagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/bin/kube-diagrams.yaml#L37) file (see the `clusters` list).
|
||||
With **KubeDiagrams**, Kubernetes resources can be clustered within the architecture diagrams automatically. **KubeDiagrams** uses the `metadata.namespace` resource field as first clustering criteria. Then, the `metadata.labels` keys can be used to define subclusters. Following table lists the predefined mappings between label keys and cluster titles, and background colors as defined in the [bin/kube-diagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/bin/kube-diagrams.yaml#L31) file (see the `clusters` list).
|
||||
|
||||
| Label | Cluster Title |
|
||||
| :--------: | :-------: |
|
||||
| `app.kubernetes.io/instance` | K8s Instance |
|
||||
| `release` | Release |
|
||||
| `helm.sh/chart` | Helm Chart |
|
||||
| `chart` | Chart |
|
||||
| `app.kubernetes.io/name` | K8s Application |
|
||||
| `app` | Application |
|
||||
| `app.kubernetes.io/component` | K8s Component |
|
||||
| `service` | Microservice |
|
||||
| `tier` | Tier |
|
||||
| Label Key | Cluster Title | Background Color | Recommended |
|
||||
| :---------------------------: | :----------------------------: | :----------------------------: | :----------------------------: |
|
||||
| `app.kubernetes.io/instance` | K8s Instance: `label value` |  | Yes |
|
||||
| `release` | Release: `label value` |  | No |
|
||||
| `helm.sh/chart` | Helm Chart: `label value` |  | Yes |
|
||||
| `chart` | Chart: `label value` |  | No |
|
||||
| `app.kubernetes.io/name` | K8s Application: `label value` |  | Yes |
|
||||
| `app` | Application: `label value` |  | No |
|
||||
| `tier` | Tier: `label value` |  | No |
|
||||
| `app.kubernetes.io/component` | K8s Component: `label value` |  | Yes |
|
||||
| `component` | Component: `label value` |  | No |
|
||||
| `service` | Microservice: `label value` |  | No |
|
||||
| `rbac.authorization.k8s.io/aggregate-to-admin` | Admin ClusterRole Aggregation | transparent | Yes |
|
||||
| `rbac.authorization.k8s.io/aggregate-to-edit` | Edit ClusterRole Aggregation | transparent | Yes |
|
||||
| `rbac.authorization.k8s.io/aggregate-to-view` | View ClusterRole Aggregation | transparent | Yes |
|
||||
|
||||
New mappings can be easily defined in custom configuration files (see [examples/minikube/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/minikube/KubeDiagrams.yml#L2), [examples/k0s/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/k0s/KubeDiagrams.yml#L5), [examples/free5gc-k8s/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/free5gc-k8s/KubeDiagrams.yml#L2), [examples/open5gs-k8s/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/open5gs-k8s/KubeDiagrams.yml#L2), and [examples/towards5gs-helm/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/towards5gs-helm/KubeDiagrams.yml#L2)) and provided to **KubeDiagrams** via the `--config` command-line option.
|
||||
Resource clustering could be also annotation-based, i.e. based on `metadata.annotations` keys. Following table lists the predefined mappings between annotation keys, cluster titles, and background colors as defined in the [bin/kube-diagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/bin/kube-diagrams.yaml#L97) file.
|
||||
|
||||
| Annotation Key | Cluster Title | Background Color | Recommended |
|
||||
| :------------: | :----------------: | :----------------: | :----------------: |
|
||||
| `helm.sh/hook` | `annotation value` |  | Yes |
|
||||
|
||||
New label/annotation-based mappings can be easily defined in custom configuration files (see [examples/minikube/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/minikube/KubeDiagrams.yml#L2), [examples/k0s/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/k0s/KubeDiagrams.yml#L5), [examples/free5gc-k8s/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/free5gc-k8s/KubeDiagrams.yml#L2), [examples/open5gs-k8s/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/open5gs-k8s/KubeDiagrams.yml#L2), [examples/towards5gs-helm/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/towards5gs-helm/KubeDiagrams.yml#L2), [examples/lws/KubeDiagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/lws/KubeDiagrams.yml#L1), and [examples/argo/KubeDiagrams.yaml](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/argo/KubeDiagrams.yaml#L9))
|
||||
and provided to **KubeDiagrams** via the `--config` command-line option.
|
||||
|
||||
### Kubernetes resource relationships
|
||||
|
||||
With **KubeDiagrams**, each relationship between Kubernetes resources is represented by a visual edge between visual nodes.
|
||||
Following table lists the predefined edges as defined in the [bin/kube-diagrams.yml](https://github.com/philippemerle/KubeDiagrams/blob/main/bin/kube-diagrams.yaml#L3) file (see the `edges` map).
|
||||
|
||||
| Edge Kind | Edge Style | Edge Color | Meaning |
|
||||
| :-------------: | :--------: | :--------: | :-------------------------------------------------------------------: |
|
||||
| `REFERENCE` | `solid` | `black` | Used when a resource refers to another resource directly |
|
||||
| `SELECTOR` | `dashed` | `black` | Used when a resource refers to other resources via a selector |
|
||||
| `OWNER` | `dotted` | `black` | Used when a resource owns another resource |
|
||||
| `COMMUNICATION` | `solid` | `brown` | Used to represent ingress and egress networking policies between pods |
|
||||
|
||||
New edges can be easily defined or redefined in custom configuration files, and provided to **KubeDiagrams** via the `--config` command-line option.
|
||||
|
||||
Following diagram illustrates all the visual nodes, edges, and clusters supported by default by **KubeDiagrams**.
|
||||
|
||||
.
|
||||
|
||||
Generated SVG diagrams contain tooltips for each cluster/node/edge as illustrated in [images/semiotics.svg](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/images/semiotics.svg)
|
||||
|
||||
### Declarative custom diagrams
|
||||
|
||||
By default, **KubeDiagrams** generates diagrams from data contained into Kubernetes manifest files, actual cluster state, kustomization files, or Helm charts automatically. But sometimes, users would like to customize generated diagrams by adding their own clusters, nodes and edges as illustrated in the following diagram:
|
||||
|
||||
[](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/wordpress/wordpress_deployed_in_aws_eks.png)
|
||||
|
||||
This previous diagram contains three custom clusters labelled with `Amazon Web Service`, `Account: Philippe Merle` and `My Elastic Kubernetes Cluster`, three custom nodes labelled with `Users`, `Elastic Kubernetes Services`, and `Philippe Merle`, and two custom edges labelled with `use` and `calls`. The rest of this custom diagram is generated from actual cluster state for a deployed WordPress application automatically.
|
||||
Have a look to [examples/wordpress/custom_diagram.kd](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/wordpress/custom_diagram.kd), [examples/online-boutique/custom_diagram.kd](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/online-boutique/custom_diagram.kd), and
|
||||
[examples/custom-object-items/config/custom-object-items.kd](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/custom-object-items/config/custom-object-items.kd) to see how to define custom diagrams, clusters, nodes and edges declaratively.
|
||||
|
||||
## KubeDiagrams Interactive Viewer
|
||||
|
||||
**KubeDiagrams** could output diagrams in the `dot_json` format. For instance, type:
|
||||
|
||||
```sh
|
||||
kube-diagrams examples/wordpress/*.yaml -o wordpress.dot_json
|
||||
```
|
||||
|
||||
Diagrams in the `dot_json` format can be viewed and manipulated interactively thanks to **KubeDiagrams Interactive Viewer**. For instance, type:
|
||||
|
||||
```sh
|
||||
open interactive_viewer/index.html
|
||||
```
|
||||
|
||||
Then open the `wordpress.dot_json` file:
|
||||
|
||||

|
||||
|
||||
**KubeDiagrams Interactive Viewer** allows users to zoom in/out diagrams, to see cluster/node/edge tooltips, open/close clusters, move clusters/nodes interactively, and save as PNG/JPG images.
|
||||
|
||||
## Architecture
|
||||
|
||||
Following figure shows the software architecture of **KubeDiagrams**.
|
||||
|
||||

|
||||
|
||||
## Real-World Use Cases
|
||||
|
||||
Following provides links to real-world use cases.
|
||||
|
||||
### Documentation
|
||||
|
||||
**KubeDiagrams** could be used to generate architectural diagrams documenting your Kubernetes applications (manifests, Helm charts, helmfiles, or cluster state). See following links:
|
||||
|
||||
- [duoan/tinyurl](https://github.com/duoan/tinyurl?tab=readme-ov-file#deployment-kubernetes)
|
||||
- [Daniel-Makhoba-Emmanuel/Full-stack-k8s-lab](https://github.com/Daniel-Makhoba-Emmanuel/Full-stack-k8s-lab)
|
||||
|
||||
### Architectural defects identification
|
||||
|
||||
Diagrams generated by **KubeDiagrams** could help you to identify architectural defects in your own or used Kubernetes applications. See following links:
|
||||
|
||||
- [Gradiant/5g-charts](https://github.com/Gradiant/5g-charts/pull/218)
|
||||
- [argoproj/argo-cd](https://github.com/argoproj/argo-cd/pull/23313)
|
||||
- [argoproj/argo-events](https://github.com/argoproj/argo-events/pull/3627)
|
||||
- [argoproj/argo-helm](https://github.com/argoproj/argo-helm/pull/3350)
|
||||
|
||||
### Debugging
|
||||
|
||||
Generated diagrams could help you to debug your own or used Kubernetes applications. See following links:
|
||||
|
||||
- [How KubeDiagrams Saved My Day While Debugging Kubernetes at Porch](https://www.linkedin.com/feed/update/urn:li:activity:7340773828572172288/)
|
||||
- [A subtle issue in Kube Prometheus Stack Helm Chart](https://github.com/prometheus-community/helm-charts/issues/6039)
|
||||
|
||||
### Your own real-world use cases
|
||||
|
||||
Don't hesitate to submit your own real-world use cases as [pull requests](https://github.com/philippemerle/KubeDiagrams/pulls).
|
||||
|
||||
## What do they say about it?
|
||||
|
||||
Posts and blogs about **KubeDiagrams**:
|
||||
* [Facebook Kubernetes Users Group](https://www.facebook.com/groups/kubernetes.users/permalink/2818586068320504)
|
||||
* [Visualising SQL Server in Kubernetes](https://dbafromthecold.com/2025/02/06/visualising-sql-server-in-kubernetes/)
|
||||
### Papers
|
||||
|
||||
1. [Visualizing Cloud-native Applications with KubeDiagrams](https://hal.science/hal-05263068). Philippe Merle and Fabio Petrillo. Proceedings of the [13th IEEE Working Conference on Software Visualization - VISSOFT 2025](https://vissoft.io/2025), pp.106-116, Auckland, New Zealand, September 2025.
|
||||
|
||||
1. [Visualizing Cloud-native Applications with KubeDiagrams](http://arxiv.org/abs/2505.22879). Philippe Merle and Fabio Petrillo. arXiv. May 28, 2025.
|
||||
|
||||
### Talks
|
||||
|
||||
1. [Visualizing Cloud-native Applications with KubeDiagrams](https://github.com/philippemerle/KubeDiagrams/blob/main/docs/2025-VISSOFT-slides.pdf), Philippe Merle, Fabio Petrillo. [13th IEEE Working Conference on Software Visualization (VISSOFT 2025)](https://vissoft.io/2025/), Auckland, New Zealand, September 7-8, 2025.
|
||||
|
||||
1. [Visualizing cloud-native applications with KubeDiagrams](https://mybox.inria.fr/f/61de0e6e5be94b7a941f/?dl=1), Philippe Merle, [PEPR Cloud Taranis Project](https://pepr-cloud.fr/en/project-taranis/), February 17, 2025.
|
||||
|
||||
### Blogs
|
||||
|
||||
1. [KubeDiagrams: Automatically Generate Stunning Kubernetes Architecture Diagrams from Code and Clusters](https://engineering.01cloud.com/2025/12/24/kubediagrams-automatically-generate-stunning-kubernetes-architecture-diagrams-from-code-and-clusters/), 01 Cloud Engineering, December 24, 2025.
|
||||
|
||||
1. [KubeDiagrams - Como gerar diagramas das suas arquiteturas Kubernetes](https://www.linkedin.com/pulse/kubediagrams-como-gerar-diagramas-das-suas-arquiteturas-kubernetes-9xbdf/), Paulo Cerqueira, October 22, 2025.
|
||||
|
||||
1. [Visualising the architecture of cloud-native applications with KubeDiagrams](https://www.inria.fr/en/visualising-architecture-cloud-native-applications-kubediagrams), Inria, October 15, 2025.
|
||||
|
||||
1. [KubeDiagrams: Automating your Kubernetes Architecture](https://medium.com/@iamdanielemmanuelmark5/kubediagrams-automating-your-kubernetes-architecture-9f9b305a7bb4), Daniel Makhoba Emmanuel, Medium, June 19, 2025.
|
||||
|
||||
1. [[Literature Review] Visualizing Cloud-native Applications with KubeDiagrams](https://www.themoonlight.io/en/review/visualizing-cloud-native-applications-with-kubediagrams), Moonlight, May 27, 2025.
|
||||
|
||||
1. [KubeDiagrams](https://blog.csdn.net/gitblog_00745/article/details/147113830), CSDN, April 10, 2025.
|
||||
|
||||
1. [Generate Kubernetes Architecture Maps Directly from Your Cluster](https://blog.abhimanyu-saharan.com/posts/generate-kubernetes-architecture-maps-directly-from-your-cluster), Abhimanyu Saharan, March 29, 2025.
|
||||
|
||||
1. [KubeDiagrams 0.2.0 Makes It Way Easier to Visualize Your Kubernetes Setup](https://medium.com/@PlanB./kubediagrams-0-2-0-makes-it-way-easier-to-visualize-your-kubernetes-setup-bb65dd72668c), Mr.PlanB, Medium, March 27, 2025.
|
||||
|
||||
1. [Visualising SQL Server in Kubernetes](https://dbafromthecold.com/2025/02/06/visualising-sql-server-in-kubernetes/), Andrew Pruski, February 6, 2025.
|
||||
|
||||
### Social Networks
|
||||
|
||||
1. [Kube Architect's post](https://x.com/K8sArchitect/status/2007167771566608550) on X, January 2, 2026.
|
||||
|
||||
1. [01Cloud's post](https://www.linkedin.com/posts/zero-one-cloud_kubediagrams-automatically-generate-stunning-activity-7409579703847710720-ht68/), LinkedIn, December 24, 2025.
|
||||
|
||||
1. [KubeDiagrams](https://www.reddit.com/r/kubernetes/comments/1pqkffu/kubediagrams/), Reddit, December 19, 2025.
|
||||
|
||||
1. [James Whyley's post](https://www.linkedin.com/posts/james-whyley-0941aa31_online-kubediagrams-web-server-activity-7402319330182479872-uK61/) on LinkedIn, December 5, 2025.
|
||||
|
||||
1. [Kube Architect's post](https://x.com/K8sArchitect/status/1995932488393171427) on X, December 2, 2025.
|
||||
|
||||
1. [Kube Architect's post](https://x.com/K8sArchitect/status/1986813654801485978) on X, November 7, 2025.
|
||||
|
||||
1. [OSO's post](https://x.com/osodevops/status/1985564412720091564) on X, November 4, 2025.
|
||||
|
||||
1. [Philippe Merle's post](https://www.linkedin.com/analytics/post-summary/urn:li:activity:7387345855089070080/) on LinkedIn, October 24, 2025.
|
||||
|
||||
1. [Online KubeDiagrams Service](https://www.reddit.com/r/kubernetes/comments/1o4lk73/online_kubediagrams_service/), Reddit, October 12, 2025.
|
||||
|
||||
1. [Kube Architect's post](https://x.com/K8sArchitect/status/1975578370457964926) on X, October 7, 2025.
|
||||
|
||||
1. [Kube Architect's post](https://www.linkedin.com/posts/kubernetes-architect_kubediagrams-reads-kubernetes-manifests-activity-7381344073300979712-pKZa/) on LinkedIn, October 7, 2025.
|
||||
|
||||
1. [Kubernetes What's New's post](https://www.linkedin.com/posts/k8snews_heres-your-quick-roundup-of-the-top-kubernetes-activity-7375559648743043072-1e89/) on LinkedIn, September 22, 2025.
|
||||
|
||||
1. [KubeDiagrams 0.6.0 is out!](https://www.reddit.com/r/kubernetes/comments/1n86imp/kubediagrams_060_is_out/), Reddit, September 4, 2025.
|
||||
|
||||
1. [Evgeny Anikiev's post](https://www.linkedin.com/posts/anikievev_github-philippemerlekubediagrams-generate-activity-7368221605052694528-pB7Y/?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAAemi4BApQnQWOvw041B_9Tbc_ljWmw1-E) on LinkedIn, September 2, 2025.
|
||||
|
||||
1. [Naveen Dornala's post](https://www.linkedin.com/posts/dornalanaveen_github-philippemerlekubediagrams-generate-activity-7353661169821249536-_E6Z/) on LinkedIn, August, 2025.
|
||||
|
||||
1. [Kube Architect's post](https://x.com/K8sArchitect/status/1956434726450860497) on X, August 15, 2025.
|
||||
|
||||
1. [Kubernetes Insights Report - July 2025](https://kube.today/kubernetes-insights-july-2025), Kube Today, August 12, 2025.
|
||||
|
||||
1. [KubeDiagrams 0.5.0 is out!](https://www.reddit.com/r/kubernetes/comments/1mj1lo8/kubediagrams_050_is_out/), Reddit, August 7, 2025. Announce also available [here](https://www.reddit.com/r/devops/comments/1mj1t4p/kubediagrams_050_is_out/).
|
||||
|
||||
1. [Shakur Shaik's post](https://www.linkedin.com/posts/shakur-shaik_use-case-improving-onboarding-for-new-devops-activity-7358598126896582657-5eui/) on LinkedIn, August 6, 2025.
|
||||
|
||||
1. [Shakur Shaik's post](https://www.linkedin.com/feed/update/urn:li:activity:7358597890732187648/) on LinkedIn, August 6, 2025.
|
||||
|
||||
1. [Python Hub's post](https://x.com/PythonHub/status/1948688533952082043) on X, July 25, 2025.
|
||||
|
||||
1. [Alain AIROM's post](https://www.linkedin.com/feed/update/urn:li:activity:7352351521562337280/) on LinkedIn, July 19, 2025.
|
||||
|
||||
1. [Christian Josef Aquino's post](https://www.linkedin.com/feed/update/urn:li:activity:7351589120986533889/) on LinkedIn, July 17, 2025.
|
||||
|
||||
1. [Daniele Polencic's post](https://x.com/danielepolencic/status/1945447333694419110) on X, July 16, 2025.
|
||||
|
||||
1. [Learn Kubernetes Weekly Issue 140](https://www.linkedin.com/posts/danielepolencic_learn-kubernetes-weekly-140-hot-off-the-press-activity-7351213039926349824---gt/), LinkedIn, July 16, 2025.
|
||||
|
||||
1. [Python Trending's post](https://x.com/pythontrending/status/1945434488441356341) on X, July 16, 2025.
|
||||
|
||||
1. [Kube Architect's post](https://x.com/K8sArchitect/status/1945199450273501291) on X, July 15, 2025.
|
||||
|
||||
1. [KubeDiagrams](https://www.reddit.com/r/devops/comments/1lzvsb7/kubediagrams/), Reddit, July 14, 2025.
|
||||
|
||||
1. [New Open-Source Tool Spotlight](https://www.instagram.com/p/DLk3_trO5wt/), Instagram, July 2, 2025.
|
||||
|
||||
1. [Kube Architect's post](https://x.com/K8sArchitect/status/1939401241953497488) on X, June 29, 2025.
|
||||
|
||||
1. [Suman Chakraborty's post](https://www.linkedin.com/posts/schakraborty007_kubernetes-developers-devops-activity-7342764039833296897-0ICb/) on LinkedIn, June 23, 2025.
|
||||
|
||||
1. [KubeDiagrams 0.4.0 is out!](https://www.reddit.com/r/kubernetes/comments/1lfzyly/kubediagrams_040_is_out/), Reddit, June 20, 2025.
|
||||
|
||||
1. [Syed Mansoor A's post](https://www.linkedin.com/feed/update/urn:li:activity:7340773828572172288/) on LinkedIn, June 19, 2025.
|
||||
|
||||
1. [Out Now: Kubernetes Content Performance Analysis Report, May 2025
|
||||
](https://www.linkedin.com/posts/amitjayshah_out-now-kubernetes-content-performance-activity-7340339887239274496-8Td3/), LinkedIn, June 17, 2025. [Full Report](https://drive.google.com/file/d/1Et8ZnCttdvjhj8cHOwcqVJFZ2iLzIMu_/view).
|
||||
|
||||
1. [KubeDiagrams Interactive Viewer](https://www.reddit.com/r/kubernetes/comments/1lbba70/kubediagrams_interactive_viewer/) on Reddit, June 14, 2025.
|
||||
|
||||
1. [Mahyar Mirrashed's post](https://www.linkedin.com/feed/update/urn:li:activity:7339156177529774080/) on LinkedIn, June 13, 2025.
|
||||
|
||||
1. [Christophe Gourdin's post](https://www.linkedin.com/feed/update/urn:li:activity:7338139783220617216/) on LinkedIn, June 10, 2025.
|
||||
|
||||
1. [Preview: Kubernetes Content Performance Analysis Report for May 2025](https://www.linkedin.com/posts/amitjayshah_preview-kubernetes-content-performance-activity-7337803162893885440-Z_Ws/), LinkedIn, June 9, 2025. [Full Report Preview](https://drive.google.com/file/d/1Et8ZnCttdvjhj8cHOwcqVJFZ2iLzIMu_/view).
|
||||
|
||||
1. [Mathieu Acher's post](https://x.com/acherm/status/1932032555424928036) on X, June 9, 2025.
|
||||
|
||||
1. [Philippe Merle's post](https://www.linkedin.com/feed/update/urn:li:activity:7337365803010338817/) on LinkedIn, June 9, 2025.
|
||||
|
||||
1. [KubeDiagrams moved from GPL-3.0 to Apache 2.0 License](https://www.reddit.com/r/kubernetes/comments/1l4djek/kubediagrams_moved_from_gpl30_to_apache_20_license/) on Reddit, June 6, 2025.
|
||||
|
||||
1. [Jimmy Song's post](https://x.com/jimmysongio/status/1930073443866722570) on X, June 4, 2025.
|
||||
|
||||
1. [Sebastian Sejzer’s post](https://www.facebook.com/groups/860938820648880/posts/9900239206718751/) on Facebook, May 30, 2025.
|
||||
|
||||
1. [Donald Lutz’s post](https://www.linkedin.com/posts/donald-lutz-5a9b0b2_github-philippemerlekubediagrams-generate-activity-7334206152311791617-DONS/) on LinkedIn, May 30, 2025.
|
||||
|
||||
1. [Dor Ben Dov’s post](https://www.linkedin.com/posts/dorbendov_visualizing-cloud-native-applications-with-activity-7334205615742873600-RUzT/) on LinkedIn, May 30, 2025.
|
||||
|
||||
1. [박상길’s post](https://www.linkedin.com/posts/상길-박-b6ab145a_github-philippemerlekubediagrams-generate-activity-7334020967683264513-oBMC/) on LinkedIn, May 30, 2025.
|
||||
|
||||
1. [Visualizing Cloud-native Applications with KubeDiagrams](https://www.reddit.com/r/kubernetes/comments/1kyvadz/visualizing_cloudnative_applications_with/) on Reddit, May 30, 2025.
|
||||
|
||||
1. [Kubernetes Architect's post](https://www.linkedin.com/posts/kubernetes-architect_kubediagrams-is-a-tool-that-automatically-activity-7333935435754127381-LSV1/) on LinkedIn, May 29, 2025.
|
||||
|
||||
1. [Kubernetes Architect's post](https://x.com/K8sArchitect/status/1928169735843180597) on X, May 29, 2025.
|
||||
|
||||
1. [KubeDiagrams](https://app.daily.dev/posts/kubediagrams-e35zcloui) on Daily.dev, May 8, 2025.
|
||||
|
||||
1. [KubeDiagrams 0.3.0 is out!](https://www.reddit.com/r/kubernetes/comments/1kapc3i/kubediagrams_030_is_out/) on Reddit, April 29, 2025.
|
||||
|
||||
1. [JReuben1's post](https://x.com/jreuben1/status/1913635086047596736) on X, April 19, 2025.
|
||||
|
||||
1. [Custom declarative diagrams with KubeDiagrams](https://www.reddit.com/r/kubernetes/comments/1k184xj/custom_declarative_diagrams_with_kubediagrams/) on Reddit, April 17, 2025.
|
||||
|
||||
1. [DevOps Radar](https://www.linkedin.com/posts/devops-radar_kubernetes-devops-kubediagrams-activity-7310533737325174784-zEJi) on LinkedIn, April 1, 2025.
|
||||
|
||||
1. [Gregory Lindner’s post](https://www.linkedin.com/posts/lindnergreg_kubernetes-helm-activity-7310607746469429250-RXKX/) on LinkedIn, March, 2025.
|
||||
|
||||
1. [Vishnu Hari Dadhich’s post](https://www.linkedin.com/posts/vishnuhd_kubernetes-devops-kubediagrams-activity-7310533734376579073-y11N/) on LinkedIn, March, 2025.
|
||||
|
||||
1. [Rino Rondan’s post](https://www.linkedin.com/posts/rondancesar_kubediagrams-020-makes-it-way-easier-to-activity-7310933226984787968-Tm4X) on LinkedIn, March, 2025.
|
||||
|
||||
1. [Michael Cade's post](https://x.com/MichaelCade1/status/1905964723809427625) on X, March 29, 2025.
|
||||
|
||||
1. [Paco Xu's post](https://x.com/xu_paco/status/1904807247206899941) on X, March 26, 2025.
|
||||
|
||||
1. [KubeDiagrams 0.2.0 is out!](https://www.reddit.com/r/kubernetes/comments/1jjjw6j/kubediagrams_020_is_out/) on Reddit, March 25, 2025.
|
||||
|
||||
1. [KubeDiagrams: Revolutionizing Cloud Cluster Management!
|
||||
](https://www.linkedin.com/posts/pepr-cloud_kubediagrams-activity-7307698605371379713-BqRp/) on LinkedIn, March 18, 2025.
|
||||
|
||||
1. [Anyone know of any repos/open source tools that can create k8 diagrams?](https://www.reddit.com/r/kubernetes/comments/1jabdoa/anyone_know_of_any_reposopen_source_tools_that/) on Reddit, March 13, 2025.
|
||||
|
||||
1. [Automation of diagram creation for Kubernetes](https://tlgrm.ru/channels/@devsecops_weekly/1145), DevSecOps, February/March 2025.
|
||||
|
||||
1. [Facebook Kubernetes Users Group](https://www.facebook.com/groups/kubernetes.users/permalink/2818586068320504), February 6, 2025.
|
||||
|
||||
1. [KubeDiagrams](https://www.reddit.com/r/kubernetes/comments/1ihjujy/kubediagrams) on Reddit, February 4, 2025.
|
||||
|
||||
### Referencing sites
|
||||
|
||||
1. [Cloud Native Landscape](https://landscape.cncf.io/)
|
||||
|
||||
1. [Awesome Cloud Native](https://github.com/rootsongjc/awesome-cloud-native)
|
||||
|
||||
1. [Awesome-Kubernetes](https://github.com/ramitsurana/awesome-kubernetes)
|
||||
|
||||
1. [Awesome Kubernetes Resources](https://github.com/tomhuang12/awesome-k8s-resources)
|
||||
|
||||
1. [Awesome Open Source K8s And Container Tools](https://github.com/vilaca/awesome-k8s-tools)
|
||||
|
||||
1. [Kubetools - Curated List of Kubernetes Tools](https://github.com/collabnix/kubetools/)
|
||||
|
||||
1. [GitHub mingrammer/diagrams](https://github.com/mingrammer/diagrams)
|
||||
|
||||
1. [Tool of the day](https://www.techopsexamples.com/p/understanding-kubernetes-etcd-locks), TechOps Examples, February 11, 2025.
|
||||
|
||||
1. [Papers with Code](https://cs.paperswithcode.com/)
|
||||
|
||||
### Your own contributions
|
||||
|
||||
Don't hesitate to submit your own papers, talks, blogs, social network posts, and referencing sites as [pull requests](https://github.com/philippemerle/KubeDiagrams/pulls).
|
||||
|
||||
## Star History
|
||||
|
||||
[](https://www.star-history.com/#philippemerle/KubeDiagrams&Date)
|
||||
|
||||
## Issue Stats
|
||||
|
||||
[Issue Stats](https://issues.ecosyste.ms/hosts/GitHub/repositories/philippemerle%2FKubeDiagrams)
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the GPL-3.0 license - see the [LICENSE](https://github.com/philippemerle/KubeDiagrams/blob/main/LICENSE) file for details.
|
||||
This project is licensed under the Apache 2.0 License - see the [LICENSE](https://github.com/philippemerle/KubeDiagrams/blob/main/LICENSE) file for details.
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fphilippemerle%2FKubeDiagrams?ref=badge_large&issueType=license)
|
||||
|
||||
24
action.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: "Kube Diagrams"
|
||||
description: "Generate architecture diagrams from Kubernetes manifests and Helm charts."
|
||||
|
||||
inputs:
|
||||
type:
|
||||
description: "Input type"
|
||||
required: true
|
||||
default: "kubernetes"
|
||||
args:
|
||||
description: "Arguments to pass into the tool"
|
||||
required: true
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: "docker"
|
||||
image: "docker://philippemerle/kubediagrams:latest"
|
||||
args:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- ${{ format('{0} {1}', inputs.type == 'helm' && 'helm-diagrams' || 'kube-diagrams', inputs.args) }}
|
||||
|
||||
branding:
|
||||
icon: "image"
|
||||
color: "blue"
|
||||
@@ -1,19 +1,136 @@
|
||||
#! /bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# $1: Helm Chart URL
|
||||
repository=$(dirname $1)
|
||||
chart=$(basename $1)
|
||||
# helm-diagrams: A script to generate a diagram of an Helm chart
|
||||
# using kube-diagrams from the output of 'helm template <name> <chart>'
|
||||
|
||||
rid=helm-diagrams-repo
|
||||
# Check if kube-diagrams is installed
|
||||
if ! command -v kube-diagrams &>/dev/null; then
|
||||
echo "Error: kube-diagrams is not installed. Please install it first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Add a repository.
|
||||
helm repo add $rid $repository --force-update
|
||||
# Check if helm is installed
|
||||
if ! command -v helm &>/dev/null; then
|
||||
echo "Error: helm is not installed. Please install it first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Process the chart.
|
||||
helm template $chart $rid/$chart > $chart.yaml
|
||||
# Display help message
|
||||
show_help() {
|
||||
echo "Usage: helm-diagrams <helm-chart-url> [OPTIONS] [FLAGS]"
|
||||
echo ""
|
||||
echo "A script to generate a diagram of an Helm chart using kube-diagrams."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -o, --output <file> Specify the output file for the diagram"
|
||||
echo " -f, --format <format> Specify the output format (e.g., png, svg)"
|
||||
echo " --embed-all-icons Embed all icons into svg or dot_json output diagrams"
|
||||
echo " -c, --config <file> Specify the custom kube-diagrams configuration file"
|
||||
echo " -h, --help Display this help message"
|
||||
echo ""
|
||||
echo "Any flag supported by helm template, e.g.:"
|
||||
echo " -g, --generate-name Generate the name (and omit the NAME parameter)"
|
||||
echo " --include-crds Include CRDs in the templated output"
|
||||
echo " -l, --labels stringToString Labels that would be added to release metadata. Should be divided by comma. (default [])"
|
||||
echo " --name-template string Specify template used to name the release"
|
||||
echo " --set stringArray Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)"
|
||||
echo " --set-file stringArray Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)"
|
||||
echo " --set-json stringArray Set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2)"
|
||||
echo " --set-literal stringArray Set a literal STRING value on the command line"
|
||||
echo " --set-string stringArray Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)"
|
||||
echo " -f, --values strings Specify values in a YAML file or a URL (can specify multiple)"
|
||||
echo " --version string Specify a version constraint for the chart version to use. This constraint can be a specific tag (e.g. 1.1.1) or it may reference a valid range (e.g. ^2.0.0). If this is not specified, the latest version is used"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " helm-diagrams https://charts.jetstack.io/cert-manager -o diagram.png"
|
||||
echo " helm-diagrams https://charts.jetstack.io/cert-manager --set crds.enabled=true -o cert-manager.png"
|
||||
echo " helm-diagrams oci://ghcr.io/argoproj/argo-helm/argo-cd -f svg"
|
||||
echo " helm-diagrams --help"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Generate the chart architecture diagram.
|
||||
kube-diagrams -c KubeDiagrams.yaml --without-namespace $chart.yaml
|
||||
# Initialize variables
|
||||
HELM_CHART_URL=""
|
||||
HELM_ARGS=()
|
||||
KUBE_DIAGRAMS_ARGS=("-" "--without-namespace") # Default to stdin indicator
|
||||
|
||||
# Remove the repository.
|
||||
helm repo remove $rid
|
||||
# Use the KubeDiagrams custom configuration if exist.
|
||||
KD_CC="KubeDiagrams.yaml"
|
||||
if [ -e $KD_CC ]
|
||||
then
|
||||
KUBE_DIAGRAMS_ARGS+=("--config" "$KD_CC")
|
||||
fi
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
-h | --help)
|
||||
show_help
|
||||
;;
|
||||
-o | --output | -f | --format | -c | --config)
|
||||
KUBE_DIAGRAMS_ARGS+=("$1")
|
||||
if [[ -n "$2" ]]; then
|
||||
KUBE_DIAGRAMS_ARGS+=("$2")
|
||||
shift 2
|
||||
else
|
||||
echo "Error: $1 requires a value!"
|
||||
exit 64
|
||||
fi
|
||||
;;
|
||||
--embed-all-icons)
|
||||
KUBE_DIAGRAMS_ARGS+=("$1")
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
if [ -z "${HELM_CHART_URL}" ]; then
|
||||
HELM_CHART_URL=$1
|
||||
repository=$(dirname ${HELM_CHART_URL})
|
||||
name=$(basename ${HELM_CHART_URL})
|
||||
KUBE_DIAGRAMS_ARGS+=("--output" "${name}")
|
||||
else
|
||||
HELM_ARGS+=("$1")
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check if any Helm chart url was specified
|
||||
if [ -z "${HELM_CHART_URL}" ]; then
|
||||
echo "Error: At least one Helm chart URL must be specified!"
|
||||
exit 64
|
||||
fi
|
||||
|
||||
echo Download ${HELM_CHART_URL}...
|
||||
|
||||
if [[ ${repository} == oci* ]]; then
|
||||
# Deal with OCI registries.
|
||||
# Execute helm and pipe to kube-diagrams with arguments
|
||||
helm template ${name} ${HELM_CHART_URL} "${HELM_ARGS[@]}" | kube-diagrams "${KUBE_DIAGRAMS_ARGS[@]}"
|
||||
EXIT_CODE=$?
|
||||
elif [[ ${repository} == http* ]]; then
|
||||
# Deal with HTTP registries.
|
||||
|
||||
# Add a Helm repository.
|
||||
rid=helm-diagrams-repo
|
||||
helm repo add $rid $repository --force-update >/dev/null
|
||||
|
||||
# Execute helm and pipe to kube-diagrams with arguments
|
||||
helm template ${name} $rid/${name} "${HELM_ARGS[@]}" | kube-diagrams "${KUBE_DIAGRAMS_ARGS[@]}"
|
||||
EXIT_CODE=$?
|
||||
|
||||
# Remove the Helm repository.
|
||||
helm repo remove $rid >/dev/null
|
||||
else
|
||||
# Deal with local charts
|
||||
# Execute helm and pipe to kube-diagrams with arguments
|
||||
helm template ${name} ${repository}/${name} "${HELM_ARGS[@]}" | kube-diagrams -o local-$name "${KUBE_DIAGRAMS_ARGS[@]}"
|
||||
EXIT_CODE=$?
|
||||
fi
|
||||
|
||||
if [[ $EXIT_CODE -eq 0 ]]; then
|
||||
echo "Diagram generated successfully"
|
||||
else
|
||||
echo "Error: Failed to generate diagram!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BIN
bin/icons/container.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
bin/icons/csinode.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
bin/icons/csisc.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
bin/icons/podtemplate.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
bin/icons/rc.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
bin/icons/runtimeclass.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
bin/icons/vpa.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
1717
bin/kube-diagrams
@@ -13,16 +13,6 @@ edges:
|
||||
color: black
|
||||
style: dashed
|
||||
direction: up
|
||||
SELECTOR-INGRESS:
|
||||
xlabel: ingress
|
||||
color: black
|
||||
style: dashed
|
||||
direction: up
|
||||
SELECTOR-EGRESS:
|
||||
xlabel: egress
|
||||
color: black
|
||||
style: dashed
|
||||
direction: up
|
||||
CONTROLLED_BY:
|
||||
xlabel: controller
|
||||
color: black
|
||||
@@ -30,56 +20,114 @@ edges:
|
||||
OWNER:
|
||||
color: black
|
||||
style: dotted
|
||||
COMMUNICATION:
|
||||
color: brown
|
||||
DEPENDENCE:
|
||||
color: darkgrey
|
||||
UNDEFINED:
|
||||
color: red
|
||||
INVISIBLE:
|
||||
color: transparent
|
||||
style: invisible
|
||||
direction: up
|
||||
clusters:
|
||||
- label: app.kubernetes.io/instance
|
||||
title: K8s Instance
|
||||
title: "K8s Instance: {}"
|
||||
recommended: true
|
||||
graph_attr:
|
||||
bgcolor: "#E5F5FD"
|
||||
- label: release
|
||||
title: Release
|
||||
title: "Release: {}"
|
||||
recommended: false
|
||||
graph_attr:
|
||||
bgcolor: "#E5F5FD"
|
||||
- label: helm.sh/chart
|
||||
title: Helm Chart
|
||||
title: "Helm Chart: {}"
|
||||
recommended: true
|
||||
graph_attr:
|
||||
bgcolor: "#EBF3E7"
|
||||
- label: chart
|
||||
title: Chart
|
||||
title: "Chart: {}"
|
||||
recommended: false
|
||||
graph_attr:
|
||||
bgcolor: "#EBF3E7"
|
||||
- label: app.kubernetes.io/name
|
||||
title: K8s Application
|
||||
title: "K8s Application: {}"
|
||||
recommended: true
|
||||
graph_attr:
|
||||
bgcolor: "#ECE8F6"
|
||||
- label: app
|
||||
title: Application
|
||||
recommended: false
|
||||
- label: app.kubernetes.io/component
|
||||
title: K8s Component
|
||||
recommended: true
|
||||
- label: service
|
||||
title: Microservice
|
||||
title: "Application: {}"
|
||||
recommended: false
|
||||
graph_attr:
|
||||
bgcolor: "#ECE8F6"
|
||||
- label: tier
|
||||
title: Tier
|
||||
title: "Tier: {}"
|
||||
recommended: false
|
||||
graph_attr:
|
||||
bgcolor: "#ECE8F6"
|
||||
- label: app.kubernetes.io/component
|
||||
title: "K8s Component: {}"
|
||||
recommended: true
|
||||
graph_attr:
|
||||
bgcolor: "#FDF7E3"
|
||||
- label: component
|
||||
title: "Component: {}"
|
||||
recommended: false
|
||||
graph_attr:
|
||||
bgcolor: "#FDF7E3"
|
||||
- label: service
|
||||
title: "Microservice: {}"
|
||||
recommended: false
|
||||
graph_attr:
|
||||
bgcolor: "#FDF7E3"
|
||||
- label: rbac.authorization.k8s.io/aggregate-to-admin
|
||||
title: "Admin ClusterRole Aggregation"
|
||||
recommended: true
|
||||
graph_attr:
|
||||
bgcolor: transparent
|
||||
- label: rbac.authorization.k8s.io/aggregate-to-edit
|
||||
title: "Edit ClusterRole Aggregation"
|
||||
recommended: true
|
||||
graph_attr:
|
||||
bgcolor: transparent
|
||||
- label: rbac.authorization.k8s.io/aggregate-to-view
|
||||
title: "View ClusterRole Aggregation"
|
||||
recommended: true
|
||||
graph_attr:
|
||||
bgcolor: transparent
|
||||
- annotation: helm.sh/hook
|
||||
title: "{}"
|
||||
recommended: true
|
||||
graph_attr:
|
||||
bgcolor: "#EBF3E7"
|
||||
style: dotted,rounded
|
||||
nodes:
|
||||
APIService/apiregistration.k8s.io/v1:
|
||||
scope: Cluster
|
||||
custom_icon: $KD/icons/apiservice.png
|
||||
edges: |
|
||||
service = query_path(resource, "spec.service")
|
||||
if service != None:
|
||||
edges.append([
|
||||
f"{service['name']}/{service['namespace']}/Service/v1",
|
||||
"REFERENCE"
|
||||
])
|
||||
if service is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.service",
|
||||
service['name'],
|
||||
service['namespace'],
|
||||
"Service",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
APIService/apiregistration.k8s.io/v1beta1: APIService/apiregistration.k8s.io/v1
|
||||
ClusterRole/rbac.authorization.k8s.io/v1:
|
||||
scope: Cluster
|
||||
diagram_node_classname: diagrams.k8s.rbac.CRole
|
||||
edges: |
|
||||
for clusterRoleSelector in query_path(resource, "aggregationRule.clusterRoleSelectors", []):
|
||||
edges.add_all_resources_matching_labels("ClusterRole", "matchLabels", clusterRoleSelector)
|
||||
for idx, clusterRoleSelector in enumerate(query_path(resource, "aggregationRule.clusterRoleSelectors", [])):
|
||||
edges.add_all_resources_matching_labels(
|
||||
"ClusterRole",
|
||||
f"aggregationRule.clusterRoleSelectors[{idx}]",
|
||||
match_labels=clusterRoleSelector.get("matchLabels"),
|
||||
tooltip_data=clusterRoleSelector
|
||||
)
|
||||
edges.add_rules_resource_names()
|
||||
ClusterRole/rbac.authorization.k8s.io/v1beta1: ClusterRole/rbac.authorization.k8s.io/v1
|
||||
ClusterRoleBinding/rbac.authorization.k8s.io/v1:
|
||||
scope: Cluster
|
||||
@@ -97,13 +145,22 @@ nodes:
|
||||
diagram_node_classname: diagrams.k8s.compute.Cronjob
|
||||
edges: |
|
||||
edges.add_owned_resources()
|
||||
edges.add_all_resources_matching_labels("Pod", "spec.jobTemplate.spec.template.spec.selector.matchLabels")
|
||||
edges.add_service_account("spec.jobTemplate.spec.template.spec")
|
||||
edges.add_all_volume_resources("spec.jobTemplate.spec.template.spec.volumes")
|
||||
edges.add_containers_env_valueFrom("spec.jobTemplate.spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.jobTemplate.spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.jobTemplate.spec.template.spec.initContainers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.jobTemplate.spec.template.spec.ephemeralContainers")
|
||||
edges.add_wait_for_services("spec.jobTemplate.spec.template.spec.initContainers")
|
||||
edges.add_networks("spec.jobTemplate.spec.template.metadata.annotations")
|
||||
edges.add_priority_class("spec.jobTemplate.spec.template.spec.priorityClassName")
|
||||
edges.add_edge_to(
|
||||
"spec.jobTemplate.spec.template.spec.runtimeClassName",
|
||||
".",
|
||||
None,
|
||||
"RuntimeClass",
|
||||
"node.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
CronJob/batch/v1beta1: CronJob/batch/v1
|
||||
CustomResourceDefinition/apiextensions.k8s.io/v1:
|
||||
scope: Cluster
|
||||
@@ -115,62 +172,113 @@ nodes:
|
||||
custom_icon: $KD/icons/csidriver.png
|
||||
# no edges
|
||||
CSIDriver/storage.k8s.io/v1beta1: CSIDriver/storage.k8s.io/v1
|
||||
CSINode/storage.k8s.io/v1:
|
||||
scope: Cluster
|
||||
custom_icon: $KD/icons/csinode.png
|
||||
edges: |
|
||||
for idx, driver in enumerate(query_path(resource, "spec.drivers", [])):
|
||||
edges.add_edge_to(
|
||||
f"spec.drivers[{idx}]",
|
||||
driver['name'],
|
||||
None,
|
||||
"CSIDriver",
|
||||
"storage.k8s.io/v1",
|
||||
"REFERENCE",
|
||||
data=driver
|
||||
)
|
||||
CSIStorageCapacity/storage.k8s.io/v1:
|
||||
scope: Namescaped
|
||||
custom_icon: $KD/icons/csisc.png
|
||||
edges: |
|
||||
edges.add_edge_to(
|
||||
"storageClassName",
|
||||
".",
|
||||
None,
|
||||
"StorageClass",
|
||||
"storage.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
DaemonSet/apps/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.compute.DS
|
||||
edges: |
|
||||
edges.add_all_resources_matching_labels("Pod", "spec.selector.matchLabels")
|
||||
edges.add_owned_resources()
|
||||
edges.add_service_account("spec.template.spec")
|
||||
edges.add_all_volume_resources("spec.template.spec.volumes")
|
||||
edges.add_containers_env_valueFrom("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.initContainers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.ephemeralContainers")
|
||||
edges.add_wait_for_services("spec.template.spec.initContainers")
|
||||
edges.add_networks("spec.template.metadata.annotations")
|
||||
edges.add_priority_class("spec.template.spec.priorityClassName")
|
||||
edges.add_edge_to(
|
||||
"spec.template.spec.runtimeClassName",
|
||||
".",
|
||||
None,
|
||||
"RuntimeClass",
|
||||
"node.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
DaemonSet/apps/v1beta2: DaemonSet/apps/v1
|
||||
DaemonSet/extensions/v1beta1: DaemonSet/apps/v1
|
||||
Deployment/apps/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.compute.Deploy
|
||||
edges: |
|
||||
edges.add_all_resources_matching_labels("ReplicaSet", "spec.selector.matchLabels")
|
||||
edges.add_owned_resources()
|
||||
edges.add_service_account("spec.template.spec")
|
||||
edges.add_all_volume_resources("spec.template.spec.volumes")
|
||||
edges.add_containers_env_valueFrom("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.initContainers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.ephemeralContainers")
|
||||
edges.add_wait_for_services("spec.template.spec.initContainers")
|
||||
edges.add_networks("spec.template.metadata.annotations")
|
||||
edges.add_priority_class("spec.template.spec.priorityClassName")
|
||||
edges.add_edge_to(
|
||||
"spec.template.spec.runtimeClassName",
|
||||
".",
|
||||
None,
|
||||
"RuntimeClass",
|
||||
"node.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
Deployment/extensions/v1beta1: Deployment/apps/v1
|
||||
Deployment/apps/v1beta1: Deployment/apps/v1
|
||||
Deployment/apps/v1beta2: Deployment/apps/v1
|
||||
Endpoints/v1:
|
||||
scope: Namespaced
|
||||
plural: endpoints
|
||||
diagram_node_classname: diagrams.k8s.network.Endpoint
|
||||
edges: |
|
||||
for subset in resource.get("subsets", []):
|
||||
for address in subset.get("addresses", []):
|
||||
for sidx, subset in enumerate(resource.get("subsets", [])):
|
||||
for aidx, address in enumerate(subset.get("addresses", [])):
|
||||
if "targetRef" in address:
|
||||
target = address["targetRef"]
|
||||
edges.append([
|
||||
"%s/%s/%s/%s" % (
|
||||
target["name"],
|
||||
target["namespace"],
|
||||
target["kind"],
|
||||
"v1",
|
||||
),
|
||||
"REFERENCE"
|
||||
])
|
||||
edges.add_edge_to(
|
||||
f"subsets[{sidx}].addresses[{aidx}].targetRef",
|
||||
target["name"],
|
||||
target.get("namespace"),
|
||||
target["kind"],
|
||||
"v1",
|
||||
"REFERENCE",
|
||||
data=target
|
||||
)
|
||||
EndpointSlice/discovery.k8s.io/v1:
|
||||
scope: Namespaced
|
||||
custom_icon: $KD/icons/eps.png
|
||||
edges: |
|
||||
for endpoint in resource.get("endpoints", []):
|
||||
for idx, endpoint in enumerate(resource.get("endpoints", [])):
|
||||
if "targetRef" in endpoint:
|
||||
target = endpoint["targetRef"]
|
||||
edges.append([
|
||||
"%s/%s/%s/%s" % (
|
||||
target["name"],
|
||||
target["namespace"],
|
||||
target["kind"],
|
||||
"v1",
|
||||
),
|
||||
"REFERENCE"
|
||||
])
|
||||
edges.add_edge_to(
|
||||
f"endpoints[{idx}].targetRef",
|
||||
target["name"],
|
||||
target["namespace"],
|
||||
target["kind"],
|
||||
"v1",
|
||||
"REFERENCE",
|
||||
data=target
|
||||
)
|
||||
Group/rbac.authorization.k8s.io/v1:
|
||||
scope: Cluster
|
||||
diagram_node_classname: diagrams.k8s.rbac.Group
|
||||
@@ -191,14 +299,29 @@ nodes:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.network.Ing
|
||||
edges: |
|
||||
for rule in query_path(resource, "spec.rules", []):
|
||||
for path in query_path(rule, "http.paths", []):
|
||||
edges.add_service("backend.service.name", path)
|
||||
ic = "%s/IngressClass/networking.k8s.io/v1" % (
|
||||
query_path(resource, "spec.ingressClassName"),
|
||||
edges.add_service("spec.defaultBackend.service.name")
|
||||
for ridx, rule in enumerate(query_path(resource, "spec.rules", [])):
|
||||
for pidx, path in enumerate(query_path(rule, "http.paths", [])):
|
||||
edges.add_service(f"spec.rules[{ridx}].http.paths[{pidx}].backend.service.name", name=query_path(path, "backend.service.name"))
|
||||
edges.add_edge_to(
|
||||
"spec.ingressClassName",
|
||||
".",
|
||||
None,
|
||||
"IngressClass",
|
||||
"networking.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
if ic in resources:
|
||||
edges.append([ic, "REFERENCE"])
|
||||
for idx, tls in enumerate(query_path(resource, "spec.tls", [])):
|
||||
edges.add_edge_to(
|
||||
f"spec.tls[{idx}]",
|
||||
tls.get("secretName"),
|
||||
get_namespace(resource),
|
||||
"Secret",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
Ingress/networking.k8s.io/v1beta1: Ingress/networking.k8s.io/v1
|
||||
Ingress/extensions/v1beta1: Ingress/networking.k8s.io/v1
|
||||
IngressClass/networking.k8s.io/v1:
|
||||
scope: Cluster
|
||||
custom_icon: $KD/icons/ic.png
|
||||
@@ -207,18 +330,28 @@ nodes:
|
||||
# been tested with any other ingress implementations.
|
||||
edges.add_all_resources_matching_labels("Pod", "metadata.labels",
|
||||
edge_kind="CONTROLLED_BY")
|
||||
Ingress/networking.k8s.io/v1beta1: Ingress/networking.k8s.io/v1
|
||||
IngressClass/networking.k8s.io/v1beta1: IngressClass/networking.k8s.io/v1
|
||||
Job/batch/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.compute.Job
|
||||
edges: |
|
||||
edges.add_all_resources_matching_labels("Pod", "spec.selector.matchLabels")
|
||||
edges.add_owned_resources()
|
||||
edges.add_service_account("spec.template.spec")
|
||||
edges.add_all_volume_resources("spec.template.spec.volumes")
|
||||
edges.add_containers_env_valueFrom("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.initContainers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.ephemeralContainers")
|
||||
edges.add_wait_for_services("spec.template.spec.initContainers")
|
||||
edges.add_networks("spec.template.metadata.annotations")
|
||||
edges.add_priority_class("spec.template.spec.priorityClassName")
|
||||
edges.add_edge_to(
|
||||
"spec.template.spec.runtimeClassName",
|
||||
".",
|
||||
None,
|
||||
"RuntimeClass",
|
||||
"node.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
Job/batch/v1beta1: Job/batch/v1
|
||||
Lease/coordination.k8s.io/v1:
|
||||
scope: Namespaced
|
||||
@@ -248,43 +381,81 @@ nodes:
|
||||
edges: |
|
||||
edges.add_all_workload_resources(
|
||||
"spec.podSelector.matchLabels",
|
||||
default_selector={},
|
||||
edge_kind="SELECTOR-UP"
|
||||
)
|
||||
edges.add_ingress_and_egress_rules()
|
||||
Node/v1:
|
||||
scope: Cluster
|
||||
diagram_node_classname: diagrams.k8s.infra.Node
|
||||
# no edges
|
||||
edges: |
|
||||
edges.add_owned_resources()
|
||||
PersistentVolume/v1:
|
||||
scope: Cluster
|
||||
diagram_node_classname: diagrams.k8s.storage.PV
|
||||
edges: |
|
||||
edges.add_storage_class("spec.storageClassName")
|
||||
edges.add_edge_to(
|
||||
"spec.storageClassName",
|
||||
".",
|
||||
None,
|
||||
"StorageClass",
|
||||
"storage.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
PersistentVolumeClaim/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.storage.PVC
|
||||
edges: |
|
||||
edges.add_storage_class("spec.storageClassName")
|
||||
edges.add_volume("spec.volumeName")
|
||||
if query_path(resource, "spec.storageClassName") != "":
|
||||
edges.add_edge_to(
|
||||
"spec.storageClassName",
|
||||
".",
|
||||
None,
|
||||
"StorageClass",
|
||||
"storage.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
edges.add_edge_to(
|
||||
"spec.volumeName",
|
||||
".",
|
||||
None,
|
||||
"PersistentVolume",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
PriorityClass/scheduling.k8s.io/v1:
|
||||
scope: Cluster
|
||||
custom_icon: $KD/icons/pc.png
|
||||
# no edges
|
||||
PriorityClass/scheduling.k8s.io/v1beta1: PriorityClass/scheduling.k8s.io/v1
|
||||
Pod/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.compute.Pod
|
||||
edges: |
|
||||
edges.add_service_account("spec")
|
||||
edges.add_all_volume_resources("spec.volumes")
|
||||
edges.add_containers_env_valueFrom("spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.initContainers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.ephemeralContainers")
|
||||
edges.add_wait_for_services("spec.initContainers")
|
||||
nid = "%s/Node/v1" % (
|
||||
query_path(resource, "spec.nodeName"),
|
||||
edges.add_edge_to(
|
||||
"spec.nodeName",
|
||||
".",
|
||||
None,
|
||||
"Node",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
if nid in resources:
|
||||
edges.append([nid, "REFERENCE"])
|
||||
edges.add_networks("metadata.annotations")
|
||||
edges.add_priority_class("spec.priorityClassName")
|
||||
edges.add_edge_to(
|
||||
"spec.runtimeClassName",
|
||||
".",
|
||||
None,
|
||||
"RuntimeClass",
|
||||
"node.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
PodDisruptionBudget/policy/v1:
|
||||
scope: Namespaced
|
||||
custom_icon: $KD/icons/pdb.png
|
||||
@@ -296,20 +467,81 @@ nodes:
|
||||
PodDisruptionBudget/policy/v1beta1: PodDisruptionBudget/policy/v1
|
||||
PodSecurityPolicy/policy/v1:
|
||||
scope: Namespaced
|
||||
plural: podsecuritypolicies
|
||||
diagram_node_classname: diagrams.k8s.others.PSP
|
||||
# no edges
|
||||
PodSecurityPolicy/policy/v1beta1: PodSecurityPolicy/policy/v1
|
||||
PodSecurityPolicy/extensions/v1beta1: PodSecurityPolicy/policy/v1
|
||||
PodTemplate/v1:
|
||||
scope: Namespaced
|
||||
custom_icon: $KD/icons/podtemplate.png
|
||||
edges: |
|
||||
edges.add_service_account("template.spec")
|
||||
edges.add_all_volume_resources("template.spec.volumes")
|
||||
edges.add_containers_env_value_from_and_env_from("template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("template.spec.initContainers")
|
||||
edges.add_containers_env_value_from_and_env_from("template.spec.ephemeralContainers")
|
||||
edges.add_wait_for_services("template.spec.initContainers")
|
||||
edges.add_edge_to(
|
||||
"template.spec.nodeName",
|
||||
".",
|
||||
None,
|
||||
"Node",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
edges.add_networks("template.metadata.annotations")
|
||||
edges.add_priority_class("template.spec.priorityClassName")
|
||||
edges.add_edge_to(
|
||||
"template.spec.runtimeClassName",
|
||||
".",
|
||||
None,
|
||||
"RuntimeClass",
|
||||
"node.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
ReplicaSet/apps/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.compute.RS
|
||||
edges: |
|
||||
edges.add_all_resources_matching_labels("Pod", "spec.selector.matchLabels")
|
||||
edges.add_owned_resources()
|
||||
edges.add_service_account("spec.template.spec")
|
||||
edges.add_all_volume_resources("spec.template.spec.volumes")
|
||||
edges.add_containers_env_valueFrom("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.initContainers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.ephemeralContainers")
|
||||
edges.add_wait_for_services("spec.template.spec.initContainers")
|
||||
edges.add_networks("spec.template.metadata.annotations")
|
||||
edges.add_priority_class("spec.template.spec.priorityClassName")
|
||||
edges.add_edge_to(
|
||||
"spec.template.spec.runtimeClassName",
|
||||
".",
|
||||
None,
|
||||
"RuntimeClass",
|
||||
"node.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
ReplicationController/v1:
|
||||
scope: Namespaced
|
||||
custom_icon: $KD/icons/rc.png
|
||||
edges: |
|
||||
edges.add_owned_resources()
|
||||
edges.add_service_account("spec.template.spec")
|
||||
edges.add_all_volume_resources("spec.template.spec.volumes")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.initContainers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.ephemeralContainers")
|
||||
edges.add_wait_for_services("spec.template.spec.initContainers")
|
||||
edges.add_networks("spec.template.metadata.annotations")
|
||||
edges.add_priority_class("spec.template.spec.priorityClassName")
|
||||
edges.add_edge_to(
|
||||
"spec.template.spec.runtimeClassName",
|
||||
".",
|
||||
None,
|
||||
"RuntimeClass",
|
||||
"node.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
ResourceQuota/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.clusterconfig.Quota
|
||||
@@ -317,7 +549,10 @@ nodes:
|
||||
Role/rbac.authorization.k8s.io/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.rbac.Role
|
||||
# no edges
|
||||
nodes: |
|
||||
create_node_for_role_rules_resource_names(resource, nodes)
|
||||
edges: |
|
||||
edges.add_rules_resource_names()
|
||||
Role/rbac.authorization.k8s.io/v1beta1: Role/rbac.authorization.k8s.io/v1
|
||||
RoleBinding/rbac.authorization.k8s.io/v1:
|
||||
scope: Namespaced
|
||||
@@ -326,6 +561,9 @@ nodes:
|
||||
edges.add_role("roleRef")
|
||||
edges.add_subjects()
|
||||
RoleBinding/rbac.authorization.k8s.io/v1beta1: RoleBinding/rbac.authorization.k8s.io/v1
|
||||
RuntimeClass/node.k8s.io/v1:
|
||||
scope: Cluster
|
||||
custom_icon: $KD/icons/runtimeclass.png
|
||||
Secret/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.podconfig.Secret
|
||||
@@ -351,24 +589,48 @@ nodes:
|
||||
**vct
|
||||
}
|
||||
pvc["metadata"]["name"] = f'{pvc["metadata"]["name"]}-{resource["metadata"]["name"]}'
|
||||
if namespace != None:
|
||||
if namespace is not None:
|
||||
pvc["metadata"]["namespace"] = namespace
|
||||
pvc["metadata"]["labels"] = {
|
||||
**query_path(resource, "metadata.labels", {}),
|
||||
**query_path(pvc, "metadata.labels", {})
|
||||
}
|
||||
nodes.append(pvc)
|
||||
edges: |
|
||||
edges.add_all_resources_matching_labels("Pod", "spec.selector.matchLabels")
|
||||
edges.add_owned_resources()
|
||||
edges.add_service_account("spec.template.spec")
|
||||
edges.add_all_volume_resources("spec.template.spec.volumes")
|
||||
edges.add_containers_env_valueFrom("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.containers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.initContainers")
|
||||
edges.add_containers_env_value_from_and_env_from("spec.template.spec.ephemeralContainers")
|
||||
edges.add_wait_for_services("spec.template.spec.initContainers")
|
||||
edges.add_networks("spec.template.metadata.annotations")
|
||||
edges.add_priority_class("spec.template.spec.priorityClassName")
|
||||
edges.add_edge_to(
|
||||
"spec.template.spec.runtimeClassName",
|
||||
".",
|
||||
None,
|
||||
"RuntimeClass",
|
||||
"node.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
edges.add_volume_claim_templates("spec.volumeClaimTemplates")
|
||||
edges.add_service("spec.serviceName")
|
||||
StatefulSet/apps/v1beta1: StatefulSet/apps/v1
|
||||
StatefulSet/apps/v1beta2: StatefulSet/apps/v1
|
||||
StorageClass/storage.k8s.io/v1:
|
||||
scope: Cluster
|
||||
diagram_node_classname: diagrams.k8s.storage.SC
|
||||
# no edges
|
||||
edges: |
|
||||
edges.add_edge_to(
|
||||
"provisioner",
|
||||
".",
|
||||
None,
|
||||
"CSIDriver",
|
||||
"storage.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
StorageClass/storage.k8s.io/v1beta1: StorageClass/storage.k8s.io/v1
|
||||
User/rbac.authorization.k8s.io/v1:
|
||||
scope: Cluster
|
||||
diagram_node_classname: diagrams.k8s.rbac.User
|
||||
@@ -379,15 +641,23 @@ nodes:
|
||||
edges: |
|
||||
edges.add_webhooks()
|
||||
ValidatingWebhookConfiguration/admissionregistration.k8s.io/v1beta1: ValidatingWebhookConfiguration/admissionregistration.k8s.io/v1
|
||||
VerticalPodAutoscaler/autoscaling.k8s.io/v1:
|
||||
scoped: Namespaced
|
||||
custom_icon: $KD/icons/vpa.png
|
||||
edges: |
|
||||
edges.add_resource("spec.targetRef")
|
||||
VolumeAttachment/storage.k8s.io/v1:
|
||||
scope: Cluster
|
||||
diagram_node_classname: diagrams.k8s.storage.Volume
|
||||
edges: |
|
||||
nid = "%s/Node/v1" % (
|
||||
query_path(resource, "spec.nodeName"),
|
||||
edges.add_edge_to(
|
||||
"spec.nodeName",
|
||||
".",
|
||||
None,
|
||||
"Node",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
if nid in resources:
|
||||
edges.append([nid, "REFERENCE"])
|
||||
cluster-resources:
|
||||
# default namespace
|
||||
- default/default/ServiceAccount/v1
|
||||
@@ -400,10 +670,20 @@ cluster-resources:
|
||||
- admin/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
- cluster-admin/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
- edit/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
- generic-garbage-collector/kube-system/ServiceAccount/v1
|
||||
- standard/StorageClass/storage.k8s.io/v1
|
||||
- system:anonymous/User/rbac.authorization.k8s.io/v1
|
||||
- system:auth-delegator/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
- system:authenticated/Group/rbac.authorization.k8s.io/v1
|
||||
- system:coredns/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
- system:discovery/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
- system:node-proxier/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
- system:nodes/Group/rbac.authorization.k8s.io/v1
|
||||
- system:unauthenticated/Group/rbac.authorization.k8s.io/v1
|
||||
- system:persistent-volume-provisioner/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
- system:service-account-issuer-discovery/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
- system:serviceaccounts/Group/rbac.authorization.k8s.io/v1
|
||||
- system:volume-scheduler/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
- system-cluster-critical/PriorityClass/scheduling.k8s.io/v1
|
||||
- system-node-critical/PriorityClass/scheduling.k8s.io/v1
|
||||
- view/ClusterRole/rbac.authorization.k8s.io/v1
|
||||
|
||||
110
bin/kubectl-diagrams
Executable file
@@ -0,0 +1,110 @@
|
||||
#!/bin/bash
|
||||
|
||||
# kubectl diagrams: A kubectl plugin to generate a diagram of Kubernetes resources
|
||||
# using kube-diagrams from the output of 'kubectl get <resources> -o yaml'
|
||||
|
||||
# Version
|
||||
VERSION="0.1.0"
|
||||
|
||||
# Check if kube-diagrams is installed
|
||||
if ! command -v kube-diagrams &>/dev/null; then
|
||||
echo "Error: kube-diagrams is not installed. Please install it first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if kubectl is installed
|
||||
if ! command -v kubectl &>/dev/null; then
|
||||
echo "Error: kubectl is not installed. Please install it first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Display help message
|
||||
show_help() {
|
||||
echo "Usage: kubectl diagrams [OPTIONS] <resource1,resource2,...>"
|
||||
echo ""
|
||||
echo "A kubectl plugin to generate diagrams of Kubernetes resources using kube-diagrams."
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -n, --namespace <namespace> Specify the namespace to query resources from"
|
||||
echo " -o, --output <file> Specify the output file for the diagram"
|
||||
echo " -f, --format <format> Specify the output format (e.g., png, svg)"
|
||||
echo " --embed-all-icons Embed all icons into svg or dot_json output diagrams"
|
||||
echo " -c, --config <file> Specify the custom kube-diagrams configuration file"
|
||||
echo " --without-namespace Exclude namespace from the diagram"
|
||||
echo " --version Display the version number"
|
||||
echo " --help Display this help message"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " kubectl diagrams pod,service -n my-namespace -o diagram.png"
|
||||
echo " kubectl diagrams deployment --without-namespace -f svg"
|
||||
echo " kubectl diagrams --version"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Initialize variables
|
||||
KUBE_DIAGRAMS_ARGS=("-") # Default to stdin indicator
|
||||
KUBECTL_ARGS=()
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--version)
|
||||
echo "kubectl diagrams version $VERSION"
|
||||
exit
|
||||
;;
|
||||
--help)
|
||||
show_help
|
||||
;;
|
||||
-n | --namespace)
|
||||
if [[ -n "$2" ]]; then
|
||||
KUBECTL_ARGS+=("-n" "$2")
|
||||
shift 2
|
||||
else
|
||||
echo "Error: --namespace requires a value"
|
||||
exit 64
|
||||
fi
|
||||
;;
|
||||
-o | --output | -f | --format | -c | --config | --without-namespace)
|
||||
KUBE_DIAGRAMS_ARGS+=("$1")
|
||||
if [[ "$1" == "-o" || "$1" == "--output" || "$1" == "-f" || "$1" == "--format" || "$1" == "-c" || "$1" == "--config" ]]; then
|
||||
if [[ -n "$2" ]]; then
|
||||
KUBE_DIAGRAMS_ARGS+=("$2")
|
||||
shift 2
|
||||
else
|
||||
echo "Error: $1 requires a value"
|
||||
exit 64
|
||||
fi
|
||||
else
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
--embed-all-icons)
|
||||
KUBE_DIAGRAMS_ARGS+=("$1")
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
KUBECTL_ARGS+=("$1")
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check if any resources were specified
|
||||
if [[ ${#KUBECTL_ARGS[@]} -eq 0 ]]; then
|
||||
echo "Error: At least one resource kind must be specified (e.g., pod, service, deployment)"
|
||||
exit 64
|
||||
fi
|
||||
|
||||
# Add default output format for kubectl
|
||||
KUBECTL_ARGS+=("-o" "yaml")
|
||||
|
||||
# Execute kubectl and pipe to kube-diagrams with arguments
|
||||
kubectl get "${KUBECTL_ARGS[@]}" | kube-diagrams "${KUBE_DIAGRAMS_ARGS[@]}"
|
||||
EXIT_CODE=$?
|
||||
|
||||
if [[ $EXIT_CODE -eq 0 ]]; then
|
||||
echo "Diagram generated successfully"
|
||||
else
|
||||
echo "Error: Failed to generate diagram"
|
||||
exit 1
|
||||
fi
|
||||
BIN
docs/2025-VISSOFT-slides.pdf
Normal file
2
examples/argo/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
downloads/argocd-example-apps
|
||||
downloads/argo-events
|
||||
691
examples/argo/KubeDiagrams.yaml
Normal file
@@ -0,0 +1,691 @@
|
||||
edges:
|
||||
REFERENCE: {}
|
||||
REFERENCE-UP:
|
||||
direction: up
|
||||
OWNER-UP:
|
||||
color: black
|
||||
style: dotted
|
||||
direction: up
|
||||
clusters:
|
||||
- annotation: argocd.argoproj.io/sync-wave
|
||||
title: "Argo CD Sync Wave: {}"
|
||||
recommended: true
|
||||
graph_attr:
|
||||
bgcolor: transparent
|
||||
style: dotted,rounded
|
||||
- annotation: argocd.argoproj.io/hook
|
||||
title: "Argo CD Hook: {}"
|
||||
recommended: true
|
||||
graph_attr:
|
||||
bgcolor: transparent
|
||||
style: dotted,rounded
|
||||
nodes:
|
||||
Application/argoproj.io/v1alpha1:
|
||||
scope: Namespaced
|
||||
custom_icon: icons/Application.png
|
||||
edges: |
|
||||
# spec.destination.namespace
|
||||
edges.add_edge_to(
|
||||
"spec.destination.namespace",
|
||||
".",
|
||||
None,
|
||||
"Namespace",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# spec.source
|
||||
edges.add_edge_to(
|
||||
"spec.source",
|
||||
"github.com",
|
||||
None,
|
||||
"GitHub",
|
||||
"v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
nodes: |
|
||||
# spec.source
|
||||
nodes.append({
|
||||
"apiVersion": "v1",
|
||||
"kind": "GitHub",
|
||||
"metadata": {
|
||||
"name": "github.com"
|
||||
}
|
||||
})
|
||||
EventBus/argoproj.io/v1alpha1:
|
||||
scope: Namespaced
|
||||
custom_icon: icons/EventBus.png
|
||||
EventSource/argoproj.io/v1alpha1:
|
||||
scope: Namespaced
|
||||
custom_icon: icons/EventSource.png
|
||||
edges: |
|
||||
# eventBusName
|
||||
edges.add_edge_to(
|
||||
"eventBusName",
|
||||
resource.get("eventBusName", "default"),
|
||||
edges.namespace,
|
||||
"EventBus",
|
||||
"argoproj.io/v1alpha1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# spec.template
|
||||
san = query_path(resource, "spec.template.serviceAccountName")
|
||||
if san is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.template.serviceAccountName",
|
||||
".",
|
||||
edges.namespace,
|
||||
"ServiceAccount",
|
||||
"v1",
|
||||
"OWNER"
|
||||
)
|
||||
# spec.service
|
||||
service = query_path(resource, "spec.service")
|
||||
if service is not None:
|
||||
edges.add_edge_to(
|
||||
"service",
|
||||
get_name(resource),
|
||||
edges.namespace,
|
||||
"Service",
|
||||
"v1",
|
||||
"OWNER"
|
||||
)
|
||||
# spec.amqp
|
||||
amqp = query_path(resource, "spec.amqp")
|
||||
if amqp is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.amqp",
|
||||
get_name(resource),
|
||||
None,
|
||||
"MessageQueue",
|
||||
"amqp/v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.sns
|
||||
sns = query_path(resource, "spec.sns")
|
||||
if sns is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.sns",
|
||||
get_name(resource),
|
||||
None,
|
||||
"SnsTopic",
|
||||
"aws/v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.sqs
|
||||
sqs = query_path(resource, "spec.sqs")
|
||||
if sqs is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.sqs",
|
||||
get_name(resource),
|
||||
None,
|
||||
"SqsQueue",
|
||||
"aws/v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.azureEventsHub
|
||||
azureEventsHub = query_path(resource, "spec.azureEventsHub")
|
||||
if azureEventsHub is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.azureEventsHub",
|
||||
get_name(resource),
|
||||
None,
|
||||
"EventHubs",
|
||||
"azure/v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.azureQueueStorage
|
||||
azureQueueStorage = query_path(resource, "spec.azureQueueStorage")
|
||||
if azureQueueStorage is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.azureQueueStorage",
|
||||
get_name(resource),
|
||||
None,
|
||||
"QueueStorage",
|
||||
"azure/v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.azureServiceBus
|
||||
azureServiceBus = query_path(resource, "spec.azureServiceBus")
|
||||
if azureServiceBus is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.azureServiceBus",
|
||||
get_name(resource),
|
||||
None,
|
||||
"ServiceBus",
|
||||
"azure/v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.bitbucket
|
||||
bitbucket = query_path(resource, "spec.bitbucket")
|
||||
if bitbucket is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.bitbucket",
|
||||
get_name(resource),
|
||||
None,
|
||||
"BitBucket",
|
||||
"v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.bitbucketserver
|
||||
bitbucketserver = query_path(resource, "spec.bitbucketserver")
|
||||
if bitbucketserver is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.bitbucketserver",
|
||||
get_name(resource),
|
||||
None,
|
||||
"BitBucketServer",
|
||||
"v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.emitter
|
||||
emitter = query_path(resource, "spec.emitter")
|
||||
if emitter is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.emitter",
|
||||
get_name(resource),
|
||||
None,
|
||||
"Emitter",
|
||||
"v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.file
|
||||
file = query_path(resource, "spec.file")
|
||||
if file is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.file",
|
||||
get_name(resource),
|
||||
None,
|
||||
"File",
|
||||
"v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.pubSub
|
||||
pubSub = query_path(resource, "spec.pubSub")
|
||||
if pubSub is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.pubSub",
|
||||
get_name(resource),
|
||||
None,
|
||||
"PubSub",
|
||||
"gcp/v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
nodes: |
|
||||
# spec.template.serviceAccountName
|
||||
san = query_path(resource, "spec.template.serviceAccountName")
|
||||
if san is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "v1",
|
||||
"kind": "ServiceAccount",
|
||||
"metadata": {
|
||||
"name": san,
|
||||
"labels": query_path(resource, "metadata.labels")
|
||||
}
|
||||
})
|
||||
# spec.service
|
||||
service = query_path(resource, "spec.service")
|
||||
if service is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "v1",
|
||||
"kind": "Service",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
"labels": query_path(resource, "metadata.labels")
|
||||
},
|
||||
"spec": {
|
||||
**service,
|
||||
"selector": { "POD": "POD"} #TODO
|
||||
}
|
||||
})
|
||||
# spec.amqp
|
||||
amqp = query_path(resource, "spec.amqp")
|
||||
if amqp is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "amqp/v1",
|
||||
"kind": "MessageQueue",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
# spec.sns
|
||||
sns = query_path(resource, "spec.sns")
|
||||
if sns is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "aws/v1",
|
||||
"kind": "SnsTopic",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
# spec.sqs
|
||||
sqs = query_path(resource, "spec.sqs")
|
||||
if sqs is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "aws/v1",
|
||||
"kind": "SqsQueue",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
# spec.azureEventsHub
|
||||
azureEventsHub = query_path(resource, "spec.azureEventsHub")
|
||||
if azureEventsHub is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "azure/v1",
|
||||
"kind": "EventHubs",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
# spec.azureQueueStorage
|
||||
azureQueueStorage = query_path(resource, "spec.azureQueueStorage")
|
||||
if azureQueueStorage is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "azure/v1",
|
||||
"kind": "QueueStorage",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
# spec.azureServiceBus
|
||||
azureServiceBus = query_path(resource, "spec.azureServiceBus")
|
||||
if azureServiceBus is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "azure/v1",
|
||||
"kind": "ServiceBus",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
# spec.bitbucket
|
||||
bitbucket = query_path(resource, "spec.bitbucket")
|
||||
if bitbucket is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "v1",
|
||||
"kind": "BitBucket",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
# spec.bitbucketserver
|
||||
bitbucketserver = query_path(resource, "spec.bitbucketserver")
|
||||
if bitbucketserver is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "v1",
|
||||
"kind": "BitBucketServer",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
# spec.emitter
|
||||
emitter = query_path(resource, "spec.emitter")
|
||||
if emitter is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "v1",
|
||||
"kind": "Emitter",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
# spec.file
|
||||
file = query_path(resource, "spec.file")
|
||||
if file is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "v1",
|
||||
"kind": "File",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
# spec.pubSub
|
||||
pubSub = query_path(resource, "spec.pubSub")
|
||||
if pubSub is not None:
|
||||
nodes.append({
|
||||
"apiVersion": "gcp/v1",
|
||||
"kind": "PubSub",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
},
|
||||
})
|
||||
Rollout/argoproj.io/v1alpha1:
|
||||
scope: Namespaced
|
||||
custom_icon: icons/Rollout.png
|
||||
edges: |
|
||||
# spec.strategy
|
||||
edges.add_edge_to(
|
||||
"spec.strategy.blueGreen.activeService",
|
||||
".",
|
||||
edges.namespace,
|
||||
"Service",
|
||||
"v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
edges.add_edge_to(
|
||||
"spec.strategy.blueGreen.previewService",
|
||||
".",
|
||||
edges.namespace,
|
||||
"Service",
|
||||
"v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
Sensor/argoproj.io/v1alpha1:
|
||||
scope: Namespaced
|
||||
custom_icon: icons/Sensor.png
|
||||
edges: |
|
||||
# eventBusName
|
||||
edges.add_edge_to(
|
||||
"eventBusName",
|
||||
resource.get("eventBusName", "default"),
|
||||
edges.namespace,
|
||||
"EventBus",
|
||||
"argoproj.io/v1alpha1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.dependencies
|
||||
for dependency in query_path(resource, "spec.dependencies", []):
|
||||
edges.add_edge_to(
|
||||
"spec.dependencies",
|
||||
dependency.get("eventSourceName"),
|
||||
edges.namespace,
|
||||
"EventSource",
|
||||
"argoproj.io/v1alpha1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
# spec.template
|
||||
san = query_path(resource, "spec.template.serviceAccountName")
|
||||
if san is not None:
|
||||
edges.add_edge_to(
|
||||
"spec.template.serviceAccountName",
|
||||
".",
|
||||
edges.namespace,
|
||||
"ServiceAccount",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# spec.triggers
|
||||
for tidx, trigger in enumerate(query_path(resource, "spec.triggers", [])):
|
||||
template_name = query_path(trigger, "template.name")
|
||||
# template.k8s
|
||||
template_k8s = query_path(trigger, "template.k8s")
|
||||
if template_k8s is not None:
|
||||
template_k8s_source_resource = query_path(trigger, "template.k8s.source.resource")
|
||||
if template_k8s_source_resource is not None:
|
||||
edges.add_edge_to(
|
||||
"trigger",
|
||||
get_name(template_k8s_source_resource),
|
||||
get_namespace(template_k8s_source_resource),
|
||||
query_path(template_k8s_source_resource, "kind"),
|
||||
query_path(template_k8s_source_resource, "apiVersion"),
|
||||
{
|
||||
"color": "black",
|
||||
"style": "dotted",
|
||||
"xlabel": query_path(trigger, "template.k8s.operation")
|
||||
}
|
||||
)
|
||||
# template.awsLambda
|
||||
template_aws_lambda = query_path(trigger, "template.awsLambda")
|
||||
if template_aws_lambda is not None:
|
||||
edges.add_edge_to(
|
||||
"trigger",
|
||||
f"{template_name}-{get_name(resource)}-{tidx}",
|
||||
None,
|
||||
"LambdaFunction",
|
||||
"aws/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# template.azureEventHubs
|
||||
template_azureEventHubs = query_path(trigger, "template.azureEventHubs")
|
||||
if template_azureEventHubs is not None:
|
||||
edges.add_edge_to(
|
||||
"trigger",
|
||||
f"{template_name}-{get_name(resource)}-{tidx}",
|
||||
None,
|
||||
"EventHubs",
|
||||
"azure/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# template.azureServiceBus
|
||||
template_azureServiceBus = query_path(trigger, "template.azureServiceBus")
|
||||
if template_azureServiceBus is not None:
|
||||
edges.add_edge_to(
|
||||
"trigger",
|
||||
f"{template_name}-{get_name(resource)}-{tidx}",
|
||||
None,
|
||||
"ServiceBus",
|
||||
"azure/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# template.custom
|
||||
template_custom = query_path(trigger, "template.custom")
|
||||
if template_custom is not None:
|
||||
edges.add_edge_to(
|
||||
"trigger",
|
||||
f"{template_name}-{get_name(resource)}-{tidx}",
|
||||
None,
|
||||
"GRPC",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# template.email
|
||||
template_email = query_path(trigger, "template.email")
|
||||
if template_email is not None:
|
||||
edges.add_edge_to(
|
||||
"trigger",
|
||||
f"{template_name}-{get_name(resource)}-{tidx}",
|
||||
None,
|
||||
"Email",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# template.http
|
||||
template_http = query_path(trigger, "template.http")
|
||||
if template_http is not None:
|
||||
edges.add_edge_to(
|
||||
"trigger",
|
||||
f"{template_name}-{get_name(resource)}-{tidx}",
|
||||
None,
|
||||
"HTTP",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# template.slack
|
||||
template_slack = query_path(trigger, "template.slack")
|
||||
if template_slack is not None:
|
||||
edges.add_edge_to(
|
||||
"trigger",
|
||||
f"{template_name}-{get_name(resource)}-{tidx}",
|
||||
None,
|
||||
"Slack",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# template.nats
|
||||
template_nats = query_path(trigger, "template.nats")
|
||||
if template_nats is not None:
|
||||
edges.add_edge_to(
|
||||
"trigger",
|
||||
f"{template_name}-{get_name(resource)}-{tidx}",
|
||||
None,
|
||||
"Nats",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# template.openwhisk
|
||||
template_openwhisk = query_path(trigger, "template.openwhisk")
|
||||
if template_openwhisk is not None:
|
||||
edges.add_edge_to(
|
||||
"trigger",
|
||||
f"{template_name}-{get_name(resource)}-{tidx}",
|
||||
None,
|
||||
"OpenWhisk",
|
||||
"apache/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
nodes: |
|
||||
# spec.triggers
|
||||
for tidx, trigger in enumerate(query_path(resource, "spec.triggers", [])):
|
||||
template_name = query_path(trigger, "template.name")
|
||||
# template.k8s
|
||||
template_k8s_source_resource = query_path(trigger, "template.k8s.source.resource")
|
||||
if template_k8s_source_resource is not None:
|
||||
template_k8s_source_resource["metadata"]["name"] = f"{get_name(template_k8s_source_resource)}{get_name(resource)}-{tidx}"
|
||||
nodes.append(template_k8s_source_resource)
|
||||
# template.awsLambda
|
||||
template_aws_lambda = query_path(trigger, "template.awsLambda")
|
||||
if template_aws_lambda is not None:
|
||||
nodes.append({
|
||||
"kind": "LambdaFunction",
|
||||
"apiVersion": "aws/v1",
|
||||
"metadata": {
|
||||
"name": f"{template_name}-{get_name(resource)}-{tidx}"
|
||||
}
|
||||
})
|
||||
# template.azureEventHubs
|
||||
template_azure_event_hubs = query_path(trigger, "template.azureEventHubs")
|
||||
if template_azure_event_hubs is not None:
|
||||
nodes.append({
|
||||
"kind": "EventHubs",
|
||||
"apiVersion": "azure/v1",
|
||||
"metadata": {
|
||||
"name": f"{template_name}-{get_name(resource)}-{tidx}"
|
||||
}
|
||||
})
|
||||
# template.azureServiceBus
|
||||
template_azureServiceBus = query_path(trigger, "template.azureServiceBus")
|
||||
if template_azureServiceBus is not None:
|
||||
nodes.append({
|
||||
"kind": "ServiceBus",
|
||||
"apiVersion": "azure/v1",
|
||||
"metadata": {
|
||||
"name": f"{template_name}-{get_name(resource)}-{tidx}"
|
||||
}
|
||||
})
|
||||
# template.custom
|
||||
template_custom = query_path(trigger, "template.custom")
|
||||
if template_custom is not None:
|
||||
nodes.append({
|
||||
"kind": "GRPC",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": f"{template_name}-{get_name(resource)}-{tidx}"
|
||||
}
|
||||
})
|
||||
# template.email
|
||||
template_email = query_path(trigger, "template.email")
|
||||
if template_email is not None:
|
||||
nodes.append({
|
||||
"kind": "Email",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": f"{template_name}-{get_name(resource)}-{tidx}"
|
||||
}
|
||||
})
|
||||
# template.http
|
||||
template_http = query_path(trigger, "template.http")
|
||||
if template_http is not None:
|
||||
nodes.append({
|
||||
"kind": "HTTP",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": f"{template_name}-{get_name(resource)}-{tidx}"
|
||||
}
|
||||
})
|
||||
# template.slack
|
||||
template_slack = query_path(trigger, "template.slack")
|
||||
if template_slack is not None:
|
||||
nodes.append({
|
||||
"kind": "Slack",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": f"{template_name}-{get_name(resource)}-{tidx}"
|
||||
}
|
||||
})
|
||||
# template.nats
|
||||
template_nats = query_path(trigger, "template.nats")
|
||||
if template_nats is not None:
|
||||
nodes.append({
|
||||
"kind": "Nats",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": f"{template_name}-{get_name(resource)}-{tidx}"
|
||||
}
|
||||
})
|
||||
# template.openwhisk
|
||||
template_openwhisk = query_path(trigger, "template.openwhisk")
|
||||
if template_openwhisk is not None:
|
||||
nodes.append({
|
||||
"kind": "OpenWhisk",
|
||||
"apiVersion": "apache/v1",
|
||||
"metadata": {
|
||||
"name": f"{template_name}-{get_name(resource)}-{tidx}"
|
||||
}
|
||||
})
|
||||
Workflow/argoproj.io/v1alpha1:
|
||||
scope: Namespaced
|
||||
custom_icon: icons/Workflow.png
|
||||
# Apache
|
||||
OpenWhisk/apache/v1:
|
||||
scope: Outside
|
||||
custom_icon: icons/apache-openwhisk-logo-only.png
|
||||
# AWS
|
||||
LambdaFunction/aws/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.aws.compute.LambdaFunction
|
||||
SnsTopic/aws/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.aws.integration.SimpleNotificationServiceSnsTopic
|
||||
SqsQueue/aws/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.aws.integration.SimpleQueueServiceSqsQueue
|
||||
# Azure
|
||||
QueueStorage/azure/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.azure.storage.QueuesStorage
|
||||
EventHubs/azure/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.azure.analytics.EventHubs
|
||||
ServiceBus/azure/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.azure.integration.ServiceBus
|
||||
# GCP
|
||||
PubSub/gcp/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.gcp.analytics.Pubsub
|
||||
# GitHub
|
||||
GitHub/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.onprem.vcs.Github
|
||||
# Other
|
||||
BitBucket/v1:
|
||||
scope: Outside
|
||||
custom_icon: icons/bitbucket.png
|
||||
BitBucketServer/v1:
|
||||
scope: Outside
|
||||
custom_icon: icons/bitbucket.png
|
||||
Email/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.oci.monitoring.Email
|
||||
Emitter/v1:
|
||||
scope: Outside
|
||||
custom_icon: icons/emitter.png
|
||||
File/v1:
|
||||
scope: Outside
|
||||
custom_icon: icons/file.png
|
||||
HTTP/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.aws.iot.IotHttp
|
||||
GRPC/v1:
|
||||
scope: Outside
|
||||
custom_icon: icons/grpc-logo.png
|
||||
MessageQueue/amqp/v1:
|
||||
scope: Outside
|
||||
custom_icon: icons/amqp-message-queue.png
|
||||
Nats/v1:
|
||||
scope: Outside
|
||||
diagram_node_classname: diagrams.onprem.queue.Nats
|
||||
Slack/v1:
|
||||
scope: Outside
|
||||
custom_icon: icons/slack.png
|
||||
# TODO:
|
||||
# - template.log
|
||||
# - template.argoWorkflow
|
||||
89
examples/argo/README.md
Normal file
@@ -0,0 +1,89 @@
|
||||
# Argo Example
|
||||
|
||||
This example is dedicated to **[Argo](https://argoproj.github.io/)** projects including **[Argo Workflows](https://argoproj.github.io/workflows/)**, **[Argo CD](https://argoproj.github.io/cd/)**, **[Argo Rollouts](https://argoproj.github.io/rollouts/)**, and **[Argo Events](https://argoproj.github.io/events/)**.
|
||||
|
||||
## Instructions
|
||||
|
||||
Generate the Kubernetes architecture diagrams for **[Argo](https://argoproj.github.io/)** projects:
|
||||
|
||||
```sh
|
||||
$ generate.sh
|
||||
```
|
||||
|
||||
## Generated architecture diagrams
|
||||
|
||||
### [Argo Workflows](https://argoproj.github.io/workflows/)
|
||||
|
||||
Architecture diagram for [Argo Workflows Helm Chart](https://artifacthub.io/packages/helm/argo/argo-workflows):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo Workflows Quick Start Minimal Manifest](https://github.com/argoproj/argo-workflows/blob/main/manifests/quick-start-minimal.yaml):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo Workflows Hello World Example](https://raw.githubusercontent.com/argoproj/argo-workflows/main/examples/hello-world.yaml):
|
||||
|
||||

|
||||
|
||||
### [Argo CD](https://argoproj.github.io/cd/)
|
||||
|
||||
Architecture diagram for [Argo CD Helm Chart](https://artifacthub.io/packages/helm/argo/argo-cd):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo CD Quick Start Install Manifest](https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo CD Quick Start Install Manifest](https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml) without namespace:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo CD Quick Start Install Manifest where missed metadata labels were added](https://github.com/argoproj/argo-cd/pull/23313):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo CD HA Install Manifest](https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/ha/install.yaml):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo CD HA Install Manifest](https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/ha/install.yaml) without namespace:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo CD Example Apps apps](https://github.com/argoproj/argocd-example-apps/tree/master/apps):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo CD Example Apps pre-post-sync](https://github.com/argoproj/argocd-example-apps/tree/master/pre-post-sync):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo CD Example Apps sync-waves](https://github.com/argoproj/argocd-example-apps/tree/master/sync-waves):
|
||||
|
||||

|
||||
|
||||
### [Argo Rollouts](https://argoproj.github.io/rollouts/)
|
||||
|
||||
Architecture diagram for [Argo Rollouts Helm Chart](https://artifacthub.io/packages/helm/argo/argo-rollouts):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo CD Example Apps blue-green](https://github.com/argoproj/argocd-example-apps/tree/master/blue-green):
|
||||
|
||||

|
||||
|
||||
### [Argo Events](https://argoproj.github.io/events/)
|
||||
|
||||
Architecture diagram for [Argo Events Helm Chart](https://artifacthub.io/packages/helm/argo/argo-events):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo Events Install Manifest](https://github.com/argoproj/argo-events/blob/master/manifests/install.yaml):
|
||||
|
||||

|
||||
|
||||
Architecture diagram for [Argo Events Examples](https://github.com/argoproj/argo-events/tree/master/examples):
|
||||
|
||||

|
||||
26681
examples/argo/argo-cd-manifests-install-corrected.yaml
Normal file
1
examples/argo/argo-cd.kd
Normal file
@@ -0,0 +1 @@
|
||||
default_namespace: argocd
|
||||
BIN
examples/argo/diagrams/argo-cd-manifests-ha-install.png
Normal file
|
After Width: | Height: | Size: 954 KiB |
BIN
examples/argo/diagrams/argo-cd-manifests-install-corrected.png
Normal file
|
After Width: | Height: | Size: 737 KiB |
|
After Width: | Height: | Size: 781 KiB |
|
After Width: | Height: | Size: 704 KiB |
BIN
examples/argo/diagrams/argo-cd-manifests-install.png
Normal file
|
After Width: | Height: | Size: 737 KiB |
BIN
examples/argo/diagrams/argo-cd.png
Normal file
|
After Width: | Height: | Size: 641 KiB |
BIN
examples/argo/diagrams/argo-events.png
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
examples/argo/diagrams/argo-rollouts.png
Normal file
|
After Width: | Height: | Size: 133 KiB |
BIN
examples/argo/diagrams/argo-workflows.png
Normal file
|
After Width: | Height: | Size: 300 KiB |
BIN
examples/argo/diagrams/argoproj-argo-events-examples.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 113 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 344 KiB |
BIN
examples/argo/diagrams/argoproj-argocd-example-apps-apps.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 84 KiB |
28039
examples/argo/downloads/argo-cd-manifests-ha-install.yaml
Normal file
26777
examples/argo/downloads/argo-cd-manifests-install.yaml
Normal file
@@ -0,0 +1,438 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: eventbus.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: EventBus
|
||||
listKind: EventBusList
|
||||
plural: eventbus
|
||||
shortNames:
|
||||
- eb
|
||||
singular: eventbus
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
status:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: eventsources.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: EventSource
|
||||
listKind: EventSourceList
|
||||
plural: eventsources
|
||||
shortNames:
|
||||
- es
|
||||
singular: eventsource
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
status:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: sensors.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: Sensor
|
||||
listKind: SensorList
|
||||
plural: sensors
|
||||
shortNames:
|
||||
- sn
|
||||
singular: sensor
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
status:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
required:
|
||||
- metadata
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: argo-events-sa
|
||||
namespace: argo-events
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
||||
name: argo-events-aggregate-to-admin
|
||||
rules:
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- sensors
|
||||
- sensors/finalizers
|
||||
- sensors/status
|
||||
- eventsources
|
||||
- eventsources/finalizers
|
||||
- eventsources/status
|
||||
- eventbus
|
||||
- eventbus/finalizers
|
||||
- eventbus/status
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||
name: argo-events-aggregate-to-edit
|
||||
rules:
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- sensors
|
||||
- sensors/finalizers
|
||||
- sensors/status
|
||||
- eventsources
|
||||
- eventsources/finalizers
|
||||
- eventsources/status
|
||||
- eventbus
|
||||
- eventbus/finalizers
|
||||
- eventbus/status
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
labels:
|
||||
rbac.authorization.k8s.io/aggregate-to-view: "true"
|
||||
name: argo-events-aggregate-to-view
|
||||
rules:
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- sensors
|
||||
- sensors/finalizers
|
||||
- sensors/status
|
||||
- eventsources
|
||||
- eventsources/finalizers
|
||||
- eventsources/status
|
||||
- eventbus
|
||||
- eventbus/finalizers
|
||||
- eventbus/status
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: argo-events-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- sensors
|
||||
- sensors/finalizers
|
||||
- sensors/status
|
||||
- eventsources
|
||||
- eventsources/finalizers
|
||||
- eventsources/status
|
||||
- eventbus
|
||||
- eventbus/finalizers
|
||||
- eventbus/status
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- deletecollection
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/exec
|
||||
- configmaps
|
||||
- services
|
||||
- persistentvolumeclaims
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
- statefulsets
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: argo-events-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: argo-events-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: argo-events-sa
|
||||
namespace: argo-events
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
controller-config.yaml: |
|
||||
eventBus:
|
||||
nats:
|
||||
versions:
|
||||
- version: 0.22.1
|
||||
natsStreamingImage: nats-streaming:0.22.1
|
||||
metricsExporterImage: natsio/prometheus-nats-exporter:0.8.0
|
||||
jetstream:
|
||||
# Default JetStream settings, could be overridden by EventBus JetStream specs
|
||||
settings: |
|
||||
# https://docs.nats.io/running-a-nats-service/configuration#jetstream
|
||||
# Only configure "max_memory_store" or "max_file_store", do not set "store_dir" as it has been hardcoded.
|
||||
# e.g. 1G. -1 means no limit, up to 75% of available memory
|
||||
max_memory_store: -1
|
||||
# e.g. 20G. -1 means no limit, Up to 1TB if available
|
||||
max_file_store: 1TB
|
||||
streamConfig: |
|
||||
# The default properties of the streams to be created in this JetStream service
|
||||
maxMsgs: 50000
|
||||
maxAge: 168h
|
||||
maxBytes: -1
|
||||
replicas: 3
|
||||
duplicates: 300s
|
||||
# 0: Limits, 1: Interest, 2: WorkQueue
|
||||
retention: 0
|
||||
# 0: DiscardOld, 1: DiscardNew
|
||||
discard: 0
|
||||
versions:
|
||||
- version: latest
|
||||
natsImage: nats:2.10.10
|
||||
metricsExporterImage: natsio/prometheus-nats-exporter:0.14.0
|
||||
configReloaderImage: natsio/nats-server-config-reloader:0.14.0
|
||||
startCommand: /nats-server
|
||||
- version: 2.8.1
|
||||
natsImage: nats:2.8.1
|
||||
metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
|
||||
configReloaderImage: natsio/nats-server-config-reloader:0.7.0
|
||||
startCommand: /nats-server
|
||||
- version: 2.8.1-alpine
|
||||
natsImage: nats:2.8.1-alpine
|
||||
metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
|
||||
configReloaderImage: natsio/nats-server-config-reloader:0.7.0
|
||||
startCommand: nats-server
|
||||
- version: 2.8.2
|
||||
natsImage: nats:2.8.2
|
||||
metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
|
||||
configReloaderImage: natsio/nats-server-config-reloader:0.7.0
|
||||
startCommand: /nats-server
|
||||
- version: 2.8.2-alpine
|
||||
natsImage: nats:2.8.2-alpine
|
||||
metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
|
||||
configReloaderImage: natsio/nats-server-config-reloader:0.7.0
|
||||
startCommand: nats-server
|
||||
- version: 2.9.1
|
||||
natsImage: nats:2.9.1
|
||||
metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
|
||||
configReloaderImage: natsio/nats-server-config-reloader:0.7.0
|
||||
startCommand: /nats-server
|
||||
- version: 2.9.12
|
||||
natsImage: nats:2.9.12
|
||||
metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
|
||||
configReloaderImage: natsio/nats-server-config-reloader:0.7.0
|
||||
startCommand: /nats-server
|
||||
- version: 2.9.16
|
||||
natsImage: nats:2.9.16
|
||||
metricsExporterImage: natsio/prometheus-nats-exporter:0.9.1
|
||||
configReloaderImage: natsio/nats-server-config-reloader:0.7.0
|
||||
startCommand: /nats-server
|
||||
- version: 2.10.10
|
||||
natsImage: nats:2.10.10
|
||||
metricsExporterImage: natsio/prometheus-nats-exporter:0.14.0
|
||||
configReloaderImage: natsio/nats-server-config-reloader:0.14.0
|
||||
startCommand: /nats-server
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: argo-events-controller-config
|
||||
namespace: argo-events
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller-manager
|
||||
namespace: argo-events
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: controller-manager
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: controller-manager
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- controller
|
||||
env:
|
||||
- name: ARGO_EVENTS_IMAGE
|
||||
value: quay.io/argoproj/argo-events:latest
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
image: quay.io/argoproj/argo-events:latest
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8081
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 3
|
||||
name: controller-manager
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: 8081
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 3
|
||||
volumeMounts:
|
||||
- mountPath: /etc/argo-events
|
||||
name: controller-config-volume
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 9731
|
||||
serviceAccountName: argo-events-sa
|
||||
volumes:
|
||||
- configMap:
|
||||
name: argo-events-controller-config
|
||||
name: controller-config-volume
|
||||
@@ -0,0 +1,17 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Workflow
|
||||
metadata:
|
||||
generateName: hello-world-
|
||||
labels:
|
||||
workflows.argoproj.io/archive-strategy: "false"
|
||||
annotations:
|
||||
workflows.argoproj.io/description: |
|
||||
This is a simple hello world example.
|
||||
spec:
|
||||
entrypoint: hello-world
|
||||
templates:
|
||||
- name: hello-world
|
||||
container:
|
||||
image: busybox
|
||||
command: [echo]
|
||||
args: ["hello world"]
|
||||
50
examples/argo/generate.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#! /bin/sh
|
||||
|
||||
BIN=../../bin
|
||||
|
||||
# Download Argo Workflows Quick Start manifests
|
||||
curl https://raw.githubusercontent.com/argoproj/argo-workflows/refs/heads/main/manifests/quick-start-minimal.yaml > downloads/argoproj-argo-workflows-manifests-quick-start-minimal.yaml
|
||||
|
||||
# Download Argo Workflows examples
|
||||
curl https://raw.githubusercontent.com/argoproj/argo-workflows/main/examples/hello-world.yaml > downloads/argoproj-argo-workflows-examples-hello-world.yaml
|
||||
|
||||
# Download install manifests for Argo CD
|
||||
curl https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml > downloads/argo-cd-manifests-install.yaml
|
||||
curl https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/ha/install.yaml > downloads/argo-cd-manifests-ha-install.yaml
|
||||
|
||||
# Clone GitHub argoproj/argocd-example-apps repository
|
||||
git clone https://github.com/argoproj/argocd-example-apps.git downloads/argocd-example-apps
|
||||
|
||||
# Download Argo Events Quick Start manifests
|
||||
curl https://raw.githubusercontent.com/argoproj/argo-events/refs/heads/master/manifests/install.yaml > downloads/argoproj-argo-events-manifests-install.yaml
|
||||
|
||||
# Clone Argo Events GitHub repository
|
||||
git clone https://github.com/argoproj/argo-events.git downloads/argo-events
|
||||
|
||||
# Generate the Kubernetes architecture diagrams for Argo Helm Charts
|
||||
$BIN/helm-diagrams https://argoproj.github.io/argo-helm/argo-cd -o diagrams/argo-cd.png
|
||||
$BIN/helm-diagrams https://argoproj.github.io/argo-helm/argo-workflows -o diagrams/argo-workflows.png
|
||||
$BIN/helm-diagrams https://argoproj.github.io/argo-helm/argo-rollouts -o diagrams/argo-rollouts.png
|
||||
$BIN/helm-diagrams https://argoproj.github.io/argo-helm/argo-events -o diagrams/argo-events.png
|
||||
|
||||
# Generate the Kubernetes architecture diagrams for Argo Workflows
|
||||
$BIN/kube-diagrams downloads/argoproj-argo-workflows-manifests-quick-start-minimal.yaml -o diagrams/argoproj-argo-workflows-manifests-quick-start-minimal.png
|
||||
$BIN/kube-diagrams -c KubeDiagrams.yaml downloads/argoproj-argo-workflows-examples-hello-world.yaml -o diagrams/argoproj-argo-workflows-examples-hello-world.png
|
||||
|
||||
# Generate the Kubernetes architecture diagrams for Argo CD
|
||||
$BIN/kube-diagrams -c argo-cd.kd downloads/argo-cd-manifests-install.yaml -o diagrams/argo-cd-manifests-install.png
|
||||
$BIN/kube-diagrams -c argo-cd.kd downloads/argo-cd-manifests-install.yaml --without-namespace -o diagrams/argo-cd-manifests-install-without-namespace.png
|
||||
$BIN/kube-diagrams -c argo-cd.kd argo-cd-manifests-install-corrected.yaml -o diagrams/argo-cd-manifests-install-corrected.png
|
||||
$BIN/kube-diagrams -c argo-cd.kd argo-cd-manifests-install-corrected.yaml --without-namespace -o diagrams/argo-cd-manifests-install-without-namespace-corrected.png
|
||||
$BIN/kube-diagrams -c argo-cd.kd downloads/argo-cd-manifests-ha-install.yaml -o diagrams/argo-cd-manifests-ha-install.png
|
||||
|
||||
# Generate the Kubernetes architecture diagram for Argo CD Example Apps
|
||||
$BIN/helm-diagrams downloads/argocd-example-apps/apps -o diagrams/argoproj-argocd-example-apps-apps.png
|
||||
$BIN/helm-diagrams downloads/argocd-example-apps/blue-green -o diagrams/argoproj-argocd-example-apps-blue-green.png
|
||||
kubectl kustomize downloads/argocd-example-apps/pre-post-sync | $BIN/kube-diagrams - -c KubeDiagrams.yaml -o diagrams/argoproj-argocd-example-apps-pre-post-sync.png
|
||||
kubectl kustomize downloads/argocd-example-apps/sock-shop | $BIN/kube-diagrams - -o diagrams/argoproj-argocd-example-apps-sock-shop.png
|
||||
$BIN/kube-diagrams downloads/argocd-example-apps/sync-waves/manifests.yaml -c KubeDiagrams.yaml -o diagrams/argoproj-argocd-example-apps-sync-waves.png
|
||||
|
||||
# Generate the Kubernetes architecture diagrams for Argo Events
|
||||
$BIN/kube-diagrams downloads/argoproj-argo-events-manifests-install.yaml -o diagrams/argoproj-argo-events-manifests-install.png
|
||||
$BIN/kube-diagrams -o diagrams/argoproj-argo-events-examples -c KubeDiagrams.yaml --without-namespace downloads/argo-events/examples/*/*.yaml
|
||||
BIN
examples/argo/icons/Application.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
examples/argo/icons/Argo.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
examples/argo/icons/EventBus.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
examples/argo/icons/EventSource.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
examples/argo/icons/Rollout.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
examples/argo/icons/Sensor.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
examples/argo/icons/Workflow.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
examples/argo/icons/amqp-message-queue.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
examples/argo/icons/apache-openwhisk-logo-only.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
examples/argo/icons/bitbucket.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
examples/argo/icons/emitter.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
examples/argo/icons/file.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
examples/argo/icons/grpc-logo.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
examples/argo/icons/slack.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
1
examples/bank-of-anthos/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bank-of-anthos
|
||||
25
examples/bank-of-anthos/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Bank of Anthos Example
|
||||
|
||||
This example is dedicated to **[Google Cloud Platform's Bank of Anthos](https://github.com/GoogleCloudPlatform/bank-of-anthos/)**.
|
||||
|
||||
## Instructions
|
||||
|
||||
Generate the Kubernetes architecture diagrams:
|
||||
|
||||
```sh
|
||||
./generate.sh
|
||||
```
|
||||
|
||||
## Generated architecture diagrams
|
||||
|
||||
Architecture diagram for **[Google Cloud Platform's Bank of Anthos manifests](https://github.com/GoogleCloudPlatform/bank-of-anthos/tree/main/kubernetes-manifests)**:
|
||||
|
||||

|
||||
|
||||
Customized architecture diagram for **[Google Cloud Platform's Bank of Anthos manifests](https://github.com/GoogleCloudPlatform/bank-of-anthos/tree/main/kubernetes-manifests)**:
|
||||
|
||||

|
||||
|
||||
Another customized architecture diagram for **[Google Cloud Platform's Bank of Anthos manifests](https://github.com/GoogleCloudPlatform/bank-of-anthos/tree/main/kubernetes-manifests)**:
|
||||
|
||||

|
||||
3
examples/bank-of-anthos/custom-diagram-1.kdc
Normal file
@@ -0,0 +1,3 @@
|
||||
clusters:
|
||||
- label: app
|
||||
show: false
|
||||
13
examples/bank-of-anthos/custom-diagram-2.kdc
Normal file
@@ -0,0 +1,13 @@
|
||||
clusters:
|
||||
- label: app
|
||||
show: false
|
||||
- label: tier
|
||||
show: false
|
||||
- label: application
|
||||
title: "Application: {}"
|
||||
graph_attr:
|
||||
bgcolor: "#ECE8F6"
|
||||
- label: team
|
||||
title: "Team: {}"
|
||||
graph_attr:
|
||||
bgcolor: "#EBF3E7"
|
||||
44
examples/bank-of-anthos/custom-edges.kdc
Normal file
@@ -0,0 +1,44 @@
|
||||
edges:
|
||||
REFERENCE:
|
||||
color: gray
|
||||
diagram:
|
||||
edges:
|
||||
- from: loadgenerator/default/Deployment/apps/v1
|
||||
to: frontend/default/Service/v1
|
||||
color: brown
|
||||
- from: frontend/default/Deployment/apps/v1
|
||||
to: userservice/default/Service/v1
|
||||
color: brown
|
||||
- from: frontend/default/Deployment/apps/v1
|
||||
to: contacts/default/Service/v1
|
||||
color: brown
|
||||
- from: frontend/default/Deployment/apps/v1
|
||||
to: ledgerwriter/default/Service/v1
|
||||
color: brown
|
||||
- from: frontend/default/Deployment/apps/v1
|
||||
to: ledgerwriter/default/Service/v1
|
||||
color: brown
|
||||
- from: frontend/default/Deployment/apps/v1
|
||||
to: balancereader/default/Service/v1
|
||||
color: brown
|
||||
- from: frontend/default/Deployment/apps/v1
|
||||
to: transactionhistory/default/Service/v1
|
||||
color: brown
|
||||
- from: userservice/default/Deployment/apps/v1
|
||||
to: accounts-db/default/Service/v1
|
||||
color: brown
|
||||
- from: contacts/default/Deployment/apps/v1
|
||||
to: accounts-db/default/Service/v1
|
||||
color: brown
|
||||
- from: ledgerwriter/default/Deployment/apps/v1
|
||||
to: ledger-db/default/Service/v1
|
||||
color: brown
|
||||
- from: ledgerwriter/default/Deployment/apps/v1
|
||||
to: balancereader/default/Service/v1
|
||||
color: brown
|
||||
- from: balancereader/default/Deployment/apps/v1
|
||||
to: ledger-db/default/Service/v1
|
||||
color: brown
|
||||
- from: transactionhistory/default/Deployment/apps/v1
|
||||
to: ledger-db/default/Service/v1
|
||||
color: brown
|
||||
BIN
examples/bank-of-anthos/diagrams/bank-of-anthos.png
Normal file
|
After Width: | Height: | Size: 155 KiB |
BIN
examples/bank-of-anthos/diagrams/custom-diagram-1.png
Normal file
|
After Width: | Height: | Size: 255 KiB |
BIN
examples/bank-of-anthos/diagrams/custom-diagram-2.png
Normal file
|
After Width: | Height: | Size: 310 KiB |
15
examples/bank-of-anthos/generate.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#! /bin/sh
|
||||
|
||||
PATH=../../bin:$PATH
|
||||
|
||||
# Clone the Bank of Anthos GitHub repository
|
||||
git clone https://github.com/GoogleCloudPlatform/bank-of-anthos.git
|
||||
|
||||
# Generate the architecture diagram for Bank of Anthos manifests
|
||||
kube-diagrams bank-of-anthos/kubernetes-manifests/* bank-of-anthos/extras/jwt/jwt-secret.yaml -o diagrams/bank-of-anthos.png
|
||||
|
||||
# Generate a custom diagram for Bank of Anthos manifests
|
||||
kube-diagrams bank-of-anthos/kubernetes-manifests/* bank-of-anthos/extras/jwt/jwt-secret.yaml -c custom-diagram-1.kdc -c custom-edges.kdc -o diagrams/custom-diagram-1.png
|
||||
|
||||
# Generate another custom diagram for Bank of Anthos manifests
|
||||
kube-diagrams bank-of-anthos/kubernetes-manifests/* bank-of-anthos/extras/jwt/jwt-secret.yaml -c custom-diagram-2.kdc -c custom-edges.kdc -o diagrams/custom-diagram-2.png
|
||||
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 182 KiB After Width: | Height: | Size: 196 KiB |
37
examples/cert-manager/README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# `cert-manager` Example
|
||||
|
||||
This example is dedicated to **[cert-manager](https://cert-manager.io/)** example.
|
||||
|
||||
## Instructions
|
||||
|
||||
Generate the Kubernetes architecture diagrams for **[cert-manager](https://cert-manager.io/)** example:
|
||||
|
||||
```sh
|
||||
$ generate.sh
|
||||
```
|
||||
|
||||
## Generated architecture diagrams
|
||||
|
||||
Architecture diagram for **[cert-manager](https://cert-manager.io/)** Helm Chart:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for **[cert-manager](https://cert-manager.io/)** Helm Chart including CRDs:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for **[Rancher Helm Chart](https://artifacthub.io/packages/helm/rancher-stable/rancher)** using `cert-manager`:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for **[FQDN Controller Helm Chart](https://artifacthub.io/packages/helm/fqdn-controller/fqdn-controller)** using `cert-manager`:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for **[Mozilla securitywiki](manifests/mozilla-securitywiki.yaml)** using `cert-manager`:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for **[ClusterIssuer resources](manifests/cluster-issuers.yaml)**:
|
||||
|
||||

|
||||
277
examples/cert-manager/cert-manager.io.kd
Normal file
@@ -0,0 +1,277 @@
|
||||
#
|
||||
# KubeDiagrams configuration for cert-manager resources
|
||||
# from API group cert-manager.io
|
||||
#
|
||||
edges:
|
||||
CREATE:
|
||||
xlabel: create
|
||||
color: black
|
||||
style: dotted
|
||||
CREATE-UP:
|
||||
xlabel: create
|
||||
color: black
|
||||
style: dotted
|
||||
direction: up
|
||||
INJECT-CA:
|
||||
xlabel: inject ca
|
||||
color: black
|
||||
style: dotted
|
||||
nodes:
|
||||
Certificate/cert-manager.io/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.azure.web.AppServiceCertificates
|
||||
nodes: |
|
||||
secretName = query_path(resource, "spec.secretName")
|
||||
if secretName != None:
|
||||
node = {
|
||||
"kind": "Secret",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": secretName,
|
||||
"namespace": get_namespace(resource),
|
||||
"labels": query_path(resource, "metadata.labels")
|
||||
}
|
||||
}
|
||||
warning(resource, "spec.secretName", f"Create {node}")
|
||||
nodes.append(node)
|
||||
edges: |
|
||||
issuerRef = query_path(resource, "spec.issuerRef")
|
||||
if issuerRef != None:
|
||||
kind = issuerRef.get("kind", "Issuer")
|
||||
edges.add_edge_to(
|
||||
"spec.issuerRef",
|
||||
issuerRef["name"],
|
||||
edges.namespace if kind == "Issuer" else None,
|
||||
kind,
|
||||
"cert-manager.io/v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
edges.add_edge_to(
|
||||
"spec.secretName",
|
||||
".",
|
||||
edges.namespace,
|
||||
"Secret",
|
||||
"v1",
|
||||
"CREATE"
|
||||
)
|
||||
inject_from = f"{get_namespace(resource)}/{resource['metadata']['name']}"
|
||||
for _, r in resources.items():
|
||||
if r["kind"] in ["MutatingWebhookConfiguration", "ValidatingWebhookConfiguration"]:
|
||||
if r.get_metadata_annotation("cert-manager.io/inject-ca-from") == inject_from:
|
||||
edges.add_edge_to(
|
||||
"metadata.annotations.cert-manager.io/inject-ca-from",
|
||||
get_name(r),
|
||||
None,
|
||||
r["kind"],
|
||||
r["apiVersion"],
|
||||
"INJECT-CA"
|
||||
)
|
||||
Certificate/certmanager.k8s.io/v1alpha1: Certificate/cert-manager.io/v1
|
||||
Certificate/cert-manager.io/v1alpha2: Certificate/cert-manager.io/v1
|
||||
ClusterIssuer/cert-manager.io/v1:
|
||||
scope: Cluster
|
||||
diagram_node_classname: diagrams.aws.security.CertificateAuthority
|
||||
nodes: |
|
||||
secretName = query_path(resource, "spec.ca.secretName")
|
||||
if secretName != None:
|
||||
node = {
|
||||
"kind": "Secret",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": secretName,
|
||||
"namespace": "cert-manager",
|
||||
"labels": query_path(resource, "metadata.labels")
|
||||
}
|
||||
}
|
||||
warning(resource, "spec.ca.secretName", f"Create {node}")
|
||||
nodes.append(node)
|
||||
secretName = query_path(resource, "spec.acme.privateKeySecretRef.name")
|
||||
if secretName != None:
|
||||
node = {
|
||||
"kind": "Secret",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": secretName,
|
||||
"namespace": "cert-manager",
|
||||
"labels": query_path(resource, "metadata.labels")
|
||||
}
|
||||
}
|
||||
warning(resource, "spec.acme.privateKeySecretRef.name", f"Create {node}")
|
||||
nodes.append(node)
|
||||
edges: |
|
||||
edges.add_edge_to(
|
||||
"spec.ca.secretName",
|
||||
".",
|
||||
"cert-manager",
|
||||
"Secret",
|
||||
"v1",
|
||||
"CREATE"
|
||||
)
|
||||
edges.add_edge_to(
|
||||
"spec.acme.privateKeySecretRef.name",
|
||||
".",
|
||||
"cert-manager",
|
||||
"Secret",
|
||||
"v1",
|
||||
"CREATE"
|
||||
)
|
||||
ClusterIssuer/certmanager.k8s.io/v1alpha1: ClusterIssuer/cert-manager.io/v1
|
||||
ClusterIssuer/cert-manager.io/v1alpha2: ClusterIssuer/cert-manager.io/v1
|
||||
Issuer/cert-manager.io/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.aws.security.CertificateAuthority
|
||||
nodes: |
|
||||
secretName = query_path(resource, "spec.ca.secretName")
|
||||
if secretName != None:
|
||||
node = {
|
||||
"kind": "Secret",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": secretName,
|
||||
"namespace": get_namespace(resource),
|
||||
"labels": query_path(resource, "metadata.labels")
|
||||
}
|
||||
}
|
||||
warning(resource, "spec.ca.secretName", f"Create {node}")
|
||||
nodes.append(node)
|
||||
secretName = query_path(resource, "spec.acme.privateKeySecretRef.name")
|
||||
if secretName != None:
|
||||
node = {
|
||||
"kind": "Secret",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": secretName,
|
||||
"namespace": get_namespace(resource),
|
||||
"labels": query_path(resource, "metadata.labels")
|
||||
}
|
||||
}
|
||||
warning(resource, "spec.acme.privateKeySecretRef.name", f"Create {node}")
|
||||
nodes.append(node)
|
||||
edges: |
|
||||
edges.add_edge_to(
|
||||
"spec.ca.secretName",
|
||||
".",
|
||||
edges.namespace,
|
||||
"Secret",
|
||||
"v1",
|
||||
"CREATE"
|
||||
)
|
||||
edges.add_edge_to(
|
||||
"spec.acme.privateKeySecretRef.name",
|
||||
".",
|
||||
edges.namespace,
|
||||
"Secret",
|
||||
"v1",
|
||||
"CREATE"
|
||||
)
|
||||
Issuer/certmanager.k8s.io/v1alpha1: Issuer/cert-manager.io/v1
|
||||
Issuer/cert-manager.io/v1alpha2: Issuer/cert-manager.io/v1
|
||||
|
||||
#
|
||||
# Overloading Ingress
|
||||
#
|
||||
Ingress/networking.k8s.io/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.k8s.network.Ing
|
||||
nodes: | # NEW
|
||||
issuer = resource.get_metadata_annotation("cert-manager.io/issuer")
|
||||
if issuer is not None:
|
||||
for tls in query_path(resource, "spec.tls", []):
|
||||
node = {
|
||||
"kind": "Certificate",
|
||||
"apiVersion": "cert-manager.io/v1",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
"namespace": get_namespace(resource),
|
||||
"labels": query_path(resource, "metadata.labels")
|
||||
},
|
||||
"spec": {
|
||||
"issuerRef": {
|
||||
"kind": "Issuer",
|
||||
"name": issuer
|
||||
},
|
||||
"secretName": tls.get("secretName")
|
||||
}
|
||||
}
|
||||
warning(resource, "metadata.annotations.cert-manager.io/issuer", f"Create {node}")
|
||||
nodes.append(node)
|
||||
cluster_issuer = resource.get_metadata_annotation("cert-manager.io/cluster-issuer")
|
||||
if cluster_issuer is not None:
|
||||
for tls in query_path(resource, "spec.tls", []):
|
||||
node = {
|
||||
"kind": "Certificate",
|
||||
"apiVersion": "cert-manager.io/v1",
|
||||
"metadata": {
|
||||
"name": get_name(resource),
|
||||
"namespace": get_namespace(resource),
|
||||
"labels": query_path(resource, "metadata.labels")
|
||||
},
|
||||
"spec": {
|
||||
"issuerRef": {
|
||||
"kind": "ClusterIssuer",
|
||||
"name": cluster_issuer
|
||||
},
|
||||
"secretName": tls.get("secretName")
|
||||
}
|
||||
}
|
||||
warning(resource, "metadata.annotations.cert-manager.io/issuer", f"Create {node}")
|
||||
nodes.append(node)
|
||||
edges: |
|
||||
edges.add_service("spec.defaultBackend.service.name")
|
||||
for ridx, rule in enumerate(query_path(resource, "spec.rules", [])):
|
||||
for pidx, path in enumerate(query_path(rule, "http.paths", [])):
|
||||
edges.add_service("backend.service.name", path)
|
||||
edges.add_edge_to(
|
||||
"spec.ingressClassName",
|
||||
".",
|
||||
None,
|
||||
"IngressClass",
|
||||
"networking.k8s.io/v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
for idx, tls in enumerate(query_path(resource, "spec.tls", [])):
|
||||
edges.add_edge_to(
|
||||
f"spec.tls[{idx}].secretName",
|
||||
tls.get("secretName"),
|
||||
get_namespace(resource),
|
||||
"Secret",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# NEW
|
||||
issuer = resource.get_metadata_annotation("cert-manager.io/issuer")
|
||||
if issuer is not None:
|
||||
edges.add_edge_to(
|
||||
"metadata.annotations.cert-manager.io/issuer",
|
||||
issuer,
|
||||
get_namespace(resource),
|
||||
"Issuer",
|
||||
"cert-manager.io/v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
edges.add_edge_to(
|
||||
"metadata.annotations.cert-manager.io/issuer",
|
||||
get_name(resource),
|
||||
get_namespace(resource),
|
||||
"Certificate",
|
||||
"cert-manager.io/v1",
|
||||
"CREATE-UP"
|
||||
)
|
||||
cluster_issuer = resource.get_metadata_annotation("cert-manager.io/cluster-issuer")
|
||||
if cluster_issuer is not None:
|
||||
edges.add_edge_to(
|
||||
"metadata.annotations.cert-manager.io/issuer",
|
||||
cluster_issuer,
|
||||
None,
|
||||
"ClusterIssuer",
|
||||
"cert-manager.io/v1",
|
||||
"REFERENCE-UP"
|
||||
)
|
||||
edges.add_edge_to(
|
||||
"metadata.annotations.cert-manager.io/issuer",
|
||||
get_name(resource),
|
||||
get_namespace(resource),
|
||||
"Certificate",
|
||||
"cert-manager.io/v1",
|
||||
"CREATE-UP"
|
||||
)
|
||||
BIN
examples/cert-manager/diagrams/cert-manager-helm-chart.png
Normal file
|
After Width: | Height: | Size: 509 KiB |
|
After Width: | Height: | Size: 515 KiB |
BIN
examples/cert-manager/diagrams/cluster-issuers.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
examples/cert-manager/diagrams/fqdn-controller.png
Normal file
|
After Width: | Height: | Size: 250 KiB |
BIN
examples/cert-manager/diagrams/mozilla-securitywiki.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
examples/cert-manager/diagrams/rancher.png
Normal file
|
After Width: | Height: | Size: 266 KiB |
21
examples/cert-manager/generate.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#! /bin/sh
|
||||
|
||||
BIN=../../bin
|
||||
|
||||
# Generate diagram from cert-manager Helm Chart
|
||||
$BIN/helm-diagrams https://charts.jetstack.io/cert-manager --namespace cert-manager -o diagrams/cert-manager-helm-chart.png
|
||||
|
||||
# Generate diagram from cert-manager Helm Chart with CRDs
|
||||
$BIN/helm-diagrams https://charts.jetstack.io/cert-manager --namespace cert-manager --set crds.enabled=true -o diagrams/cert-manager-with-crds-helm-chart.png
|
||||
|
||||
# Generate diagram from Rancher Helm Chart using cert-manager
|
||||
$BIN/helm-diagrams https://releases.rancher.com/server-charts/latest/rancher --set hostname=rancher.my.org -c cert-manager.io.kd -o diagrams/rancher.png
|
||||
|
||||
# Generate diagram from FQDN Controller Helm Chart using cert-manager
|
||||
$BIN/helm-diagrams https://konsole-is.github.io/fqdn-controller/charts/fqdn-controller -c cert-manager.io.kd -o diagrams/fqdn-controller.png
|
||||
|
||||
# Generate diagram from Mozilla securitywiki Helm Chart using cert-manager
|
||||
$BIN/kube-diagrams manifests/mozilla-securitywiki.yaml --without-namespace -c cert-manager.io.kd -o diagrams/mozilla-securitywiki.png
|
||||
|
||||
# Generate diagram for ClusterIssuer resources
|
||||
$BIN/kube-diagrams manifests/cluster-issuers.yaml -c cert-manager.io.kd -o diagrams/cluster-issuers.png
|
||||
49
examples/cert-manager/manifests/cluster-issuers.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: cluster-issuer-ca
|
||||
spec:
|
||||
ca:
|
||||
secretName: secret-cluster-issuer-ca
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: cluster-issuer-acme
|
||||
spec:
|
||||
acme:
|
||||
privateKeySecretRef:
|
||||
name: secret-cluster-issuer-acme
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: certificate-ca
|
||||
spec:
|
||||
issuerRef:
|
||||
group: cert-manager.io
|
||||
kind: ClusterIssuer
|
||||
name: cluster-issuer-ca
|
||||
secretName: secret-certificate-ca
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: certificate-acme
|
||||
spec:
|
||||
issuerRef:
|
||||
group: cert-manager.io
|
||||
kind: ClusterIssuer
|
||||
name: cluster-issuer-acme
|
||||
secretName: secret-certificate-acme
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress-ca
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: cluster-issuer-ca
|
||||
spec:
|
||||
tls:
|
||||
- secretName: secret-ingress-ca
|
||||
191
examples/cert-manager/manifests/mozilla-securitywiki.yaml
Normal file
@@ -0,0 +1,191 @@
|
||||
---
|
||||
# Source: securitywiki/templates/configmap.yaml
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: securitywiki
|
||||
labels:
|
||||
helm.sh/chart: securitywiki-1.0.1
|
||||
app.kubernetes.io/name: securitywiki
|
||||
app.kubernetes.io/instance: securitywiki
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
data:
|
||||
ENVIRONMENT: stage
|
||||
SITE_URL: https://securitywiki.allizom.org
|
||||
---
|
||||
# Source: securitywiki/templates/service.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: securitywiki
|
||||
labels:
|
||||
helm.sh/chart: securitywiki-1.0.1
|
||||
app.kubernetes.io/name: securitywiki
|
||||
app.kubernetes.io/instance: securitywiki
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
spec:
|
||||
externalTrafficPolicy: Cluster
|
||||
ports:
|
||||
- port: 80
|
||||
name: http
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
selector:
|
||||
app.kubernetes.io/name: securitywiki
|
||||
app.kubernetes.io/instance: securitywiki
|
||||
type: LoadBalancer
|
||||
---
|
||||
# Source: securitywiki/templates/deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: securitywiki
|
||||
labels:
|
||||
helm.sh/chart: securitywiki-1.0.1
|
||||
app.kubernetes.io/name: securitywiki
|
||||
app.kubernetes.io/instance: securitywiki
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: securitywiki
|
||||
app.kubernetes.io/instance: securitywiki
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 2
|
||||
maxUnavailable: "25%"
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: securitywiki
|
||||
app.kubernetes.io/instance: securitywiki
|
||||
spec:
|
||||
initContainers:
|
||||
- name: migrate
|
||||
image: "783633885093.dkr.ecr.us-west-2.amazonaws.com/securitywiki:master-cccd24f1c4e62fef09ff2d0625f29ee91277a270"
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- "/bin/bash"
|
||||
- "-c"
|
||||
- "chown www-data:www-data /data/securitywiki && find /data/securitywiki \\! -user www-data -exec chown -R www-data:www-data {} \\;"
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
cpu: "128m"
|
||||
limits:
|
||||
memory: 128Mi
|
||||
cpu: "128m"
|
||||
volumeMounts:
|
||||
- name: securitywiki-fs
|
||||
mountPath: /data/securitywiki
|
||||
containers:
|
||||
- name: securitywiki
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: securitywiki
|
||||
image: "783633885093.dkr.ecr.us-west-2.amazonaws.com/securitywiki:master-cccd24f1c4e62fef09ff2d0625f29ee91277a270"
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health.php
|
||||
port: http
|
||||
readinessProbe:
|
||||
initialDelaySeconds: 5
|
||||
successThreshold: 3
|
||||
httpGet:
|
||||
path: /health.php
|
||||
port: http
|
||||
resources:
|
||||
limits:
|
||||
cpu: 512m
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
volumeMounts:
|
||||
- name: securitywiki-fs
|
||||
mountPath: /data/securitywiki
|
||||
volumes:
|
||||
- name: securitywiki-fs
|
||||
emptyDir: {}
|
||||
---
|
||||
# Source: securitywiki/templates/hpa.yaml
|
||||
apiVersion: autoscaling/v1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: securitywiki
|
||||
labels:
|
||||
helm.sh/chart: securitywiki-1.0.1
|
||||
app.kubernetes.io/name: securitywiki
|
||||
app.kubernetes.io/instance: securitywiki
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
spec:
|
||||
maxReplicas: 4
|
||||
minReplicas: 2
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: securitywiki
|
||||
targetCPUUtilizationPercentage: 80
|
||||
---
|
||||
# Source: securitywiki/templates/ingress.yaml
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: securitywiki
|
||||
annotations:
|
||||
cert-manager.io/issuer: letsencrypt
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||
more_set_headers "X-Frame-Options: SAMEORIGIN";
|
||||
more_set_headers "Content-Security-Policy: frame-ancestors 'none'";
|
||||
labels:
|
||||
helm.sh/chart: securitywiki-1.0.1
|
||||
app.kubernetes.io/name: securitywiki
|
||||
app.kubernetes.io/instance: securitywiki
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: "securitywiki.allizom.org"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: securitywiki
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- "securitywiki.allizom.org"
|
||||
secretName: chart-securitywiki-allizom-org
|
||||
---
|
||||
# Source: securitywiki/templates/issuer.yaml
|
||||
apiVersion: cert-manager.io/v1 #PM: Commented: alpha2
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: letsencrypt
|
||||
labels: #PM: Added
|
||||
helm.sh/chart: securitywiki-1.0.1
|
||||
app.kubernetes.io/name: securitywiki
|
||||
app.kubernetes.io/instance: securitywiki
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
spec:
|
||||
acme:
|
||||
email: it-se@mozilla.com
|
||||
server: https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
privateKeySecretRef:
|
||||
name: letsencrypt
|
||||
solvers:
|
||||
- http01:
|
||||
ingress:
|
||||
class: nginx
|
||||
132
examples/custom-object-items/config/custom-object-items.kd
Normal file
@@ -0,0 +1,132 @@
|
||||
diagram:
|
||||
clusters:
|
||||
EMEA:
|
||||
name: "K8s Cluster: EMEA"
|
||||
graph_attr:
|
||||
bgcolor: transparent
|
||||
pencolor: black
|
||||
style: dashed,rounded
|
||||
clusters:
|
||||
cert-manager:
|
||||
name: "cert-manager"
|
||||
type: diagrams.k8s.group.Namespace
|
||||
graph_attr:
|
||||
bgcolor: transparent
|
||||
pencolor: black
|
||||
style: dashed,rounded
|
||||
clusters:
|
||||
appcm:
|
||||
name: ""
|
||||
nodes:
|
||||
cert-manager:
|
||||
name: "Certificate Management"
|
||||
type: diagrams.onprem.certificates.CertManager
|
||||
minio-tls:
|
||||
name: "minio-tls"
|
||||
type: diagrams.k8s.group.Namespace
|
||||
graph_attr:
|
||||
bgcolor: transparent
|
||||
pencolor: black
|
||||
style: dashed,rounded
|
||||
clusters:
|
||||
appminio:
|
||||
name: ""
|
||||
nodes:
|
||||
minio-tls:
|
||||
name: "S3 Storage"
|
||||
icon: icons/minio.png
|
||||
nodes:
|
||||
Admin:
|
||||
name: Admin / DevOps
|
||||
type: diagrams.azure.general.Supportrequests
|
||||
Users:
|
||||
name: Users
|
||||
type: diagrams.azure.identity.Groups
|
||||
PKI:
|
||||
name: PKI
|
||||
type: diagrams.aws.security.CertificateAuthority
|
||||
edges:
|
||||
- from: Admin
|
||||
to: myapp-mgmt/myapp/Service/v1
|
||||
xlabel: SSH
|
||||
color: orange
|
||||
- from: Users
|
||||
to: myapp/myapp/Ingress/networking.k8s.io/v1
|
||||
xlabel: HTTPS
|
||||
color: "#00AB00"
|
||||
- from: myapp/myapp/Ingress/networking.k8s.io/v1
|
||||
to: EMEA.cert-manager.appcm.cert-manager
|
||||
- from: EMEA.cert-manager.appcm.cert-manager
|
||||
to: PKI
|
||||
xlabel: HTTPS
|
||||
color: "#00AB00"
|
||||
- from: myapp-db/myapp/postgresql/acid.zalan.do/v1
|
||||
to: EMEA.minio-tls.appminio.minio-tls
|
||||
xlabel: HTTPS
|
||||
color: "#00AB00"
|
||||
- from: myapp/myapp/Deployment/apps/v1
|
||||
to: myapp-db/myapp/postgresql/acid.zalan.do/v1
|
||||
generate_diagram_in_cluster: EMEA
|
||||
nodes:
|
||||
CiliumNetworkPolicy/cilium.io/v2:
|
||||
scope: Namespaced
|
||||
custom_icon: icons/cilium.png
|
||||
postgresql/acid.zalan.do/v1:
|
||||
scope: Namespaced
|
||||
diagram_node_classname: diagrams.onprem.database.Postgresql
|
||||
edges: |
|
||||
edges.add_edge_to(
|
||||
"spec",
|
||||
get_name(resource),
|
||||
get_namespace(resource),
|
||||
"ConfigMap",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# add edge from postgresql to MinIO ConfigMap
|
||||
edges.add_edge_to(
|
||||
"spec",
|
||||
"minio",
|
||||
get_namespace(resource),
|
||||
"ConfigMap",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
# add edge from postgresql to MinIO Secret
|
||||
edges.add_edge_to(
|
||||
"spec",
|
||||
"minio",
|
||||
get_namespace(resource),
|
||||
"Secret",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
Ingress/networking.k8s.io/v1:
|
||||
scope: Namespaced
|
||||
nodes: |
|
||||
for idx, tls in enumerate(query_path(resource, "spec.tls", [])):
|
||||
nodes.append({
|
||||
"kind": "Secret",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": tls.get("secretName"),
|
||||
"namespace": get_namespace(resource),
|
||||
"labels": {
|
||||
**query_path(resource, "metadata.labels", {})
|
||||
}
|
||||
}
|
||||
})
|
||||
edges: |
|
||||
edges.add_service("spec.defaultBackend.service.name")
|
||||
for ridx, rule in enumerate(query_path(resource, "spec.rules", [])):
|
||||
for pidx, path in enumerate(query_path(rule, "http.paths", [])):
|
||||
edges.add_service(f"spec.rules[{ridx}].http.paths[{pidx}].backend.service.name", name=query_path(path, "backend.service.name"))
|
||||
for idx, tls in enumerate(query_path(resource, "spec.tls", [])):
|
||||
edges.add_edge_to(
|
||||
f"spec.tls[{idx}]",
|
||||
tls.get("secretName"),
|
||||
get_namespace(resource),
|
||||
"Secret",
|
||||
"v1",
|
||||
"REFERENCE"
|
||||
)
|
||||
485
examples/custom-object-items/config/custom-object-items.yaml
Normal file
@@ -0,0 +1,485 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: mgmt
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp-mgmt
|
||||
namespace: myapp
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- pods/log
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- apps
|
||||
resourceNames:
|
||||
- myapp
|
||||
resources:
|
||||
- deployments
|
||||
verbs:
|
||||
- patch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: mgmt
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp-mgmt
|
||||
namespace: myapp
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: myapp-mgmt
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: default
|
||||
namespace: myapp
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
BUCKET: myapp
|
||||
ENDPOINT: https://minio-tls:9000
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: db
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: minio
|
||||
namespace: myapp
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
database: myapp
|
||||
hostname: myapp-db
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: db
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp-db
|
||||
namespace: myapp
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
ACCESS_KEY:
|
||||
SECRET_KEY:
|
||||
kind: Secret
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: db
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: minio
|
||||
namespace: myapp
|
||||
type: Opaque
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
io.cilium/lb-ipam-ips: 1.2.3.4
|
||||
labels:
|
||||
app.kubernetes.io/component: mgmt
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp-mgmt
|
||||
namespace: myapp
|
||||
spec:
|
||||
externalTrafficPolicy: Local
|
||||
ports:
|
||||
- name: ssh
|
||||
port: 22
|
||||
targetPort: 2222
|
||||
selector:
|
||||
app.kubernetes.io/component: mgmt
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
type: LoadBalancer
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: app
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp
|
||||
namespace: myapp
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8000
|
||||
targetPort: 8000
|
||||
selector:
|
||||
app.kubernetes.io/component: app
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
type: ClusterIP
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: app
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: logs
|
||||
namespace: myapp
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: app
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp
|
||||
namespace: myapp
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: app
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: app
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: DB_HOST
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: hostname
|
||||
name: myapp-db
|
||||
- name: DB_NAME
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: database
|
||||
name: myapp-db
|
||||
- name: DB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: username
|
||||
name: myapp.myapp-db.credentials.postgresql.acid.zalan.do
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: password
|
||||
name: myapp.myapp-db.credentials.postgresql.acid.zalan.do
|
||||
image: myapp
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
tcpSocket:
|
||||
port: 8000
|
||||
timeoutSeconds: 5
|
||||
name: myapp
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /health-check
|
||||
port: 8000
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: 1000m
|
||||
memory: 4Gi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
runAsGroup: 1001
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1001
|
||||
volumeMounts:
|
||||
- mountPath: /app/log
|
||||
name: logs
|
||||
- mountPath: /mnt/tmp
|
||||
name: tmp
|
||||
hostname: myapp
|
||||
securityContext:
|
||||
fsGroup: 1001
|
||||
volumes:
|
||||
- name: logs
|
||||
persistentVolumeClaim:
|
||||
claimName: logs
|
||||
- emptyDir:
|
||||
sizeLimit: 1Gi
|
||||
name: tmp
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: mgmt
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp-mgmt
|
||||
namespace: myapp
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: mgmt
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: mgmt
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
spec:
|
||||
containers:
|
||||
- image: myapp-mgmt
|
||||
name: myapp-mgmt
|
||||
ports:
|
||||
- containerPort: 2222
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 1000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
volumeMounts:
|
||||
- mountPath: /usr/bin/kubectl
|
||||
name: host-usr-bin
|
||||
subPath: kubectl
|
||||
- mountPath: /logs
|
||||
name: logs
|
||||
hostname: myapp-mgmt
|
||||
securityContext:
|
||||
fsGroup: 1001
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /usr/bin
|
||||
name: host-usr-bin
|
||||
- name: logs
|
||||
persistentVolumeClaim:
|
||||
claimName: logs
|
||||
---
|
||||
apiVersion: acid.zalan.do/v1
|
||||
kind: postgresql
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: db
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp-db
|
||||
namespace: myapp
|
||||
spec:
|
||||
databases:
|
||||
myapp: myapp
|
||||
env:
|
||||
- name: AWS_ENDPOINT
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: ENDPOINT
|
||||
name: minio
|
||||
- name: AWS_ACCESS_KEY_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: ACCESS_KEY
|
||||
name: minio
|
||||
- name: AWS_SECRET_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: SECRET_KEY
|
||||
name: minio
|
||||
- name: AWS_S3_FORCE_PATH_STYLE
|
||||
value: "true"
|
||||
- name: USE_WALG_RESTORE
|
||||
value: "true"
|
||||
- name: USE_WALG_BACKUP
|
||||
value: "true"
|
||||
- name: WAL_S3_BUCKET
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: BUCKET
|
||||
name: minio
|
||||
- name: WALG_S3_CA_CERT_FILE
|
||||
value: /certs/minio/ca.crt
|
||||
- name: WAL_BUCKET_SCOPE_PREFIX
|
||||
value: ""
|
||||
- name: WAL_BUCKET_SCOPE_SUFFIX
|
||||
value: ""
|
||||
- name: BACKUP_NUM_TO_RETAIN
|
||||
value: "30"
|
||||
numberOfInstances: 2
|
||||
postgresql:
|
||||
version: "17"
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 4096Mi
|
||||
requests:
|
||||
cpu: 1000m
|
||||
memory: 4096Mi
|
||||
teamId: myapp
|
||||
users:
|
||||
myapp:
|
||||
- superuser
|
||||
- createdb
|
||||
volume:
|
||||
size: 10Gi
|
||||
---
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: minio
|
||||
namespace: myapp
|
||||
spec:
|
||||
description: allow pods to connect to MinIO
|
||||
egress:
|
||||
- toEndpoints:
|
||||
- matchLabels:
|
||||
k8s:app.kubernetes.io/name: minio-tls
|
||||
k8s:io.kubernetes.pod.namespace: minio-tls
|
||||
toPorts:
|
||||
- ports:
|
||||
- port: "9000"
|
||||
protocol: TCP
|
||||
endpointSelector: {}
|
||||
---
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: namespace-internal
|
||||
namespace: myapp
|
||||
spec:
|
||||
description: allow namespace internal communication
|
||||
egress:
|
||||
- toEndpoints:
|
||||
- matchLabels: {}
|
||||
endpointSelector:
|
||||
matchLabels: {}
|
||||
ingress:
|
||||
- fromEndpoints:
|
||||
- matchLabels: {}
|
||||
---
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: app
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp
|
||||
namespace: myapp
|
||||
spec:
|
||||
description: allow myapp ingress and egress connections
|
||||
egress:
|
||||
- ...
|
||||
ingress:
|
||||
- ...
|
||||
---
|
||||
apiVersion: cilium.io/v2
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: mgmt
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp-mgmt
|
||||
namespace: myapp
|
||||
spec:
|
||||
description: allow ingress mgmt connections
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: mgmt
|
||||
ingress:
|
||||
- toPorts:
|
||||
- ports:
|
||||
- port: "2222"
|
||||
protocol: TCP
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: web
|
||||
app.kubernetes.io/instance: dev
|
||||
app.kubernetes.io/name: myapp
|
||||
name: myapp
|
||||
namespace: myapp
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: myapp.example.net
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: myapp
|
||||
port:
|
||||
name: http
|
||||
path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
- myapp.example.net
|
||||
secretName: myapp-tls
|
||||
BIN
examples/custom-object-items/diagrams/custom-object-items.png
Normal file
|
After Width: | Height: | Size: 277 KiB |
10
examples/custom-object-items/generate.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#! /bin/sh
|
||||
|
||||
BIN=../../bin
|
||||
|
||||
MANIFESTS=config/custom-object-items.yaml
|
||||
|
||||
# Generate diagrams with custom object items
|
||||
$BIN/kube-diagrams -n myapp $MANIFESTS -c config/custom-object-items.kd -o diagrams/custom-object-items.png -v
|
||||
#$BIN/kube-diagrams -n myapp $MANIFESTS -c config/custom-object-items.kd -o diagrams/custom-object-items.svg --embed-all-icons
|
||||
#$BIN/kube-diagrams -n myapp $MANIFESTS -c config/custom-object-items.kd -o diagrams/custom-object-items.dot_json --embed-all-icons
|
||||
BIN
examples/custom-object-items/icons/cilium.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
examples/custom-object-items/icons/minio.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
1
examples/deathstarbench/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
downloads/DeathStarBench/
|
||||
63
examples/deathstarbench/README.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# DeathStarBench Example
|
||||
|
||||
This example is dedicated to **[DeathStarBench](https://github.com/delimitrou/DeathStarBench)** example.
|
||||
|
||||
## Instructions
|
||||
|
||||
Generate the Kubernetes architecture diagrams for **[DeathStarBench](https://github.com/delimitrou/DeathStarBench)** example:
|
||||
|
||||
```sh
|
||||
$ generate.sh
|
||||
```
|
||||
|
||||
## Generated architecture diagrams
|
||||
|
||||
### Hotel Reservation Application
|
||||
|
||||
Architecture diagram for **[Hotel Reservation Helm Chart](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/helm-chart/hotelreservation)**:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for **[Hotel Reservation Knative manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/knative)**:
|
||||
|
||||

|
||||
|
||||
Customized architecture diagram for **[Hotel Reservation Knative manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/knative)**:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for **[Hotel Reservation Kubernetes manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/kubernetes)**:
|
||||
|
||||

|
||||
|
||||
Customized architecture diagram for **[Hotel Reservation Kubernetes manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/kubernetes)**:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for **[Hotel Reservation OpenShift manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/openshift)**:
|
||||
|
||||

|
||||
|
||||
Customized architecture diagram for **[Hotel Reservation OpenShift manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/openshift)**:
|
||||
|
||||

|
||||
|
||||
### Media Microservices Application
|
||||
|
||||
Architecture diagram for **[Media Microservices Helm Chart](https://github.com/delimitrou/DeathStarBench/tree/master/mediaMicroservices/helm-chart/mediamicroservices)**:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for **[Media Microservices OpenShift manifests](https://github.com/delimitrou/DeathStarBench/tree/master/mediaMicroservices/openshift)**:
|
||||
|
||||

|
||||
|
||||
### Social Network Application
|
||||
|
||||
Architecture diagram for **[Social Network Helm Chart](https://github.com/delimitrou/DeathStarBench/tree/master/socialNetwork/helm-chart/socialnetwork)**:
|
||||
|
||||

|
||||
|
||||
Architecture diagram for **[Social Network OpenShift manifests](https://github.com/delimitrou/DeathStarBench/tree/master/socialNetwork/openshift)**:
|
||||
|
||||

|
||||