how to apply istio retry strategy for all the services of a namespace?

2/14/2019

I use the config below to add retry strategy for service content.default.svc.cluster.local. There are tens of services running in a namespace. I want to apply the same strategies for all of them in the same namespace. Is there a convenient way to do this?

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: public-ingress
  namespace: netops
spec:
  hosts:
  - "api.backend.com" 
  gateways:
  - public-ingress
  http:
  - appendHeaders:
      x-envoy-max-retries: "20"
      x-envoy-retry-on: connect-failure,refused-stream
      x-envoy-upstream-rq-timeout-ms: "0"
    route:
    - destination:
        host: content.default.svc.cluster.local
-- Jeffrey
istio
kubernetes

0 Answers