318 Commits
v0.2.0 ... main

Author SHA1 Message Date
Philippe Merle
b404f34f6f Add a post on X 2026-01-03 11:23:05 +01:00
Philippe Merle
5a118093b1 Add an article and a LinkedIn post 2025-12-28 20:24:35 +01:00
Philippe Merle
1a86c28b76 Add CNCF landscape badge 2025-12-22 15:46:36 +01:00
Philippe Merle
a5c4533f72 Add a post on Reddit 2025-12-21 09:27:02 +01:00
Philippe Merle
916e2ac6f3 Add a post on LinkedIn 2025-12-07 13:11:35 +01:00
Philippe Merle
b19134594f Add a post on X 2025-12-03 08:28:50 +01:00
Philippe Merle
6b0a629e78 Add a post on X 2025-11-08 10:22:02 +01:00
Philippe Merle
ba9facadcc Add a post on X 2025-11-05 12:56:43 +01:00
Philippe Merle
8a64794085 Add a LinkedIn post 2025-10-27 11:53:02 +01:00
Philippe Merle
37bb689197 Improve how SecretStore's AWS provider is managed 2025-10-24 16:02:18 +02:00
Philippe Merle
e71aa716f8 Add External Secrets Operator example as discussed in https://github.com/philippemerle/KubeDiagrams/issues/62 2025-10-24 14:20:53 +02:00
Philippe Merle
60a009d255 Reference a blog 2025-10-23 11:24:39 +02:00
Philippe Merle
8dd7dae669 Online KubeDiagrams Service is now accessible via HTTPS 2025-10-17 17:55:49 +02:00
Philippe Merle
569c46cc09 Reference Online KubeDiagrams Service 2025-10-17 17:21:11 +02:00
Philippe Merle
c66c3a67fd Add a presentation on the Inria site 2025-10-15 14:46:42 +02:00
Philippe Merle
764b66f280 Add a LinkedIn post about Online KubeDiagrams Service 2025-10-12 13:36:10 +02:00
Philippe Merle
b2f6acabee Add a post on X 2025-10-09 08:42:46 +02:00
Philippe Merle
000f9bc30a Add a post on LinkedIn 2025-10-07 21:31:34 +02:00
Philippe Merle
010210c07e Add a LinkedIn post 2025-09-28 10:32:05 +02:00
Philippe Merle
ea663a2ba4 Update VISSOFT reference 2025-09-20 10:14:25 +02:00
Philippe Merle
599b974c82 Add a LinkedIn post 2025-09-20 10:12:36 +02:00
Philippe Merle
cda4e6ced3 Reference custom object items example 2025-09-17 09:52:55 +02:00
Philippe Merle
52c2675623 Add VISSOFT 2025 paper 2025-09-17 09:45:24 +02:00
Philippe Merle
e9ab655a96 Merge pull request #58 from rnxmlu/custom-object-icons
extend functions to support custom object icons
2025-09-15 12:13:08 +02:00
Michael Lucka
59cb59d7d9 custom object icons example added 2025-09-15 11:38:12 +02:00
Michael Lucka
e4868de5c4 extend functions to suport custom object icons
- def create_custom_cluster:

  easy fix to allow icons on custom cluster definitions by using
  an additional "type" key/attribute that refers to a diagram class

  allowing custom icons seems a bit more tricky as it may require a
  refactoring of the icon function. maybe this can also be added to
  have a consistent behavior...?

- create_custom_node:

  custom nodes already support icons by specifying a diagram class
  via "type" key/attribute

  in addition, it is now possible to specify a custom icon using the
  new key/attribute "icon"
