From 21c16b62431dfcb8566da2158ecc5a2c229613a2 Mon Sep 17 00:00:00 2001 From: Netanel Bollag Date: Sun, 7 May 2023 13:52:03 +0300 Subject: [PATCH 1/2] Move telemetry to external file --- docs/quick-tutorials/k8s-istio-watcher.mdx | 23 ++++--------------- .../istio-telemetry-enablement.yaml | 18 +++++++++++++++ 2 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 static/code-examples/network-mapper/istio-telemetry-enablement.yaml diff --git a/docs/quick-tutorials/k8s-istio-watcher.mdx b/docs/quick-tutorials/k8s-istio-watcher.mdx index 01210a7e2..13ffa76c2 100644 --- a/docs/quick-tutorials/k8s-istio-watcher.mdx +++ b/docs/quick-tutorials/k8s-istio-watcher.mdx @@ -82,25 +82,12 @@ kubectl label namespace otterize-tutorial-istio-mapping istio-injection=enabled Apply this configuration in the `istio-system` namespace, propagating it to all namespaces covered by the mesh. +``` +kubectl apply -f https://docs.otterize.com/code-examples/network-mapper/istio-telemetry-enablement.yaml +``` + ```yaml -apiVersion: telemetry.istio.io/v1alpha1 -kind: Telemetry -metadata: - name: mesh-default - namespace: istio-system -spec: - accessLogging: - - providers: - - name: envoy - metrics: - - providers: - - name: prometheus - overrides: - - tagOverrides: - request_method: - value: request.method - request_path: - value: request.path +{@include: ../../static/code-examples/network-mapper/istio-telemetry-enablement.yaml} ``` diff --git a/static/code-examples/network-mapper/istio-telemetry-enablement.yaml b/static/code-examples/network-mapper/istio-telemetry-enablement.yaml new file mode 100644 index 000000000..9e471f8dc --- /dev/null +++ b/static/code-examples/network-mapper/istio-telemetry-enablement.yaml @@ -0,0 +1,18 @@ +apiVersion: telemetry.istio.io/v1alpha1 +kind: Telemetry +metadata: + name: mesh-default + namespace: istio-system +spec: + accessLogging: + - providers: + - name: envoy + metrics: + - providers: + - name: prometheus + overrides: + - tagOverrides: + request_method: + value: request.method + request_path: + value: request.path \ No newline at end of file From 71fbfb7d5e9d162813fed9492bd5f27b71014d67 Mon Sep 17 00:00:00 2001 From: Netanel Bollag Date: Sun, 7 May 2023 14:00:51 +0300 Subject: [PATCH 2/2] Add missing istiod cleanup --- docs/quick-tutorials/k8s-istio-watcher.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/quick-tutorials/k8s-istio-watcher.mdx b/docs/quick-tutorials/k8s-istio-watcher.mdx index 13ffa76c2..2feea7aed 100644 --- a/docs/quick-tutorials/k8s-istio-watcher.mdx +++ b/docs/quick-tutorials/k8s-istio-watcher.mdx @@ -158,5 +158,6 @@ To remove Istio and the deployed examples run: ```bash helm uninstall istio-base -n istio-system +helm uninstall istiod -n istio-system kubectl delete namespace otterize-tutorial-istio-mapping ```