'Override istio's host attribute in for tracing

I want to pass --service-node=potato to every istio proxy to make it report the correct host when tracing. I started trying to use istio's k8s overlay feature, but it does not change the Deployment resource:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  components:
    ingressGateways:
    - enabled: true
      name: istio-ingressgateway
      k8s:
        overlays:
        - kind: Deployment
          name: istio-ingressgateway
          patches:
          - path: spec.containers.[name:istio-proxy].args.[-1]
            value: "--service-node=potato"

It does set the kubectl.kubernetes.io/last-applied-configuration annotation correctly, but there seems to be another direct assignment to args later which overrides it.

What's the best way to make istio report the correct host in spans?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source