diff --git a/README.md b/README.md index 08b3cf3..026ae46 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ All the examples are 1. [Some Helm charts](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/helm-charts/) 1. [LeaderWorkerSet API](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/lws/) 1. [helmfile](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/helmfile/) +1. [Istio](https://github.com/philippemerle/KubeDiagrams/blob/main/examples/istio/) ## Prerequisites diff --git a/examples/istio/README.md b/examples/istio/README.md new file mode 100644 index 0000000..04758b8 --- /dev/null +++ b/examples/istio/README.md @@ -0,0 +1,56 @@ +# Istio Example + +This example is dedicated to **[Istio](https://istio.io)**. + +## Instructions + +Generate the Kubernetes architecture diagrams for Istio Helm charts and helmfile: +```sh +$ ./generate.sh +``` + +## Generated architecture diagrams + +Architecture diagram for [Istio base Helm Chart](https://artifacthub.io/packages/helm/istio-official/base): + +![base.png](base.png) + +Architecture diagram for [Istiod Helm Chart](https://artifacthub.io/packages/helm/istio-official/istiod): + +![istiod.png](istiod.png) + +Architecture diagram for [Istio Gateway Helm Chart](https://artifacthub.io/packages/helm/istio-official/gateway): + +![gateway.png](gateway.png) + +Architecture diagram for [Istio CNI Helm Chart](https://artifacthub.io/packages/helm/istio-official/cni): + +![cni.png](cni.png) + +Architecture diagram for [Istio Ztunnel Helm Chart](https://artifacthub.io/packages/helm/istio-official/ztunnel): + +![ztunnel.png](ztunnel.png) + +Architecture diagram for [Istio Ambient Helm Chart](https://artifacthub.io/packages/helm/istio-official/ambient): + +![ambient.png](ambient.png) + +Architecture diagram for [Istiod Remote Helm Chart](https://artifacthub.io/packages/helm/istio-official/istiod-remote): + +![istiod-remote.png](istiod-remote.png) + +Architecture diagram for [istio-all.yaml helmfile](istio-all.yaml): + +![istio-all.png](istio-all.png) + +Architecture diagram for [istio-all.yaml helmfile](istio-all.yaml) with all namespaces: + +![istio-all-namespaces.png](istio-all-namespaces.png) + +Architecture diagram for [istio-all.yaml helmfile](istio-all.yaml) with focus on all Helm charts: + +![istio-all-helm-charts.png](istio-all-helm-charts.png) + +Architecture diagram for [istio-all.yaml helmfile](istio-all.yaml) with focus on all application clusters: + +![istio-all-applications.png](istio-all-applications.png) diff --git a/examples/istio/all-applications.kd b/examples/istio/all-applications.kd new file mode 100644 index 0000000..dc1303a --- /dev/null +++ b/examples/istio/all-applications.kd @@ -0,0 +1,12 @@ +clusters: + - label: app.kubernetes.io/instance + show: false # clusters hidden. + - label: release + show: false # clusters hidden. + - label: helm.sh/chart + show: false # clusters hidden. + - label: chart + show: false # clusters hidden. +nodes: + CustomResourceDefinition/apiextensions.k8s.io/v1: + show: false # CRD hidden. diff --git a/examples/istio/all-helm-charts.kd b/examples/istio/all-helm-charts.kd new file mode 100644 index 0000000..195dbb4 --- /dev/null +++ b/examples/istio/all-helm-charts.kd @@ -0,0 +1,5 @@ +clusters: + - label: app.kubernetes.io/instance + show: false # clusters hidden. + - label: release + show: false # clusters hidden. diff --git a/examples/istio/ambient.png b/examples/istio/ambient.png new file mode 100644 index 0000000..c790c3a Binary files /dev/null and b/examples/istio/ambient.png differ diff --git a/examples/istio/base.png b/examples/istio/base.png new file mode 100644 index 0000000..d6ab80c Binary files /dev/null and b/examples/istio/base.png differ diff --git a/examples/istio/cni.png b/examples/istio/cni.png new file mode 100644 index 0000000..68ddcdd Binary files /dev/null and b/examples/istio/cni.png differ diff --git a/examples/istio/gateway.png b/examples/istio/gateway.png new file mode 100644 index 0000000..b51b5d5 Binary files /dev/null and b/examples/istio/gateway.png differ diff --git a/examples/istio/generate.sh b/examples/istio/generate.sh new file mode 100755 index 0000000..cf98660 --- /dev/null +++ b/examples/istio/generate.sh @@ -0,0 +1,21 @@ +#! /bin/sh + +BIN=../../bin + +# Generate the Kubernetes architecture diagram for each Istio's Helm Chart. +for chart in \ + base \ + istiod \ + gateway \ + cni \ + ztunnel \ + ambient \ + istiod-remote +do + $BIN/helm-diagrams https://istio-release.storage.googleapis.com/charts/${chart} +done + +helmfile template -f istio-all.yaml | kube-diagrams - -o istio-all-namespaces.png +helmfile template -f istio-all.yaml | kube-diagrams - -o istio-all.png --without-namespace +helmfile template -f istio-all.yaml | kube-diagrams - -o istio-all-helm-charts.png --without-namespace --config all-helm-charts.kd +helmfile template -f istio-all.yaml | kube-diagrams - -o istio-all-applications.png --without-namespace --config all-applications.kd diff --git a/examples/istio/istio-all-applications.png b/examples/istio/istio-all-applications.png new file mode 100644 index 0000000..d55531f Binary files /dev/null and b/examples/istio/istio-all-applications.png differ diff --git a/examples/istio/istio-all-helm-charts.png b/examples/istio/istio-all-helm-charts.png new file mode 100644 index 0000000..930065f Binary files /dev/null and b/examples/istio/istio-all-helm-charts.png differ diff --git a/examples/istio/istio-all-namespaces.png b/examples/istio/istio-all-namespaces.png new file mode 100644 index 0000000..e6f1cda Binary files /dev/null and b/examples/istio/istio-all-namespaces.png differ diff --git a/examples/istio/istio-all.png b/examples/istio/istio-all.png new file mode 100644 index 0000000..0fef5ed Binary files /dev/null and b/examples/istio/istio-all.png differ diff --git a/examples/istio/istio-all.yaml b/examples/istio/istio-all.yaml new file mode 100644 index 0000000..d2735b8 --- /dev/null +++ b/examples/istio/istio-all.yaml @@ -0,0 +1,23 @@ +repositories: +- name: istio + url: https://istio-release.storage.googleapis.com/charts + +releases: +- name: istio-base + chart: istio/base + namespace: istio-system +- name: istiod + chart: istio/istiod + namespace: istio-system +- name: istio-ingressgateway + chart: istio/gateway + namespace: istio-ingressgateway +- name: istio-cni + chart: istio/cni + namespace: kube-system +- name: ztunnel + chart: istio/ztunnel +#- name: istiod-remote +# chart: istio/istiod-remote +# - name: ambient +# chart: istio/ambient diff --git a/examples/istio/istiod-remote.png b/examples/istio/istiod-remote.png new file mode 100644 index 0000000..d7125af Binary files /dev/null and b/examples/istio/istiod-remote.png differ diff --git a/examples/istio/istiod.png b/examples/istio/istiod.png new file mode 100644 index 0000000..ad490dd Binary files /dev/null and b/examples/istio/istiod.png differ diff --git a/examples/istio/ztunnel.png b/examples/istio/ztunnel.png new file mode 100644 index 0000000..694ff58 Binary files /dev/null and b/examples/istio/ztunnel.png differ