From fdf84c10d8738bf3aa75a287b6bd0f742a969c13 Mon Sep 17 00:00:00 2001 From: Edwin van Wijk Date: Thu, 17 Oct 2024 14:36:53 +0100 Subject: [PATCH] Only mirror GET requests --- src/k8s/customermanagementapi-mirror.yaml | 28 +++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/k8s/customermanagementapi-mirror.yaml b/src/k8s/customermanagementapi-mirror.yaml index f7ce0ea3..1e32b625 100644 --- a/src/k8s/customermanagementapi-mirror.yaml +++ b/src/k8s/customermanagementapi-mirror.yaml @@ -18,19 +18,27 @@ spec: apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: - name: customermanagementapi + name: customermanagementapi-mirror-get namespace: pitstop spec: hosts: - customermanagementapi http: - - route: - - destination: - host: customermanagementapi - subset: v1 - weight: 100 - mirror: + - match: + - method: + exact: GET + route: + - destination: + host: customermanagementapi + subset: v1 + weight: 100 + mirror: + host: customermanagementapi + subset: v2 + mirrorPercentage: + value: 100 + - route: + - destination: host: customermanagementapi - subset: v2 - mirrorPercentage: - value: 100 \ No newline at end of file + subset: v1 + weight: 100