2025-09-12 11:37:40 +02:00
Philippe Merle
f3b087334c Fix url to slides 2025-09-08 04:17:53 +02:00
Philippe Merle
8ccab3d850 Add VISSOFT 2025 Talk 2025-09-08 04:13:03 +02:00
Philippe Merle
9f1db1b900 Add a LinkedIn post 2025-09-08 03:39:27 +02:00
Philippe Merle
75c8d11579 Add announce on Reddit 2025-09-04 12:56:35 +02:00
Philippe Merle
7b510372b5 Update release.yml 2025-09-04 12:04:28 +02:00
Philippe Merle
a15ab25f3b Update tmp.yml 2025-09-04 12:01:41 +02:00
Philippe Merle
d91f8fee4e Add example for issue https://github.com/philippemerle/KubeDiagrams/issues/55 2025-09-03 23:33:59 +02:00
Philippe Merle
05f5d0db68 Update links to KubeDiagrams configurations 2025-08-31 16:33:27 +02:00
Philippe Merle
e26b86ae07 Update version for next PyPI release 2025-08-31 16:01:17 +02:00
Philippe Merle
2c37579a81 Add an example related to https://github.com/philippemerle/KubeDiagrams/issues/30 2025-08-25 15:32:23 +03:00
Philippe Merle
c11695ee48 Document main KubeDiagrams original features 2025-08-22 14:28:30 +03:00
Philippe Merle
01e42a137c Regenerate diagrams 2025-08-20 19:16:01 +03:00
Philippe Merle
5027db2bd4 Complete edge tooltips in generated SVG and dot_json diagrams 2025-08-20 18:55:42 +03:00
Philippe Merle
a7c0106111 Add example related to https://github.com/philippemerle/KubeDiagrams/issues/53 2025-08-20 15:00:43 +03:00
Philippe Merle
2c5824559f Check hidden nodes before adding edges 2025-08-20 12:14:02 +03:00
github-actions[bot]
dfeb0f0491 chore: update example diagrams 2025-08-19 14:28:54 +00:00
Philippe Merle
ef7708ef73 Regenerate diagrams 2025-08-19 17:27:08 +03:00
Philippe Merle
99f725c314 Avoid overlapping node names in diagrams as pointing out in (https://github.com/philippemerle/KubeDiagrams/issues/53) 2025-08-19 17:26:09 +03:00
Philippe Merle
9c98493162 Add a GitHub Trending badge 2025-08-19 13:36:19 +03:00
Philippe Merle
4f994008d9 Add a post on X 2025-08-16 21:32:42 +03:00
Philippe Merle
cd413e4347 [examples/kube-prometheus-stack] Add two hidden edges 2025-08-15 14:59:05 +03:00
Philippe Merle
fe8ea4e472 Add Bank of Anthos example 2025-08-14 22:10:53 +03:00
Philippe Merle
846ed30c5f Add OpenTelemetry Demo example 2025-08-14 16:33:26 +03:00
Philippe Merle
93c7915f89 [examples/inside-workloads] Generate .svg diagrams 2025-08-13 14:55:04 +03:00
Philippe Merle
d164bc00d6 [examples/inside-workloads] Improve edge tooltips 2025-08-13 14:54:12 +03:00
Philippe Merle
2b79d60d66 Document how to use inside-workloads.kdc 2025-08-13 11:52:56 +03:00
Philippe Merle
8b6368204a [examples/inside-workloads] Add support for StatefulSet workloads 2025-08-13 11:31:14 +03:00
Philippe Merle
f8d84a588c Generate edge tooltips 2025-08-13 10:01:55 +03:00
Philippe Merle
07741b16cf Add new inside-workloads example to show the internal structure of workloads, i.e., their pods, volumes, containers, mounted volumes, referenced config maps and secrets, as discussed in https://github.com/philippemerle/KubeDiagrams/discussions/52 2025-08-13 02:09:23 +03:00
Philippe Merle
025984a1ea Add new inside-workloads example to show the internal structure of workloads, i.e., their pods, volumes, containers, mounted volumes, referenced config maps and secrets, as discussed in https://github.com/philippemerle/KubeDiagrams/discussions/52 2025-08-13 02:08:19 +03:00
Philippe Merle
dfc5202460 Add two LinkedIn posts 2025-08-12 23:04:13 +03:00
Philippe Merle
1d370ae5cc Add a Kube Today report 2025-08-12 19:28:01 +03:00
Philippe Merle
11f10fa1af Regenerate diagrams 2025-08-11 21:29:19 +03:00
Philippe Merle
e2dded6490 Simplify how cluster titles are managed 2025-08-11 21:28:51 +03:00
Philippe Merle
46f860db2d Add clusters for admin, edit, and view cluster role aggregations 2025-08-11 17:50:29 +03:00
Philippe Merle
d61b8cf4cb Add a real-word debugging use case 2025-08-11 15:56:05 +03:00
Philippe Merle
7f91680588 Add architecture diagram for Kube Prometheus Stack deployed on minikube 2025-08-11 13:31:36 +03:00
Philippe Merle
cf3b78d9b7 Move configuration of Prometheus custom resources to monitoring.coreos.com.kdc 2025-08-11 13:22:11 +03:00
Philippe Merle
320bec7022 Allow to set up several KubeDiagrams configuration files 2025-08-11 13:15:05 +03:00
Philippe Merle
68a04ebcc8 [examples/kube-prometheus-stack] Some improvements
* add Grafana Dashboard and Data Source clusters
* add custom edges from the Grafana test pod to the Grafana service, the Prometheus patch job to both validating and mutating webhook configurations
* report warnings when no resource matches Prometheus selectors
2025-08-11 11:46:08 +03:00
Philippe Merle
e354ca8080 Fix exceptions on Endpoints edges 2025-08-11 11:24:26 +03:00
github-actions[bot]
340adaeadb chore: update example diagrams 2025-08-08 10:40:38 +00:00
Philippe Merle
f29f3399b6 Regenerate diagrams 2025-08-08 13:39:01 +03:00
Philippe Merle
4b997c816a Add label-based clustering and change color for label-based clusters 2025-08-08 13:37:24 +03:00
Philippe Merle
706107f510 Regenerate diagrams 2025-08-07 12:11:58 +03:00
Philippe Merle
eca9c42c57 Merge branch 'main' of https://github.com/philippemerle/KubeDiagrams into main 2025-08-07 09:02:17 +03:00
Philippe Merle
2933e90736 Add links to two LinkedIn posts 2025-08-07 09:00:25 +03:00
Philippe Merle
0af1e54d85 Update tmp.yml 2025-08-07 08:46:11 +03:00
Philippe Merle
52df92bcc5 Create tmp.yml 2025-08-07 08:44:44 +03:00
Philippe Merle
829a4cc882 Update release.yml 2025-08-06 22:51:12 +03:00
Philippe Merle
7c5647bbbf Merge branch 'main' of https://github.com/philippemerle/KubeDiagrams into main 2025-08-06 13:44:28 +03:00
Philippe Merle
9dfcbf0da5 Prepare release 0.5.0 2025-08-06 13:44:14 +03:00
Philippe Merle
aed86a99d5 Create release.yml 2025-08-06 13:28:59 +03:00
Philippe Merle
b99d9ed186 Fix exceptions when a value has not the expected type 2025-08-05 19:28:02 +03:00
github-actions[bot]
f65d88a8d4 chore: update example diagrams 2025-08-05 11:42:03 +00:00
Philippe Merle
b2a8d46af5 Regenerate diagrams 2025-08-05 14:40:38 +03:00
Philippe Merle
2b9743fbb9 Change how services, network and PodDisruptionBudget policies are bound to either pods or workloads 2025-08-05 14:40:21 +03:00
Philippe Merle
50f2e968b8 Regenerate diagrams 2025-08-05 14:05:19 +03:00
Philippe Merle
303736730c Add support for spec.defaultBackend.service for Ingress resources 2025-08-05 13:47:14 +03:00
Philippe Merle
e5705cca3d Add cert-manager example 2025-08-04 11:43:41 +03:00
Philippe Merle
7ea19af36f Add get_metadata_annotation function 2025-08-04 11:42:29 +03:00
Philippe Merle
1e3f9f75e6 Pylint previous commits 2025-08-02 18:23:51 +03:00
Philippe Merle
18af9be2fc Update create_new_nodes to create new nodes recursively 2025-08-02 18:21:19 +03:00
Philippe Merle
133a1f1fb9 Add support for spec.tls.secretName fields in Ingress resources 2025-08-02 18:12:06 +03:00
Philippe Merle
2315fb73c8 Regenerate diagrams 2025-08-02 14:53:22 +03:00
Philippe Merle
45650d786b Don't generate a warning when serviceAccountName or priorityClassName or storageClassName is equals to an empty string 2025-08-02 14:52:55 +03:00
github-actions[bot]
ebfddb9393 chore: update example diagrams 2025-08-02 10:42:00 +00:00
Philippe Merle
be6efbb5f0 Regenerate diagrams 2025-08-02 13:40:36 +03:00
Philippe Merle
2b75cf49f8 Add support for rules.resourceNames fields in Role and ClusterRole resources 2025-08-02 13:39:32 +03:00
Philippe Merle
3f8dbb7c73 Fix typo: use lws_name instead of name 2025-08-02 13:37:16 +03:00
Philippe Merle
5c33bbcbe8 Generate more precise paths in messages outputed by add_containers_env_value_from_and_env_from() 2025-07-31 08:49:27 +03:00
Philippe Merle
9ebac0f2c7 Merge branch 'main' of https://github.com/philippemerle/KubeDiagrams into main 2025-07-30 13:12:18 +03:00
Philippe Merle
4a5a85696b Log << undefined but optional >> as info messages instead of warning messages as discussed in https://github.com/philippemerle/KubeDiagrams/issues/30 2025-07-30 13:12:00 +03:00
github-actions[bot]
f8e1777513 chore: update example diagrams 2025-07-30 09:24:24 +00:00
Philippe Merle
a69319d23a Regenerate diagrams 2025-07-30 12:23:17 +03:00
Philippe Merle
5294173477 Add support for PodSpec.initContainers and PodSpec.ephemeralContainers 2025-07-30 12:21:52 +03:00
Philippe Merle
78e318a292 Read any list of objects 2025-07-30 10:40:26 +03:00
Philippe Merle
f1bde71352 Fix typo 2025-07-30 10:39:08 +03:00
Philippe Merle
8f53e0de5e Color warning (in yellow) and error (in red) messages 2025-07-29 23:33:10 +03:00
Philippe Merle
e7674ebb6b Add support for ContainerSpec.valueFrom.configMapKeyRef.optional and ContainerSpec.envFrom 2025-07-29 20:50:28 +03:00
Philippe Merle
0c0839ab04 Fix an exception, container env must be a list 2025-07-26 17:56:59 +03:00
Philippe Merle
d29cc160d5 Add a X post 2025-07-26 13:16:46 +03:00
Philippe Merle
666723658e Document helm-diagrams flags, as issued in https://github.com/philippemerle/KubeDiagrams/issues/50 2025-07-19 22:25:30 +02:00
Philippe Merle
f4d79d33cb Add a LinkedIn post 2025-07-19 21:06:15 +02:00
Philippe Merle
881e139427 Update docker-image.yml 2025-07-19 15:57:26 +02:00
Philippe Merle
2da5f372a4 Update docker-image.yml 2025-07-19 15:54:47 +02:00
Philippe Merle
32eb90bc27 Update docker-image.yml to run the workflow when Dockerfile is modified 2025-07-19 15:27:33 +02:00
Philippe Merle
d709f3abda Merge pull request #49 from glikson/patch-1
Dockerfile: add bash
2025-07-19 14:52:09 +02:00
Alex Glikson
f9851f0599 Dockerfile: add bash
Fixes #48
2025-07-19 15:46:02 +03:00
Philippe Merle
9a41cc1d8e Fix a dot parsing limit 2025-07-18 16:09:04 +02:00
Philippe Merle
64e32c0ff2 Fix a KeyError exception 2025-07-18 15:47:34 +02:00
Philippe Merle
b09f1f5e00 Fix an infinite recursion issue 2025-07-18 15:42:33 +02:00
Philippe Merle
1fdb51810c Add two social network posts 2025-07-17 15:09:02 +02:00
Philippe Merle
cf649626ee Remove UNDEFINED edge type 2025-07-17 01:31:29 +02:00
Philippe Merle
f46f3cd242 Add support for DaemonSet/extensions/v1beta1, Ingress/extensions/v1beta1, and PodSecurityPolicy/extensions/v1beta1 2025-07-17 01:26:11 +02:00
Philippe Merle
1f6bce87ad Add two social network posts 2025-07-16 23:35:59 +02:00
Philippe Merle
a7c3d4bce7 Add a post on X 2025-07-16 13:10:37 +02:00
Philippe Merle
c5212561af Add a social network post 2025-07-14 21:54:21 +02:00
Philippe Merle
610cdc8953 Add --namespace option to kube-diagrams as requested by https://github.com/philippemerle/KubeDiagrams/issues/44 2025-07-03 14:59:37 +02:00
Philippe Merle
779711569f Add an Instagram post 2025-07-03 11:14:31 +02:00
Philippe Merle
785883dfc7 Add a post on X 2025-06-30 07:30:08 +02:00
Philippe Merle
82384f7a17 Add list of custom resources supported in examples 2025-06-29 14:28:09 +02:00
Philippe Merle
a2554e7234 Add background color and recommended for clustering labels and annotations 2025-06-26 07:53:26 +02:00
Philippe Merle
19eb1a7f8f Move GitHub Action in Usage section 2025-06-26 07:25:48 +02:00
Philippe Merle
ce5ab24449 Improve Getting Started documentation 2025-06-26 05:40:21 +02:00
Philippe Merle
a162ee61cb Add Socket Badge 2025-06-25 13:28:27 +02:00
Philippe Merle
6f033c5d8c Add a social network link 2025-06-24 05:19:21 +02:00
Philippe Merle
b7b24afd06 Add --embed-all-icons flag to kube-diagrams, helm-diagrams, and kubectl-diagrams in order to embed all icons in generated svg or dot_json diagrams as requested in https://github.com/philippemerle/KubeDiagrams/issues/38 2025-06-24 03:39:49 +02:00
Philippe Merle
c80abe21a4 Add a referencing site 2025-06-23 20:49:18 +02:00
Philippe Merle
2ccb3738cc Add DeathStarBench example 2025-06-23 06:50:03 +02:00
Philippe Merle
a4eee518ef Add TeaStore example 2025-06-22 04:23:19 +02:00
Philippe Merle
956ba255b1 Add support for Deployment/extensions/v1beta1 2025-06-21 17:39:50 +02:00
Philippe Merle
369b11c95f Reorganize list of example 2025-06-21 12:40:09 +02:00
Philippe Merle
2d9b240a99 Add 2 links 2025-06-21 09:16:21 +02:00
Philippe Merle
e8b3f0e3fd Merge branch 'main' of https://github.com/philippemerle/KubeDiagrams into main 2025-06-20 11:12:27 +02:00
Philippe Merle
35294f2857 Release 0.4.0 on PyPI 2025-06-20 11:11:25 +02:00
github-actions[bot]
59314dcb04 chore: update example diagrams 2025-06-20 03:00:08 +00:00
Philippe Merle
32239c8d17 Regenerate diagrams 2025-06-20 04:59:26 +02:00
Philippe Merle
31a8abe6f2 Add options to helm-diagrams script 2025-06-20 04:58:38 +02:00
Philippe Merle
151923ac56 Add -c and --config options 2025-06-20 04:49:40 +02:00
Philippe Merle
7d8690ff40 Add two links: one documentation usage and a blog 2025-06-19 04:30:24 +02:00
Philippe Merle
418abc901c Update image links 2025-06-18 22:55:11 +02:00
Philippe Merle
c711c9ced9 Add Online Boutique example 2025-06-18 06:42:39 +02:00
Philippe Merle
6a80b9c9f8 Add Online Boutique example 2025-06-18 06:42:17 +02:00
Philippe Merle
416f92ed6d Improve post-processing of both svg and dot_json generated files, related to https://github.com/philippemerle/KubeDiagrams/issues/38 2025-06-17 18:37:00 +02:00
github-actions[bot]
926e2f3d76 chore: update example diagrams 2025-06-17 08:16:21 +00:00
Philippe Merle
5d876a32ff Replace absolute paths by urls in generated svg and dot_json files, related to https://github.com/philippemerle/KubeDiagrams/issues/38 2025-06-17 10:15:55 +02:00
github-actions[bot]
8024cd7251 chore: update example diagrams 2025-06-16 23:15:06 +00:00
Philippe Merle
7a060a7e05 Regenerate diagrams 2025-06-17 01:13:13 +02:00
Philippe Merle
a6a8cb8809 Add StatefulSet metadata labels to its PersistentVolumeClaim children 2025-06-17 01:12:09 +02:00
Philippe Merle
5330e72da3 Regenerate diagrams 2025-06-17 00:39:13 +02:00
Philippe Merle
48b40d02ed Regenerate diagrams 2025-06-17 00:33:51 +02:00
Philippe Merle
60b383c932 Add a LinkedIn post 2025-06-17 00:24:26 +02:00
Philippe Merle
c2475e6c00 Add a Reddit post 2025-06-14 18:06:55 +02:00
Philippe Merle
0d270372f3 Fix typos 2025-06-14 16:41:57 +02:00
Philippe Merle
39cdc289c7 Fix image link 2025-06-14 16:35:11 +02:00
Philippe Merle
5e5760ff22 Document the KubeDiagrams Interactive Viewer 2025-06-14 16:29:49 +02:00
Philippe Merle
7bed0ebe32 Merge pull request #40 from AngelHely/main/interactive_viewer
KubeDiagrams Interactive Viewer
2025-06-14 15:31:16 +02:00
Hely
cbd96c87b9 interactive_viewer\ 2025-06-14 14:55:34 +02:00
Philippe Merle
e2e90b1c5c Fix typo on how to use the kubectl plugin, and add a LinkedIn post on the kubectl plugin 2025-06-14 04:30:57 +02:00
Philippe Merle
f76f7e21f1 Merge pull request #39 from mahyarmirrashed/main
feat: add script to convert into `kubectl` plugin
2025-06-14 03:53:59 +02:00
Mahyar Mirrashed
3fbb513560 fix: use correct subcommand name 2025-06-13 17:25:48 -05:00
Mahyar Mirrashed
6669cbfdef feat: add --version and --help options 2025-06-13 17:24:51 -05:00
Mahyar Mirrashed
5b89ab10a8 fix: incorporate philippe's feedback on including the namespace and specifying the resource to use 2025-06-13 17:23:34 -05:00
Mahyar Mirrashed
2df1476164 refactor: change name to kubectl-diagrams 2025-06-13 16:51:39 -05:00
Philippe Merle
aa7f6165a4 Regenerate diagrams 2025-06-13 09:08:02 +02:00
Philippe Merle
524f4b1ef5 Deal with more event sources and sensors 2025-06-13 08:57:12 +02:00
Mahyar Mirrashed
4fae752f4a docs: add nix install instructions for main package itself 2025-06-12 21:31:08 -05:00
Mahyar Mirrashed
8fc5d0a204 docs: add instructions on how to install kubectl plugin 2025-06-12 21:30:51 -05:00
Mahyar Mirrashed
c16a48f660 style: format readme 2025-06-12 21:29:24 -05:00
Mahyar Mirrashed
d87549a44b feat: add separate package output for the kubectl graph plugin 2025-06-12 21:00:22 -05:00
Mahyar Mirrashed
657c22d66f feat: add plugin to dev shell 2025-06-12 20:45:31 -05:00
Mahyar Mirrashed
9a11317189 feat: add script to install kube-diagrams as a kubectl plugin 2025-06-12 20:45:17 -05:00
Mahyar Mirrashed
53ec9322a7 style(nix): format nix flake 2025-06-12 20:36:30 -05:00
Philippe Merle
bdb21e5b67 Update downloaded files and regenerate diagrams 2025-06-12 08:06:42 +02:00
Philippe Merle
ad89347ec7 Move from GPL-3.0-only to Apache-2.0 2025-06-12 02:46:19 +02:00
Philippe Merle
99fef3aa21 Add Real-World Use Cases 2025-06-12 02:22:43 +02:00
Philippe Merle
ced206e5df Add 3 posts on LinkedIn 2025-06-11 04:15:25 +02:00
Philippe Merle
e2bc4cfb31 Add a post on X 2025-06-09 16:41:46 +02:00
Philippe Merle
fcf5ada8b3 Add Argo Events examples 2025-06-09 16:22:45 +02:00
Philippe Merle
98bd69e7ef Merge branch 'main' of https://github.com/philippemerle/KubeDiagrams into main 2025-06-09 16:22:08 +02:00
Philippe Merle
cbd3796130 Add Argo Events examples 2025-06-09 16:22:05 +02:00
Philippe Merle
c8e84f993c Check that resources are not redefined multiple times 2025-06-09 16:17:24 +02:00
github-actions[bot]
066c79e5a9 chore: update example diagrams 2025-06-08 15:42:11 +00:00
Philippe Merle
5f710e08cb Regenerate diagrams 2025-06-08 17:41:24 +02:00
Philippe Merle
91bd7df188 Fix an exception when path is none 2025-06-08 17:40:38 +02:00
Philippe Merle
f1759f08ce Add Argo example including Argo Workflows, Argo CD, Argo Rollouts, and Argo Events 2025-06-08 17:14:26 +02:00
Philippe Merle
73c3d1e10d Use metadata.generateName when metadata.name unset, improve generated tooltips with more information, and fix annotation-based cluster management 2025-06-08 17:12:21 +02:00
Philippe Merle
b1017ad8a3 Add a post on X 2025-06-06 10:47:56 +02:00
Philippe Merle
ee4a848bcd Add a Reddit post 2025-06-06 01:40:48 +02:00
Philippe Merle
bd28ccd242 Move from GPL-3.0 to Apache License 2.0
Move from GPL-3.0 to Apache License 2.0, the preferred licence in the CNCF/Kubernetes community, as discussed in https://github.com/philippemerle/KubeDiagrams/discussions/37
2025-06-05 04:00:16 +02:00
Philippe Merle
9470c05699 Update LICENSE
Move from GPL-3.0 to Apache License 2.0, the preferred licence in the CNCF/Kubernetes community, as discussed in https://github.com/philippemerle/KubeDiagrams/discussions/37
2025-06-05 03:57:25 +02:00
github-actions[bot]
75dfacdda5 chore: update example diagrams 2025-06-04 16:50:59 +00:00
Philippe Merle
fb9944602b Regenerate diagrams 2025-06-04 18:50:23 +02:00
Philippe Merle
b91ae5abed Added a new diagram with some labels added 2025-06-04 09:54:57 +02:00
Philippe Merle
5548ad73d2 Add link to Awesome Cloud Native repo 2025-06-04 08:50:54 +02:00
Philippe Merle
90259e849a Add Gradiant 5G Charts example 2025-06-04 08:25:23 +02:00
Philippe Merle
b086631509 Add annotation-based clusters, especially for helm.sh/hook annotation 2025-06-03 19:13:35 +02:00
Philippe Merle
a032fc4a57 Add one unsupported Kubernetes resource type, i.e. SelfSubjectReview 2025-06-01 20:15:37 +02:00
Philippe Merle
541e24f3a0 Add references to a new blog and a new social network post 2025-06-01 16:22:52 +02:00
Philippe Merle
45372eb3cf Fix an anchor 2025-05-31 19:02:17 +02:00
Philippe Merle
7c86dc4986 Add Istio example 2025-05-31 13:25:34 +02:00
Philippe Merle
5b1b2d5d54 Merge branch 'main' of https://github.com/philippemerle/KubeDiagrams into main 2025-05-31 09:09:46 +02:00
Philippe Merle
3438367a49 Fix background color of K8s Application clusters 2025-05-31 09:09:22 +02:00
github-actions[bot]
7015af1a61 chore: update example diagrams 2025-05-31 04:33:50 +00:00
Philippe Merle
77bc260dcf Regenerate architecture diagrams: representation of namespaces changed and clusters' colors harmonised 2025-05-31 06:33:20 +02:00
github-actions[bot]
f4307db75f chore: update example diagrams 2025-05-30 22:49:00 +00:00
Philippe Merle
29d4da05c0 Regenerate architecture diagrams: representation of namespaces changed, and colors of clusters are harmonised 2025-05-31 00:48:31 +02:00
Philippe Merle
15873c171e Add links to 9 social network posts 2025-05-30 22:38:20 +02:00
github-actions[bot]
b3a74accd1 chore: update example diagrams 2025-05-30 04:10:24 +00:00
Philippe Merle
06754ae1f4 Add paper Visualizing Cloud-native Applications with KubeDiagrams 2025-05-30 06:10:00 +02:00
Philippe Merle
57b148642e Associate a defined color to each cluster 2025-05-29 00:45:10 +02:00
Philippe Merle
f7b9275eba Change how K8s Namespace are represented 2025-05-29 00:43:11 +02:00
Philippe Merle
799f36262a Enhance architecture figure 2025-05-28 23:45:30 +02:00
Philippe Merle
4fab485086 Add a dialy.dev post and issue stats 2025-05-16 00:17:11 +02:00
Philippe Merle
4131a0a946 Update KubeDiagrams Architecture figure: Add helmfile and output formats 2025-05-15 23:55:35 +02:00
Philippe Merle
79fd0bf211 Merge branch 'main' of https://github.com/philippemerle/KubeDiagrams into main 2025-05-15 15:37:57 +02:00
Philippe Merle
b24328b89e Improve helm-diagrams: set release name 2025-05-15 15:37:40 +02:00
github-actions[bot]
970d84bc0d chore: update example diagrams 2025-05-15 13:36:32 +00:00
Philippe Merle
cbe26ca0bb Regenerate diagrams 2025-05-15 15:36:10 +02:00
Philippe Merle
1962c4fb17 Add helmfile example 2025-05-15 15:31:25 +02:00
Philippe Merle
f6e0a4687c Add two referencing links 2025-05-12 09:56:51 +02:00
Philippe Merle
7a086300b4 Add images/semiotics.svg to illustrate tooltips generated for each cluster/node/edge 2025-05-03 14:42:56 +02:00
Philippe Merle
4811e81b34 Add new output formats: dot_json, gif, jp2, jpe, jpeg, tif, tiff 2025-05-03 12:48:28 +02:00
Philippe Merle
2ef8558aa7 Merge branch 'main' of https://github.com/philippemerle/KubeDiagrams into main 2025-05-02 14:51:48 +02:00
Philippe Merle
fa1017b13b Fix two runtime exceptions 2025-05-02 14:51:30 +02:00
Philippe Merle
44dd59dae1 Merge pull request #34 from mattfield/0.3.0-flake-updates
Flake updates for 0.3.0 and {aarch64-}darwin support
2025-05-01 13:02:14 +02:00
Matt Field
63794be9cb Flake updates for 0.3.0 and {aarch64-}darwin support 2025-05-01 11:34:04 +01:00
Philippe Merle
95d92598b3 Merge pull request #32 from adamab48/main
build : Add multiarch (arm) to docker image build
2025-04-30 12:56:31 +02:00
Adam ABICHOU
391273e4b0 cleanup 2025-04-30 06:56:43 +00:00
Adam ABICHOU
8cb6537239 test 2025-04-30 06:49:31 +00:00
Adam ABICHOU
ef7f4ed92f add multiarch 2025-04-30 06:47:08 +00:00
Philippe Merle
ff30a70b99 Add Reddit announce KubeDiagrams 0.3.0 is out! 2025-04-29 16:34:25 +02:00
github-actions[bot]
a498382041 chore: update example diagrams 2025-04-29 14:02:00 +00:00
Philippe Merle
3cf3b88705 Use latest container image 2025-04-29 16:01:43 +02:00
Philippe Merle
cc8c950747 Prepare release 0.3.0 2025-04-29 15:18:07 +02:00
Philippe Merle
03aa338985 Update to use philippemerle/KubeDiagrams@main action 2025-04-29 13:53:41 +02:00
Philippe Merle
b1423a335d Update instructions for using the GitHub action 2025-04-29 13:50:50 +02:00
Philippe Merle
687de73a34 Set action to use 2025-04-29 13:46:59 +02:00
Philippe Merle
037619d85a Remove usage of checkout action 2025-04-29 13:44:17 +02:00
Philippe Merle
f1b84869ff Add docker:// prefix 2025-04-29 13:40:29 +02:00
Philippe Merle
2bdfea9dc1 Fix a pylint error 2025-04-29 12:52:14 +02:00
Philippe Merle
e02119b055 Deactivate cluster for label app 2025-04-29 12:46:30 +02:00
Philippe Merle
836c7a7566 Add support to deactivite a cluster as discussed in https://github.com/philippemerle/KubeDiagrams/discussions/12 2025-04-29 12:44:33 +02:00
Philippe Merle
1eb60106ac Add architecture figure 2025-04-28 15:00:52 +02:00
Philippe Merle
0b07640b49 Fix typo in a url 2025-04-27 15:55:53 +02:00
Philippe Merle
daf0913071 Add LWS example related to issue https://github.com/philippemerle/KubeDiagrams/issues/29 2025-04-27 15:05:20 +02:00
Philippe Merle
340a900d5b Correct a typo 2025-04-22 07:00:21 +02:00
Philippe Merle
a71ed2d8c2 Merge branch 'main' of https://github.com/philippemerle/KubeDiagrams into main 2025-04-22 06:53:02 +02:00
Philippe Merle
237104596b Correct the table of edges 2025-04-22 06:52:47 +02:00
github-actions[bot]
f036870a48 chore: update example diagrams 2025-04-22 04:46:59 +00:00
Philippe Merle
b3d4a871c5 Document Kubernetes resource relationships 2025-04-22 06:46:24 +02:00
Philippe Merle
d089964bc7 Regenerate diagrams 2025-04-22 05:43:07 +02:00
Philippe Merle
877fac3659 Update semiotics diagram 2025-04-22 05:39:43 +02:00
Philippe Merle
e4645bd6a1 Correct incorrect log trace 2025-04-22 05:38:17 +02:00
Philippe Merle
d63e81cb43 Add a social network post 2025-04-21 10:53:46 +02:00
Philippe Merle
234d3b470b Merge branch 'main' of https://github.com/philippemerle/KubeDiagrams into main 2025-04-20 23:56:08 +02:00
Philippe Merle
d4c5c34a77 Initial commit for the semiotics diagrams 2025-04-20 23:55:40 +02:00
Philippe Merle
ad56c69451 Add tooltip to each custom cluster, node and edge 2025-04-20 23:47:59 +02:00
Philippe Merle
4fd73da41f Disable clear-text logging of sensitive information 2025-04-20 22:53:14 +02:00
Philippe Merle
0a7be456bd Add write content permission 2025-04-20 22:45:57 +02:00
Philippe Merle
aa741940ba Add read contents permission 2025-04-20 22:43:33 +02:00
Philippe Merle
031885c5bf Add contents read permission 2025-04-20 22:36:13 +02:00
Philippe Merle
9059d64ec4 Add contents read permission 2025-04-20 22:34:38 +02:00
Philippe Merle
40a97c862c Merge pull request #28 from mahyarmirrashed/build/add-workflow-for-updating-examples
build: add workflow for updating examples
2025-04-20 21:52:40 +02:00
Philippe Merle
a85022a0c4 Merge pull request #27 from mahyarmirrashed/chore/integrate-github-action
chore: integrate github action
2025-04-20 21:49:37 +02:00
github-actions[bot]
c93aa2f607 chore: update example diagrams 2025-04-20 17:54:15 +00:00
Mahyar Mirrashed
504a072137 chore: update commit author 2025-04-20 10:53:59 -07:00
Mahyar Mirrashed
80c34a5c4e chore: allow manually dispatching workflow 2025-04-20 10:49:19 -07:00
Mahyar Mirrashed
5818261c41 build: add action to update examples inside repository 2025-04-20 10:46:07 -07:00
Mahyar Mirrashed
f1f5e79433 docs: add information about using github action 2025-04-20 10:37:17 -07:00
Mahyar Mirrashed
ce5b1f8109 build: add action to test kube-diagrams action 2025-04-20 10:35:06 -07:00
Mahyar Mirrashed
0fba87443d chore: add github action 2025-04-20 10:34:50 -07:00
Philippe Merle
87b173a35c Improve some edge tooltips 2025-04-20 17:43:05 +02:00
Philippe Merle
8f663f0d2e Enable fixme warnings 2025-04-20 17:36:35 +02:00
Philippe Merle
5dd277346e Remove useless code 2025-04-20 16:53:16 +02:00
Philippe Merle
9e973b5427 Add a tooltip to each generated cluster, node and edge 2025-04-20 16:51:41 +02:00
Philippe Merle
6131c10b58 Merge pull request #26 from mahyarmirrashed/chore/update-flake-for-packaging
chore: update flake for packaging
2025-04-20 07:17:27 +02:00
Mahyar Mirrashed
a72c0874fa docs: update contributing instructions 2025-04-19 19:33:27 -05:00
Mahyar Mirrashed
da3c1bf5a2 chore: split package offerings into docker image and source itself
Can view via `nix flake show --all-systems`.
2025-04-19 19:30:20 -05:00
Mahyar Mirrashed
85f2bd4937 chore: update flake to match 2025-04-19 16:47:48 -07:00
Philippe Merle
8dd96ae33c Improve configurability of cluster title 2025-04-19 10:20:13 +02:00
Philippe Merle
1beb8136fb Add graphical attributes to configurable clusters 2025-04-19 09:55:24 +02:00
Philippe Merle
44a2961421 Change edge from HPA/VPA to workload 2025-04-19 08:38:40 +02:00
Philippe Merle
1f59fdf571 Improve some code related to management of edges 2025-04-19 08:27:38 +02:00
Philippe Merle
0fdf24a7da Merge pull request #24 from mahyarmirrashed/add-direnv-support
chore: add direnv support
2025-04-19 07:31:28 +02:00
Philippe Merle
cd5e1b0d43 Add a link on the Reddit post about custom declarative diagrams with KubeDiagrams 2025-04-17 11:25:29 +02:00
Philippe Merle
0ed7c4fc88 Add 2 links 2025-04-15 10:58:21 +02:00
Philippe Merle
457a0056f0 Allow to hide nodes as discussed in https://github.com/philippemerle/KubeDiagrams/discussions/23 2025-04-14 23:41:30 +02:00
Mahyar Mirrashed
8a6a055ef9 revert: "style: format markdown files"
This reverts commit e3fb7d4c5d.
2025-04-13 22:09:10 -07:00
Mahyar Mirrashed
e77f83ac7b revert: "docs: use shortform of links"
This reverts commit 5b15d7a714.
2025-04-13 22:09:06 -07:00
Mahyar Mirrashed
1b6b8962e1 revert: "docs: update numbers"
This reverts commit 257cbea1af.
2025-04-13 22:09:00 -07:00
Philippe Merle
82c24650ca Change the source of the edge labelled with 'calls' 2025-04-13 01:23:18 +02:00
Philippe Merle
5160393350 Add support for custom diagrams as discussed in https://github.com/philippemerle/KubeDiagrams/discussions/18 2025-04-13 01:01:19 +02:00
Philippe Merle
3b1a554bcd Number two items 2025-04-12 23:24:45 +02:00
Mahyar Mirrashed
257cbea1af docs: update numbers 2025-04-03 21:01:29 -07:00
Mahyar Mirrashed
5b15d7a714 docs: use shortform of links 2025-04-03 20:37:32 -07:00
Mahyar Mirrashed
8b71d7afde chore(nix): add graphviz and python3.9 deps
As specified in the README.md
2025-04-03 20:06:09 -07:00
Mahyar Mirrashed
e3fb7d4c5d style: format markdown files 2025-04-03 19:44:08 -07:00
Mahyar Mirrashed
684eeba20c chore: ignore direnv crud 2025-04-03 19:40:35 -07:00
Mahyar Mirrashed
8330536ea7 chore: add direnv support 2025-04-03 19:40:28 -07:00
Mahyar Mirrashed
83c68f145b chore(nix): add basic flake 2025-04-03 19:40:05 -07:00
Philippe Merle
24b67d844e Add a link to an X post 2025-04-02 11:58:12 +02:00
Philippe Merle
71998702e4 Rearrange section What do they say about it? 2025-04-01 16:32:05 +02:00
Philippe Merle
289dadb094 Add a link to an amazing blog 2025-03-29 23:17:46 +01:00
Philippe Merle
7b14123a33 Add a link to a post 2025-03-27 09:15:27 +01:00
Philippe MERLE
d48f9a2a00 Add other examples for kube-diagrams command 2025-03-26 14:38:55 +01:00
Philippe Merle
40965906b0 Merge pull request #17 from rssnyder/feat/local-charts
Feat/local charts
2025-03-26 07:36:42 +01:00
Philippe Merle
aae7b2e643 Add a new link and replace actual cluster by actual default namespace 2025-03-26 00:05:09 +01:00
Riley Snyder
dc31ac9bbc update readme 2025-03-25 16:49:17 -05:00
Riley Snyder
beeca78fb6 feat: add ability to render local charts 2025-03-25 16:44:18 -05:00
Philippe Merle
8673f9913d Update for releasing PyPI package 0.2.0 2025-03-25 14:39:44 +01:00
367 changed files with 137233 additions and 1278 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

View File

@@ -5,27 +5,36 @@ on:
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: Login to Docker Hub
- 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: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
tags: philippemerle/kubediagrams:latest

View File

@@ -6,6 +6,10 @@ on:
- .pylintrc
- bin/kube-diagrams
- '**.py'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest

89
.github/workflows/release.yml vendored Normal file
View 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
View 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
View 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
View 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
View File

@@ -1,2 +1,5 @@
KubeDiagrams.egg-info/
dist/
# Direnv stuff
.direnv

View File

@@ -9,8 +9,7 @@
# --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=fixme,
invalid-name,
disable=invalid-name,
too-many-branches,
too-many-arguments,
too-many-positional-arguments,

View File

@@ -1 +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`.

View File

@@ -1,7 +1,7 @@
FROM docker.io/alpine/helm:3 AS helm
FROM docker.io/python:3.13-alpine AS base
RUN apk update && apk add graphviz
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

875
LICENSE
View File

@@ -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.

761
README.md
View File

@@ -1,7 +1,9 @@
# KubeDiagrams
[![CNCF Landscape](https://img.shields.io/badge/CNCF%20Landscape-5699C6)](https://landscape.cncf.io/?item=app-definition-and-development--application-definition-image-build--kubediagrams)
[![license](https://img.shields.io/github/license/philippemerle/KubeDiagrams)](https://github.com/philippemerle/KubeDiagrams/blob/main/LICENSE)
![python version](https://img.shields.io/badge/python-%3E%3D%203.9-blue?logo=python)
[![Socket Badge](https://socket.dev/api/badge/pypi/package/KubeDiagrams/0.4.0?artifact_id=tar-gz)](https://socket.dev/pypi/package/KubeDiagrams/overview/0.4.0/tar-gz)
[![pypi version](https://badge.fury.io/py/KubeDiagrams.svg)](https://badge.fury.io/py/KubeDiagrams)
[![PyPI Downloads](https://static.pepy.tech/badge/kubediagrams)](https://pepy.tech/projects/kubediagrams)
[![Docker Stars](https://img.shields.io/docker/stars/philippemerle/kubediagrams)](https://hub.docker.com/r/philippemerle/kubediagrams)
@@ -9,12 +11,32 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/philippemerle/kubediagrams)](https://hub.docker.com/r/philippemerle/kubediagrams)
![contributors](https://img.shields.io/github/contributors/philippemerle/KubeDiagrams)
<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>
![KubeDiagrams Logo](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/images/KubeDiagrams.png)
Generate Kubernetes architecture diagrams from Kubernetes manifest files, kustomization files, Helm charts, and actual cluster state.
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)**).
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.
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
@@ -50,32 +72,68 @@ Architecture diagram for a deployed **CronJob** instance:
Architecture diagram for **NetworkPolicy** resources: ![network_policies.png](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/miscellaneous/network_policies.png)
Architecture diagram for an **Argo CD** example:
![argoproj-argocd-example-apps-apps.png](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/argo/diagrams/argoproj-argocd-example-apps-apps.png)
Architecture diagram for an **Argo Events** example:
![argoproj-argo-events-examples.png](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/argo/diagrams/argoproj-argo-events-examples.png)
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. [open5gs-k8s](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/open5gs-k8s/)
1. [Towards5GS-helm](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/towards5gs-helm/)
1. [OpenAirInterface 5G Core Network](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/oai-5g-cn/)
1. [docker-open5gs](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/docker-open5gs/)
1. [Miscellaneous examples](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/miscellaneous/)
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/)
### 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
@@ -83,6 +141,46 @@ Following command installs **KubeDiagrams** and all its Python dependencies, i.e
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`.
@@ -102,37 +200,110 @@ 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:
```ssh
```sh
# generate a diagram from a manifest
kube-diagrams -o cassandra.png examples/cassandra/cassandra.yml
# generate a diagram from the actual cluster state
# 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.
`helm-diagrams` takes only one argument - the URL of the Helm chart - but requires that the `helm` command was installed.
```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
@@ -145,9 +316,18 @@ helm-diagrams oci://ghcr.io/argoproj/argo-helm/argo-cd
# 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 the actual cluster state
# 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
@@ -155,129 +335,462 @@ docker run -v "$(pwd)":/work philippemerle/kubediagrams helm-diagrams https://ch
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
**KubeDiagrams** supported the following 47 Kubernetes resource types:
| Kind | ApiGroup | Versions | Icon |
| :--------: | :-------: | :-------: | :-------: |
| `APIService` | `apiregistration.k8s.io` | `v1beta1` `v1` | ![APIService](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/apiservice.png) |
| `ClusterRole` | `rbac.authorization.k8s.io` | `v1beta1` `v1` | ![ClusterRole](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/c-role-128.png) |
| `ClusterRoleBinding` | `rbac.authorization.k8s.io` | `v1beta1` `v1` | ![ClusterRoleBinding](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/crb-128.png) |
| `ConfigMap` | | `v1` | ![ConfigMap](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/cm-128.png) |
| `CronJob` | `batch` | `v1beta1` `v1` | ![CronJob](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/cronjob-128.png) |
| `CSIDriver` | `storage.k8s.io` | `v1beta1` `v1` | ![CSIDriver](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/csidriver.png) |
| `CSINode` | `storage.k8s.io` | `v1` | ![CSINode](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/csinode.png) |
| `CSIStorageCapacity` | `storage.k8s.io` | `v1` | ![CSIStorageCapacity](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/csisc.png) |
| `CustomResourceDefinition` | `apiextensions.k8s.io` | `v1beta1` `v1` | ![CustomResourceDefinition](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/crd-128.png) |
| `DaemonSet` | `apps` | `v1beta2` `v1` | ![DaemonSet](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/ds-128.png) |
| `Deployment` | `apps` | `v1beta1` `v1beta2` `v1` | ![Deployment](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/deploy-128.png) |
| `Endpoints` | | `v1` | ![Endpoints](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/ep-128.png) |
| `EndpointSlice` | `discovery.k8s.io` | `v1` | ![EndpointSlice](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/eps.png) |
| `Group` | `rbac.authorization.k8s.io` | `v1` | ![Group](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/group-128.png) |
| `HorizontalPodAutoscaler` | `autoscaling` | `v1` `v2beta1` `v2beta2` `v2` | ![HorizontalPodAutoscaler](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/hpa-128.png) |
| `Ingress` | `networking.k8s.io` | `v1beta1` `v1` | ![Ingress](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/ing-128.png) |
| `IngressClass` | `networking.k8s.io` | `v1beta1` `v1` | ![IngressClass](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/ic.png) |
| `Job` | `batch` | `v1beta1` `v1` | ![Job](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/job-128.png) |
| `Lease` | `coordination.k8s.io` | `v1` | ![Lease](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/lease.png) |
| `LimitRange` | | `v1` | ![LimitRange](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/limits-128.png) |
| `MutatingWebhookConfiguration` | `admissionregistration.k8s.io` | `v1beta1` `v1` | ![MutatingWebhookConfiguration](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/mwc.png) |
| `Namespace` | | `v1` | ![Namespace](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/ns-128.png) |
| `NetworkAttachmentDefinition` | `k8s.cni.cncf.io` | `v1` | ![NetworkAttachmentDefinition](https://raw.githubusercontent.com/mingrammer/diagrams/refs/heads/master/resources/azure/network/network-interfaces.png) |
| `NetworkPolicy` | `networking.k8s.io` | `v1` | ![NetworkPolicy](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/netpol-128.png) |
| `Node` | | `v1` | ![Node](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/infrastructure_components/labeled/node-128.png) |
| `PersistentVolume` | | `v1` | ![PersistentVolume](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/pv-128.png) |
| `PersistentVolumeClaim` | | `v1` | ![PersistentVolumeClaim](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/pvc-128.png) |
| `Pod` | | `v1` | ![Pod](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/pod-128.png) |
| `PodDisruptionBudget` | `policy` | `v1beta1` `v1` | ![PodDisruptionBudget](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/pdb.png) |
| `PodSecurityPolicy` | `policy` | `v1beta1` `v1` | ![PodSecurityPolicy](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/psp-128.png) |
| `PodTemplate` | | `v1` | ![PodTemplate](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/podtemplate.png) |
| `PriorityClass` | `scheduling.k8s.io` | `v1beta1` `v1` | ![PriorityClass](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/pc.png) |
| `ReplicaSet` | `apps` | `v1` | ![ReplicaSet](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/rs-128.png) |
| `ReplicationController` | | `v1` | ![ReplicationController](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/rc.png) |
| `ResourceQuota` | | `v1` | ![ResourceQuota](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/quota-128.png) |
| `Role` | `rbac.authorization.k8s.io` | `v1beta1` `v1` | ![Role](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/role-128.png) |
| `RoleBinding` | `rbac.authorization.k8s.io` | `v1beta1` `v1` | ![RoleBinding](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/rb-128.png) |
| `RuntimeClass` | `node.k8s.io` | `v1` | ![RuntimeClass](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/runtimeclass.png) |
| `Secret` | | `v1` | ![Secret](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/secret-128.png) |
| `Service` | | `v1` | ![Service](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/svc-128.png) |
| `ServiceAccount` | | `v1` | ![ServiceAccount](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/sa-128.png) |
| `StatefulSet` | `apps` | `v1beta1` `v1beta2` `v1` | ![StatefulSet](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/sts-128.png) |
| `StorageClass` | `storage.k8s.io` | `v1beta1` `v1` | ![StorageClass](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/sc-128.png) |
| `User` | `rbac.authorization.k8s.io` | `v1` | ![User](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/user-128.png) |
| `ValidatingWebhookConfiguration` | `admissionregistration.k8s.io` | `v1beta1` `v1` | ![ValidatingWebhookConfiguration](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/vwc.png) |
| `VerticalPodAutoscaler` | `autoscaling.k8s.io` | `v1` | ![VerticalPodAutoscaler](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/vpa.png) |
| `VolumeAttachment` | `storage.k8s.io` | `v1` | ![VolumeAttachment](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/vol-128.png) |
| Kind | ApiGroup | Versions | Icon |
| :------------------------------: | :----------------------------: | :---------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------: |
| `APIService` | `apiregistration.k8s.io` | `v1beta1` `v1` | ![APIService](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/apiservice.png) |
| `ClusterRole` | `rbac.authorization.k8s.io` | `v1beta1` `v1` | ![ClusterRole](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/c-role-128.png) |
| `ClusterRoleBinding` | `rbac.authorization.k8s.io` | `v1beta1` `v1` | ![ClusterRoleBinding](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/crb-128.png) |
| `ConfigMap` | | `v1` | ![ConfigMap](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/cm-128.png) |
| `CronJob` | `batch` | `v1beta1` `v1` | ![CronJob](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/cronjob-128.png) |
| `CSIDriver` | `storage.k8s.io` | `v1beta1` `v1` | ![CSIDriver](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/csidriver.png) |
| `CSINode` | `storage.k8s.io` | `v1` | ![CSINode](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/csinode.png) |
| `CSIStorageCapacity` | `storage.k8s.io` | `v1` | ![CSIStorageCapacity](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/csisc.png) |
| `CustomResourceDefinition` | `apiextensions.k8s.io` | `v1beta1` `v1` | ![CustomResourceDefinition](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/crd-128.png) |
| `DaemonSet` | `apps` `extensions` | `v1beta1` `v1beta2` `v1` | ![DaemonSet](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/ds-128.png) |
| `Deployment` | `apps` `extensions` | `v1beta1` `v1beta2` `v1` | ![Deployment](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/deploy-128.png) |
| `Endpoints` | | `v1` | ![Endpoints](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/ep-128.png) |
| `EndpointSlice` | `discovery.k8s.io` | `v1` | ![EndpointSlice](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/eps.png) |
| `Group` | `rbac.authorization.k8s.io` | `v1` | ![Group](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/group-128.png) |
| `HorizontalPodAutoscaler` | `autoscaling` | `v1` `v2beta1` `v2beta2` `v2` | ![HorizontalPodAutoscaler](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/hpa-128.png) |
| `Ingress` | `networking.k8s.io` `extensions` | `v1beta1` `v1` | ![Ingress](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/ing-128.png) |
| `IngressClass` | `networking.k8s.io` | `v1beta1` `v1` | ![IngressClass](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/ic.png) |
| `Job` | `batch` | `v1beta1` `v1` | ![Job](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/job-128.png) |
| `Lease` | `coordination.k8s.io` | `v1` | ![Lease](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/lease.png) |
| `LimitRange` | | `v1` | ![LimitRange](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/limits-128.png) |
| `MutatingWebhookConfiguration` | `admissionregistration.k8s.io` | `v1beta1` `v1` | ![MutatingWebhookConfiguration](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/mwc.png) |
| `Namespace` | | `v1` | ![Namespace](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/ns-128.png) |
| `NetworkAttachmentDefinition` | `k8s.cni.cncf.io` | `v1` | ![NetworkAttachmentDefinition](https://raw.githubusercontent.com/mingrammer/diagrams/refs/heads/master/resources/azure/network/network-interfaces.png) |
| `NetworkPolicy` | `networking.k8s.io` | `v1` | ![NetworkPolicy](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/netpol-128.png) |
| `Node` | | `v1` | ![Node](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/infrastructure_components/labeled/node-128.png) |
| `PersistentVolume` | | `v1` | ![PersistentVolume](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/pv-128.png) |
| `PersistentVolumeClaim` | | `v1` | ![PersistentVolumeClaim](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/pvc-128.png) |
| `Pod` | | `v1` | ![Pod](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/pod-128.png) |
| `PodDisruptionBudget` | `policy` | `v1beta1` `v1` | ![PodDisruptionBudget](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/pdb.png) |
| `PodSecurityPolicy` | `policy` `extensions` | `v1beta1` `v1` | ![PodSecurityPolicy](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/psp-128.png) |
| `PodTemplate` | | `v1` | ![PodTemplate](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/podtemplate.png) |
| `PriorityClass` | `scheduling.k8s.io` | `v1beta1` `v1` | ![PriorityClass](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/pc.png) |
| `ReplicaSet` | `apps` | `v1` | ![ReplicaSet](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/rs-128.png) |
| `ReplicationController` | | `v1` | ![ReplicationController](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/rc.png) |
| `ResourceQuota` | | `v1` | ![ResourceQuota](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/quota-128.png) |
| `Role` | `rbac.authorization.k8s.io` | `v1beta1` `v1` | ![Role](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/role-128.png) |
| `RoleBinding` | `rbac.authorization.k8s.io` | `v1beta1` `v1` | ![RoleBinding](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/rb-128.png) |
| `RuntimeClass` | `node.k8s.io` | `v1` | ![RuntimeClass](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/runtimeclass.png) |
| `Secret` | | `v1` | ![Secret](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/secret-128.png) |
| `Service` | | `v1` | ![Service](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/svc-128.png) |
| `ServiceAccount` | | `v1` | ![ServiceAccount](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/sa-128.png) |
| `StatefulSet` | `apps` | `v1beta1` `v1beta2` `v1` | ![StatefulSet](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/sts-128.png) |
| `StorageClass` | `storage.k8s.io` | `v1beta1` `v1` | ![StorageClass](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/sc-128.png) |
| `User` | `rbac.authorization.k8s.io` | `v1` | ![User](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/user-128.png) |
| `ValidatingWebhookConfiguration` | `admissionregistration.k8s.io` | `v1beta1` `v1` | ![ValidatingWebhookConfiguration](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/vwc.png) |
| `VerticalPodAutoscaler` | `autoscaling.k8s.io` | `v1` | ![VerticalPodAutoscaler](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/bin/icons/vpa.png) |
| `VolumeAttachment` | `storage.k8s.io` | `v1` | ![VolumeAttachment](https://raw.githubusercontent.com/kubernetes/community/refs/heads/master/icons/png/resources/labeled/vol-128.png) |
**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#L61).
**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).
**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).
Currently, there are 16 unsupported Kubernetes resource types:
Currently, there are 15 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` |
| Kind | ApiGroup |
| :--------: | :-------: |
| `Binding` | |
| `ComponentStatus` | |
| `Event`| |
| `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` |
### 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` | ![Application](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/argo/icons/Application.png) |
| `EventBus` | `argoproj.io` | `v1alpha1` | ![EventBus](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/argo/icons/EventBus.png) |
| `EventSource` | `argoproj.io` | `v1alpha1` | ![EventSource](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/argo/icons/EventSource.png) |
| `Rollout` | `argoproj.io` | `v1alpha1` | ![Rollout](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/argo/icons/Rollout.png) |
| `Sensor` | `argoproj.io` | `v1alpha1` | ![Sensor](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/argo/icons/Sensor.png) |
| `Workflow` | `argoproj.io` | `v1alpha1` | ![Workflow](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/argo/icons/Workflow.png) |
| `Service` | `serving.knative.dev` | `v1` | ![Service](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/deathstarbench/icons/knative-service.png) |
| `Route` | `route.openshift.io` | `v1` | ![Route](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/deathstarbench/icons/openshift-route.png) |
| `Chart` | `helm.k0sproject.io` | `v1beta1` | ![Chart](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/k0s/icons/k0s-Chart.png) |
| `ControlNode` | `autopilot.k0sproject.io` | `v1beta2` | ![ControlNode](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/k0s/icons/k0s-ControlNode.png) |
| `EtcdMember` | `etcd.k0sproject.io` | `v1beta1` | ![EtcdMember](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/k0s/icons/k0s-EtcdMember.png) |
| `Plan` | `autopilot.k0sproject.io` | `v1beta2` | ![Plan](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/k0s/icons/k0s-Plan.png) |
| `UpdateConfig` | `autopilot.k0sproject.io` | `v1beta2` | ![UpdateConfig](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/k0s/icons/k0s-UpdateConfig.png) |
| `Alertmanager` | `monitoring.coreos.com` | `v1` | ![Alertmanager](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/kube-prometheus-stack/icons/Alertmanager.png) |
| `Prometheus` | `monitoring.coreos.com` | `v1` | ![Prometheus](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/kube-prometheus-stack/icons/Prometheus.png) |
| `PrometheusRule` | `monitoring.coreos.com` | `v1` | ![PrometheusRule](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/kube-prometheus-stack/icons/PrometheusRule.png) |
| `ServiceMonitor` | `monitoring.coreos.com` | `v1` | ![ServiceMonitor](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/kube-prometheus-stack/icons/ServiceMonitor.png) |
| `LeaderWorkerSet` | `leaderworkerset.x-k8s.io` | `v1` | ![LeaderWorkerSet](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/lws/icons/lws.png) |
| `Certificate` | `cert-manager.io` | `v1alpha1` `v1alpha2` `v1` | ![Certificate](https://raw.githubusercontent.com/mingrammer/diagrams/refs/heads/master/resources/azure/web/app-service-certificates.png) |
| `ClusterIssuer` | `cert-manager.io` | `v1alpha1` `v1alpha2` `v1` | ![ClusterIssuer](https://raw.githubusercontent.com/mingrammer/diagrams/refs/heads/master/resources/aws/security/certificate-authority.png) |
| `Issuer` | `cert-manager.io` | `v1alpha1` `v1alpha2` `v1` | ![Issuer](https://raw.githubusercontent.com/mingrammer/diagrams/refs/heads/master/resources/aws/security/certificate-authority.png) |
| `ExternalSecret` | `external-secrets.io` | `v1alpha1` `v1beta1` `v1` | ![ExternalSecret](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/external-secrets/icons/ExternalSecret.png) |
| `SecretStore` | `external-secrets.io` | `v1alpha1` `v1beta1` `v1` | ![SecretStore](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/external-secrets/icons/SecretStore.png) |
### 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#L33) 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` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-E5F5FD) | Yes |
| `release` | Release: `label value` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-E5F5FD) | No |
| `helm.sh/chart` | Helm Chart: `label value` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-EBF3E7) | Yes |
| `chart` | Chart: `label value` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-EBF3E7) | No |
| `app.kubernetes.io/name` | K8s Application: `label value` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-ECE8F6) | Yes |
| `app` | Application: `label value` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-ECE8F6) | No |
| `tier` | Tier: `label value` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-ECE8F6) | No |
| `app.kubernetes.io/component` | K8s Component: `label value` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-FDF7E3) | Yes |
| `component` | Component: `label value` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-FDF7E3) | No |
| `service` | Microservice: `label value` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-FDF7E3) | 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.
## Talks
| Annotation Key | Cluster Title | Background Color | Recommended |
| :------------: | :----------------: | :----------------: | :----------------: |
| `helm.sh/hook` | `annotation value` | ![Static Badge](https://img.shields.io/badge/%20%20%20%20%20%20%20%20%20%20-EBF3E7) | Yes |
* [Visualizing cloud-native applications with KubeDiagrams](https://mybox.inria.fr/f/61de0e6e5be94b7a941f/?dl=1), February 17, 2025
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**.
![semiotics.png](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/images/semiotics.png).
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:
[![Custom diagram](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/examples/wordpress/wordpress_deployed_in_aws_eks.png)](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](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/images/KubeDiagrams-Interactive-Viewer.png)
**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**.
![Architecture.png](https://raw.githubusercontent.com/philippemerle/KubeDiagrams/refs/heads/main/images/Architecture.png)
## 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**:
* [Announce on Reddit](https://www.reddit.com/r/kubernetes/comments/1ihjujy/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/)
* [Tool of the day](https://www.techopsexamples.com/p/understanding-kubernetes-etcd-locks)
* [Post on DevSecOps](https://tlgrm.ru/channels/@devsecops_weekly/1145)
* [GitHub mingrammer/diagrams](https://github.com/mingrammer/diagrams)
* [Kubetools - Curated List of Kubernetes Tools](https://github.com/collabnix/kubetools/)
* [Awesome Open Source K8s And Container Tools](https://github.com/vilaca/awesome-k8s-tools)
* [Discussion on Reddit](https://www.reddit.com/r/kubernetes/comments/1jabdoa/anyone_know_of_any_reposopen_source_tools_that/)
* [Post on LinkedIn](https://www.linkedin.com/posts/pepr-cloud_kubediagrams-activity-7307698605371379713-BqRp?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAAemi4BApQnQWOvw041B_9Tbc_ljWmw1-E)
### 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 Sejzers post](https://www.facebook.com/groups/860938820648880/posts/9900239206718751/) on Facebook, May 30, 2025.
1. [Donald Lutzs post](https://www.linkedin.com/posts/donald-lutz-5a9b0b2_github-philippemerlekubediagrams-generate-activity-7334206152311791617-DONS/) on LinkedIn, May 30, 2025.
1. [Dor Ben Dovs 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 Lindners post](https://www.linkedin.com/posts/lindnergreg_kubernetes-helm-activity-7310607746469429250-RXKX/) on LinkedIn, March, 2025.
1. [Vishnu Hari Dadhichs post](https://www.linkedin.com/posts/vishnuhd_kubernetes-devops-kubediagrams-activity-7310533734376579073-y11N/) on LinkedIn, March, 2025.
1. [Rino Rondans 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
[![Star History Chart](https://api.star-history.com/svg?repos=philippemerle/KubeDiagrams&type=Date)](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.
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fphilippemerle%2FKubeDiagrams.svg?type=large&issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Fphilippemerle%2FKubeDiagrams?ref=badge_large&issueType=license)

24
action.yml Normal file
View 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"

View File

@@ -1,34 +1,136 @@
#! /bin/sh
#!/bin/bash
# $1 contains the 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>'
# 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 helm is installed
if ! command -v helm &>/dev/null; then
echo "Error: helm is not installed. Please install it first."
exit 1
fi
# 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
}
# Initialize variables
HELM_CHART_URL=""
HELM_ARGS=()
KUBE_DIAGRAMS_ARGS=("-" "--without-namespace") # Default to stdin indicator
# Use the KubeDiagrams custom configuration if exist.
KD_CC="KubeDiagrams.yaml"
if [ -e $KD_CC ]
then
KD_OPTS="-c $KD_CC"
else
KD_OPTS=""
KUBE_DIAGRAMS_ARGS+=("--config" "$KD_CC")
fi
echo Download $1...
# 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
if [[ ${repository} == oci* ]]
then
# 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.
helm template ${chart} $1 2> /dev/null | kube-diagrams $KD_OPTS --without-namespace -o $chart -
else
# 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
# Process the chart and generate the architecture diagram.
helm template $chart $rid/$chart | kube-diagrams $KD_OPTS --without-namespace -o $chart -
# 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -24,58 +24,110 @@ edges:
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
@@ -95,13 +147,20 @@ nodes:
edges.add_owned_resources()
edges.add_service_account("spec.jobTemplate.spec.template.spec")
edges.add_all_volume_resources("spec.jobTemplate.spec.template.spec.volumes")
edges.add_containers_env_value_from("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")
runtimeClassName = query_path(resource, "spec.jobTemplate.spec.template.spec.runtimeClassName")
if runtimeClassName != None:
edges.append([f"{runtimeClassName}/RuntimeClass/node.k8s.io/v1", "REFERENCE"])
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
@@ -117,14 +176,28 @@ nodes:
scope: Cluster
custom_icon: $KD/icons/csinode.png
edges: |
for driver in query_path(resource, "spec.drivers", []):
edges.append([f"{driver['name']}/CSIDriver/storage.k8s.io/v1", "REFERENCE"])
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: |
storageClassName = query_path(resource, "storageClassName")
edges.append([f"{storageClassName}/StorageClass/storage.k8s.io/v1", "REFERENCE"])
edges.add_edge_to(
"storageClassName",
".",
None,
"StorageClass",
"storage.k8s.io/v1",
"REFERENCE"
)
DaemonSet/apps/v1:
scope: Namespaced
diagram_node_classname: diagrams.k8s.compute.DS
@@ -132,14 +205,22 @@ nodes:
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("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")
runtimeClassName = query_path(resource, "spec.template.spec.runtimeClassName")
if runtimeClassName != None:
edges.append([f"{runtimeClassName}/RuntimeClass/node.k8s.io/v1", "REFERENCE"])
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
@@ -147,46 +228,56 @@ nodes:
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("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")
runtimeClassName = query_path(resource, "spec.template.spec.runtimeClassName")
if runtimeClassName != None:
edges.append([f"{runtimeClassName}/RuntimeClass/node.k8s.io/v1", "REFERENCE"])
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.add_edge_to(
"endpoints.targetRef",
f"endpoints[{idx}].targetRef",
target["name"],
target["namespace"],
target["kind"],
"v1",
"REFERENCE"
"REFERENCE",
data=target
)
Group/rbac.authorization.k8s.io/v1:
scope: Cluster
@@ -208,15 +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
@@ -233,13 +338,20 @@ nodes:
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("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")
runtimeClassName = query_path(resource, "spec.template.spec.runtimeClassName")
if runtimeClassName != None:
edges.append([f"{runtimeClassName}/RuntimeClass/node.k8s.io/v1", "REFERENCE"])
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
@@ -269,7 +381,7 @@ nodes:
edges: |
edges.add_all_workload_resources(
"spec.podSelector.matchLabels",
{},
default_selector={},
edge_kind="SELECTOR-UP"
)
edges.add_ingress_and_egress_rules()
@@ -282,13 +394,35 @@ nodes:
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
@@ -300,18 +434,28 @@ nodes:
edges: |
edges.add_service_account("spec")
edges.add_all_volume_resources("spec.volumes")
edges.add_containers_env_value_from("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")
runtimeClassName = query_path(resource, "spec.runtimeClassName")
if runtimeClassName != None:
edges.append([f"{runtimeClassName}/RuntimeClass/node.k8s.io/v1", "REFERENCE"])
edges.add_edge_to(
"spec.runtimeClassName",
".",
None,
"RuntimeClass",
"node.k8s.io/v1",
"REFERENCE"
)
PodDisruptionBudget/policy/v1:
scope: Namespaced
custom_icon: $KD/icons/pdb.png
@@ -323,27 +467,39 @@ 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("template.spec.containers")
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")
nid = "%s/Node/v1" % (
query_path(resource, "template.spec.nodeName"),
edges.add_edge_to(
"template.spec.nodeName",
".",
None,
"Node",
"v1",
"REFERENCE"
)
if nid in resources:
edges.append([nid, "REFERENCE"])
edges.add_networks("template.metadata.annotations")
edges.add_priority_class("template.spec.priorityClassName")
runtimeClassName = query_path(resource, "template.spec.runtimeClassName")
if runtimeClassName != None:
edges.append([f"{runtimeClassName}/RuntimeClass/node.k8s.io/v1", "REFERENCE"])
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
@@ -351,13 +507,20 @@ nodes:
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("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")
runtimeClassName = query_path(resource, "spec.template.spec.runtimeClassName")
if runtimeClassName != None:
edges.append([f"{runtimeClassName}/RuntimeClass/node.k8s.io/v1", "REFERENCE"])
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
@@ -365,13 +528,20 @@ nodes:
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("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")
runtimeClassName = query_path(resource, "spec.template.spec.runtimeClassName")
if runtimeClassName != None:
edges.append([f"{runtimeClassName}/RuntimeClass/node.k8s.io/v1", "REFERENCE"])
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
@@ -379,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
@@ -416,20 +589,31 @@ 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_owned_resources()
edges.add_service_account("spec.template.spec")
edges.add_all_volume_resources("spec.template.spec.volumes")
edges.add_containers_env_value_from("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")
runtimeClassName = query_path(resource, "spec.template.spec.runtimeClassName")
if runtimeClassName != None:
edges.append([f"{runtimeClassName}/RuntimeClass/node.k8s.io/v1", "REFERENCE"])
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
@@ -438,9 +622,14 @@ nodes:
scope: Cluster
diagram_node_classname: diagrams.k8s.storage.SC
edges: |
pid = f"{resource['provisioner']}/CSIDriver/storage.k8s.io/v1"
if pid in resources:
edges.append([pid, "REFERENCE"])
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
@@ -461,11 +650,14 @@ nodes:
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

110
bin/kubectl-diagrams Executable file
View 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

Binary file not shown.

2
examples/argo/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
downloads/argocd-example-apps
downloads/argo-events

View 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
View 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):
![diagrams/argo-workflows.png](diagrams/argo-workflows.png)
Architecture diagram for [Argo Workflows Quick Start Minimal Manifest](https://github.com/argoproj/argo-workflows/blob/main/manifests/quick-start-minimal.yaml):
![diagrams/argoproj-argo-workflows-manifests-quick-start-minimal.png](diagrams/argoproj-argo-workflows-manifests-quick-start-minimal.png)
Architecture diagram for [Argo Workflows Hello World Example](https://raw.githubusercontent.com/argoproj/argo-workflows/main/examples/hello-world.yaml):
![diagrams/argoproj-argo-workflows-examples-hello-world.png](diagrams/argoproj-argo-workflows-examples-hello-world.png)
### [Argo CD](https://argoproj.github.io/cd/)
Architecture diagram for [Argo CD Helm Chart](https://artifacthub.io/packages/helm/argo/argo-cd):
![diagrams/argo-cd.png](diagrams/argo-cd.png)
Architecture diagram for [Argo CD Quick Start Install Manifest](https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml):
![diagrams/argo-cd-manifests-install.png](diagrams/argo-cd-manifests-install.png)
Architecture diagram for [Argo CD Quick Start Install Manifest](https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml) without namespace:
![diagrams/argo-cd-manifests-install-without-namespace.png](diagrams/argo-cd-manifests-install-without-namespace.png)
Architecture diagram for [Argo CD Quick Start Install Manifest where missed metadata labels were added](https://github.com/argoproj/argo-cd/pull/23313):
![diagrams/argo-cd-manifests-install-corrected.png](diagrams/argo-cd-manifests-install-corrected.png)
Architecture diagram for [Argo CD HA Install Manifest](https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/ha/install.yaml):
![diagrams/argo-cd-manifests-ha-install.png](diagrams/argo-cd-manifests-ha-install.png)
Architecture diagram for [Argo CD HA Install Manifest](https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/ha/install.yaml) without namespace:
![diagrams/argo-cd-manifests-install-without-namespace-corrected.png](diagrams/argo-cd-manifests-install-without-namespace-corrected.png)
Architecture diagram for [Argo CD Example Apps apps](https://github.com/argoproj/argocd-example-apps/tree/master/apps):
![diagrams/argoproj-argocd-example-apps-apps.png](diagrams/argoproj-argocd-example-apps-apps.png)
Architecture diagram for [Argo CD Example Apps pre-post-sync](https://github.com/argoproj/argocd-example-apps/tree/master/pre-post-sync):
![diagrams/argoproj-argocd-example-apps-pre-post-sync.png](diagrams/argoproj-argocd-example-apps-pre-post-sync.png)
Architecture diagram for [Argo CD Example Apps sync-waves](https://github.com/argoproj/argocd-example-apps/tree/master/sync-waves):
![diagrams/argoproj-argocd-example-apps-sync-waves.png](diagrams/argoproj-argocd-example-apps-sync-waves.png)
### [Argo Rollouts](https://argoproj.github.io/rollouts/)
Architecture diagram for [Argo Rollouts Helm Chart](https://artifacthub.io/packages/helm/argo/argo-rollouts):
![diagrams/argo-rollouts.png](diagrams/argo-rollouts.png)
Architecture diagram for [Argo CD Example Apps blue-green](https://github.com/argoproj/argocd-example-apps/tree/master/blue-green):
![diagrams/argoproj-argocd-example-apps-blue-green.png](diagrams/argoproj-argocd-example-apps-blue-green.png)
### [Argo Events](https://argoproj.github.io/events/)
Architecture diagram for [Argo Events Helm Chart](https://artifacthub.io/packages/helm/argo/argo-events):
![diagrams/argo-events.png](diagrams/argo-events.png)
Architecture diagram for [Argo Events Install Manifest](https://github.com/argoproj/argo-events/blob/master/manifests/install.yaml):
![diagrams/argoproj-argo-events-manifests-install.png](diagrams/argoproj-argo-events-manifests-install.png)
Architecture diagram for [Argo Events Examples](https://github.com/argoproj/argo-events/tree/master/examples):
![diagrams/argoproj-argo-events-examples.png](diagrams/argoproj-argo-events-examples.png)

File diff suppressed because it is too large Load Diff

1
examples/argo/argo-cd.kd Normal file
View File

@@ -0,0 +1 @@
default_namespace: argocd

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View 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

View File

@@ -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
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

1
examples/bank-of-anthos/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
bank-of-anthos

View 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)**:
![diagrams/bank-of-anthos.png](diagrams/bank-of-anthos.png)
Customized architecture diagram for **[Google Cloud Platform's Bank of Anthos manifests](https://github.com/GoogleCloudPlatform/bank-of-anthos/tree/main/kubernetes-manifests)**:
![diagrams/custom-diagram-1.png](diagrams/custom-diagram-1.png)
Another customized architecture diagram for **[Google Cloud Platform's Bank of Anthos manifests](https://github.com/GoogleCloudPlatform/bank-of-anthos/tree/main/kubernetes-manifests)**:
![diagrams/custom-diagram-2.png](diagrams/custom-diagram-2.png)

View File

@@ -0,0 +1,3 @@
clusters:
- label: app
show: false

View 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"

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

View 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 196 KiB

View 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:
![diagrams/cert-manager-helm-chart.png](diagrams/cert-manager-helm-chart.png)
Architecture diagram for **[cert-manager](https://cert-manager.io/)** Helm Chart including CRDs:
![diagrams/cert-manager-with-crds-helm-chart.png](diagrams/cert-manager-with-crds-helm-chart.png)
Architecture diagram for **[Rancher Helm Chart](https://artifacthub.io/packages/helm/rancher-stable/rancher)** using `cert-manager`:
![diagrams/rancher.png](diagrams/rancher.png)
Architecture diagram for **[FQDN Controller Helm Chart](https://artifacthub.io/packages/helm/fqdn-controller/fqdn-controller)** using `cert-manager`:
![diagrams/fqdn-controller.png](diagrams/fqdn-controller.png)
Architecture diagram for **[Mozilla securitywiki](manifests/mozilla-securitywiki.yaml)** using `cert-manager`:
![diagrams/mozilla-securitywiki.png](diagrams/mozilla-securitywiki.png)
Architecture diagram for **[ClusterIssuer resources](manifests/cluster-issuers.yaml)**:
![diagrams/cluster-issuers.png](diagrams/cluster-issuers.png)

View 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"
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

View 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

View 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

View 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

View 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"
)

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

1
examples/deathstarbench/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
downloads/DeathStarBench/

View 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)**:
![diagrams/hotelreservation-helm-chart.png](diagrams/hotelreservation-helm-chart.png)
Architecture diagram for **[Hotel Reservation Knative manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/knative)**:
![diagrams/hotelreservation-knative.png](diagrams/hotelreservation-knative.png)
Customized architecture diagram for **[Hotel Reservation Knative manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/knative)**:
![diagrams/hotelreservation-knative-custom-diagram.png](diagrams/hotelreservation-knative-custom-diagram.png)
Architecture diagram for **[Hotel Reservation Kubernetes manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/kubernetes)**:
![diagrams/hotelreservation-kubernetes.png](diagrams/hotelreservation-kubernetes.png)
Customized architecture diagram for **[Hotel Reservation Kubernetes manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/kubernetes)**:
![diagrams/hotelreservation-kubernetes-custom-diagram.png](diagrams/hotelreservation-kubernetes-custom-diagram.png)
Architecture diagram for **[Hotel Reservation OpenShift manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/openshift)**:
![diagrams/hotelreservation-openshift.png](diagrams/hotelreservation-openshift.png)
Customized architecture diagram for **[Hotel Reservation OpenShift manifests](https://github.com/delimitrou/DeathStarBench/tree/master/hotelReservation/openshift)**:
![diagrams/hotelreservation-openshift-custom-diagram.png](diagrams/hotelreservation-openshift-custom-diagram.png)
### Media Microservices Application
Architecture diagram for **[Media Microservices Helm Chart](https://github.com/delimitrou/DeathStarBench/tree/master/mediaMicroservices/helm-chart/mediamicroservices)**:
![diagrams/mediamicroservices-helm-chart.png](diagrams/mediamicroservices-helm-chart.png)
Architecture diagram for **[Media Microservices OpenShift manifests](https://github.com/delimitrou/DeathStarBench/tree/master/mediaMicroservices/openshift)**:
![diagrams/mediamicroservices-openshift.png](diagrams/mediamicroservices-openshift.png)
### Social Network Application
Architecture diagram for **[Social Network Helm Chart](https://github.com/delimitrou/DeathStarBench/tree/master/socialNetwork/helm-chart/socialnetwork)**:
![diagrams/socialnetwork-helm-chart.png](diagrams/socialnetwork-helm-chart.png)
Architecture diagram for **[Social Network OpenShift manifests](https://github.com/delimitrou/DeathStarBench/tree/master/socialNetwork/openshift)**:
![diagrams/socialnetwork-openshift.png](diagrams/socialnetwork-openshift.png)

View File

@@ -0,0 +1,3 @@
clusters:
- label: service
show: false # disable this clustering

View File

@@ -0,0 +1,81 @@
nodes:
Service/serving.knative.dev/v1:
scope: Namespaced
custom_icon: icons/knative-service.png
diagram:
edges:
- from: frontend/default/Deployment/apps/v1
to: srv-search/default/Service/serving.knative.dev/v1
color: brown
- from: srv-search/default/Service/serving.knative.dev/v1
to: srv-geo/default/Service/serving.knative.dev/v1
color: brown
- from: srv-geo/default/Service/serving.knative.dev/v1
to: mongodb-geo/default/Service/v1
color: brown
- from: srv-search/default/Service/serving.knative.dev/v1
to: srv-rate/default/Service/serving.knative.dev/v1
color: brown
- from: srv-rate/default/Service/serving.knative.dev/v1
to: mongodb-rate/default/Service/v1
color: brown
- from: srv-rate/default/Service/serving.knative.dev/v1
to: memcached-rate/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: srv-recommendation/default/Service/serving.knative.dev/v1
color: brown
- from: srv-recommendation/default/Service/serving.knative.dev/v1
to: mongodb-recommendation/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: srv-reservation/default/Service/serving.knative.dev/v1
color: brown
- from: srv-reservation/default/Service/serving.knative.dev/v1
to: mongodb-reservation/default/Service/v1
color: brown
- from: srv-reservation/default/Service/serving.knative.dev/v1
to: memcached-reserve/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: srv-user/default/Service/serving.knative.dev/v1
color: brown
- from: srv-user/default/Service/serving.knative.dev/v1
to: mongodb-user/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: srv-profile/default/Service/serving.knative.dev/v1
color: brown
- from: srv-profile/default/Service/serving.knative.dev/v1
to: mongodb-profile/default/Service/v1
color: brown
- from: srv-profile/default/Service/serving.knative.dev/v1
to: memcached-profile/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: consul/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: jaeger/default/Service/v1
color: brown
- from: user-pvc/default/PersistentVolumeClaim/v1
to: user-pv/PersistentVolume/v1
color: black
- from: user-pvc/default/PersistentVolumeClaim/v1
to: user-pv/PersistentVolume/v1
color: black
- from: reservation-pvc/default/PersistentVolumeClaim/v1
to: reservation-pv/PersistentVolume/v1
color: black
- from: recommendation-pvc/default/PersistentVolumeClaim/v1
to: recommendation-pv/PersistentVolume/v1
color: black
- from: rate-pvc/default/PersistentVolumeClaim/v1
to: rate-pv/PersistentVolume/v1
color: black
- from: profile-pvc/default/PersistentVolumeClaim/v1
to: profile-pv/PersistentVolume/v1
color: black
- from: geo-pvc/default/PersistentVolumeClaim/v1
to: geo-pv/PersistentVolume/v1
color: black

View File

@@ -0,0 +1,77 @@
diagram:
edges:
- from: frontend/default/Deployment/apps/v1
to: search/default/Service/v1
color: brown
- from: search/default/Deployment/apps/v1
to: geo/default/Service/v1
color: brown
- from: geo/default/Deployment/apps/v1
to: mongodb-geo/default/Service/v1
color: brown
- from: search/default/Deployment/apps/v1
to: rate/default/Service/v1
color: brown
- from: rate/default/Deployment/apps/v1
to: mongodb-rate/default/Service/v1
color: brown
- from: rate/default/Deployment/apps/v1
to: memcached-rate/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: recommendation/default/Service/v1
color: brown
- from: recommendation/default/Deployment/apps/v1
to: mongodb-recommendation/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: reservation/default/Service/v1
color: brown
- from: reservation/default/Deployment/apps/v1
to: mongodb-reservation/default/Service/v1
color: brown
- from: reservation/default/Deployment/apps/v1
to: memcached-reserve/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: user/default/Service/v1
color: brown
- from: user/default/Deployment/apps/v1
to: mongodb-user/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: profile/default/Service/v1
color: brown
- from: profile/default/Deployment/apps/v1
to: mongodb-profile/default/Service/v1
color: brown
- from: profile/default/Deployment/apps/v1
to: memcached-profile/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: consul/default/Service/v1
color: brown
- from: frontend/default/Deployment/apps/v1
to: jaeger/default/Service/v1
color: brown
- from: user-pvc/default/PersistentVolumeClaim/v1
to: user-pv/PersistentVolume/v1
color: black
- from: user-pvc/default/PersistentVolumeClaim/v1
to: user-pv/PersistentVolume/v1
color: black
- from: reservation-pvc/default/PersistentVolumeClaim/v1
to: reservation-pv/PersistentVolume/v1
color: black
- from: recommendation-pvc/default/PersistentVolumeClaim/v1
to: recommendation-pv/PersistentVolume/v1
color: black
- from: rate-pvc/default/PersistentVolumeClaim/v1
to: rate-pv/PersistentVolume/v1
color: black
- from: profile-pvc/default/PersistentVolumeClaim/v1
to: profile-pv/PersistentVolume/v1
color: black
- from: geo-pvc/default/PersistentVolumeClaim/v1
to: geo-pv/PersistentVolume/v1
color: black

View File

@@ -0,0 +1,84 @@
clusters:
- label: app
show: false # disable
- label: death-star-project
title: "Death Star Project: {}"
# Commented as too many labelling defects
# - label: app-name
# title: "Application: {}"
nodes:
Route/route.openshift.io/v1:
scope: Namespaced
custom_icon: icons/openshift-route.png
edges: |
# spec.to
edges.add_edge_to(
"spec.to.name",
".",
get_namespace(resource),
"Service",
"v1",
"REFERENCE"
)
diagram:
edges:
- from: frontend-route/default/Route/route.openshift.io/v1
to: frontend/hotel-res/Service/v1
color: black
- from: hr-client/hotel-res/Deployment/apps/v1
to: frontend/hotel-res/Service/v1
color: brown
- from: frontend/hotel-res/Deployment/apps/v1
to: search/hotel-res/Service/v1
color: brown
- from: search/hotel-res/Deployment/apps/v1
to: geo/hotel-res/Service/v1
color: brown
- from: geo/hotel-res/Deployment/apps/v1
to: mongodb-geo/hotel-res/Service/v1
color: brown
- from: search/hotel-res/Deployment/apps/v1
to: rate/hotel-res/Service/v1
color: brown
- from: rate/hotel-res/Deployment/apps/v1
to: mongodb-rate/hotel-res/Service/v1
color: brown
- from: rate/hotel-res/Deployment/apps/v1
to: memcached-rate/hotel-res/Service/v1
color: brown
- from: frontend/hotel-res/Deployment/apps/v1
to: recommendation/hotel-res/Service/v1
color: brown
- from: recommendation/hotel-res/Deployment/apps/v1
to: mongodb-recommendation/hotel-res/Service/v1
color: brown
- from: frontend/hotel-res/Deployment/apps/v1
to: reservation/hotel-res/Service/v1
color: brown
- from: reservation/hotel-res/Deployment/apps/v1
to: mongodb-reservation/hotel-res/Service/v1
color: brown
- from: reservation/hotel-res/Deployment/apps/v1
to: memcached-reserve/hotel-res/Service/v1
color: brown
- from: frontend/hotel-res/Deployment/apps/v1
to: user/hotel-res/Service/v1
color: brown
- from: user/hotel-res/Deployment/apps/v1
to: mongodb-user/hotel-res/Service/v1
color: brown
- from: frontend/hotel-res/Deployment/apps/v1
to: profile/hotel-res/Service/v1
color: brown
- from: profile/hotel-res/Deployment/apps/v1
to: mongodb-profile/hotel-res/Service/v1
color: brown
- from: profile/hotel-res/Deployment/apps/v1
to: memcached-profile/hotel-res/Service/v1
color: brown
- from: frontend/hotel-res/Deployment/apps/v1
to: consul/hotel-res/Service/v1
color: brown
- from: frontend/hotel-res/Deployment/apps/v1
to: jaeger/hotel-res/Service/v1
color: brown

View File

@@ -0,0 +1,4 @@
nodes:
Service/serving.knative.dev/v1:
scope: Namespaced
custom_icon: icons/knative-service.png

View File

@@ -0,0 +1,14 @@
nodes:
Route/route.openshift.io/v1:
scope: Namespaced
custom_icon: icons/openshift-route.png
edges: |
# spec.to
edges.add_edge_to(
"spec.to.name",
".",
get_namespace(resource),
"Service",
"v1",
"REFERENCE"
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Some files were not shown because too many files have changed in this diff Show More