Skip to content

Commit 70b2bf3

Browse files
authored
Merge pull request #54 from ollymaunder-dnv/enable-mirroring
Enable mirroring
2 parents 9180466 + 424e9ad commit 70b2bf3

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

charts/platform-service/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: v1
22
appVersion: "1.1"
33
description: Platform service chart
44
name: platform-service
5-
version: 1.5.0
5+
version: 1.5.3

charts/platform-service/templates/_helpers.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,12 @@ http:
164164
{{- fail "Either replaceWith or regexRewrite are required" }}
165165
{{- end }}
166166
{{- end }}
167-
167+
{{- if $.Values.defaultRouting.mirror.enabled }}
168+
mirror:
169+
host: {{required "host is required" $.Values.defaultRouting.mirror.host }}
170+
{{- if $.Values.defaultRouting.mirror.mirrorPercentage }}
171+
mirrorPercentage:
172+
value: {{ $.Values.defaultRouting.mirror.mirrorPercentage }}
173+
{{- end }}
174+
{{- end }}
168175
{{- end -}}

charts/platform-service/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@ defaultRouting:
138138
# match: '^\/service\/([^\/]+)(\/.*)$'
139139
# rewrite: '\/customprefix\/\2\/\1'
140140

141+
mirror:
142+
# enable request mirroring to a secondary service. See https://istio.io/latest/docs/tasks/traffic-management/mirroring/
143+
enabled: false
144+
# name of the mirrored service (must be in the same namespace)
145+
host: my-mirror-service
146+
# percentage of traffic to mirror (0-100). Defaults to 100 if not specified
147+
# mirrorPercentage: 100
148+
149+
141150
# Load balancer policy
142151
# Also supported are:
143152
# STICKY_SESSIONS: ensures each session will always hit the same pod.

0 commit comments

Comments
 (0)