作为我持续部署管道的一部分,我部署了金丝雀和基线,比较两者的指标并分析结果以确定是否将金丝雀推广到生产环境。为了改进收集的指标,我想使用 Istio 将生产流量镜像到金丝雀和基线部署。
为此,我有以下虚拟服务和目标规则,将流量镜像到我的金丝雀部署:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: goldengoose
namespace: goldengoose
spec:
hosts:
- "*"
gateways:
- goldengoose
http:
- route:
- destination:
port:
number: 80
host: goldengoose
subset: prod
mirror:
host: goldengoose
subset: canary
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: goldengoose
namespace: goldengoose
spec:
host: goldengoose
subsets:
- name: prod
labels:
track: prod
- name: baseline
labels:
track: baseline
- name: canary
labels:
track: canary
我怎样才能将流量镜像到基线,以便基线和金丝雀接收与我的生产部署相同的流量?