<h3>Bug Description</h3>
<p>I can smoothly work on adding multiple destinations for canary deployment but when I try adding retry it fails with the custom-built Helm chart. As I can't iterate over it.</p>
<p>This is a problem because Retry is tied to each destination according to that whole should be iterated.</p>
<p>Please find helm chart template below.</p>
<pre><code>apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: {{ .Values.virtualservice.name }}
  namespace: {{ .Values.namespace }} 
spec:
  hosts:
  - {{ .Values.virtualservice.hosts }} 
  gateways:
  - {{ .Values.virtualservice.gateways }} 
  http:
  - route:
      {{- range $key, $value := .Values.destination }}
    - destination:
        host: {{ $value.host }}
        subset: {{ $value.subset }} 
      weight: {{ $value.weight }}
    retries:
      attempts: {{ $value.retries.attempts }}
      perTryTimeout: {{ $value.retries.perTryTimeout }}
      retryOn: {{ $value.retries.retryOn }}
    timeout: {{ $value.retries.timeout }}
    {{- end }}
</code></pre>
<p>Error log</p>
<pre><code>$ helm install asm-helm ./asm-svc-helm-chart -f values.yaml --dry-run
Error: INSTALLATION FAILED: YAML parse error on asmvrtsvc/templates/retry-svc.yaml: error converting YAML to JSON: yaml: line 21: did not find expected key
</code></pre>
<h3>Version</h3>
<pre><code>$ kubectl version --short
Client Version: v1.24.0
Kustomize Version: v4.5.4
Server Version: v1.22.12-gke.300

$ helm version
v3.9.4+gdbc6d8e
</code></pre>
<p>Added example for reference</p>
<pre><code>spec:
  hosts:
  - reviews
  http:
  - route:
    - destination:
        host: reviews
        subset: v1
      weight: 75
    retries:
      attempts: 3
      perTryTimeout: 2s
    - destination:
        host: reviews
        subset: v2
      weight: 25
    retries:
      attempts: 3
      perTryTimeout: 2s
</code></pre>

Ajinkya Bhabal
<p>According to the schema of Virtual Service, The route field in Virtual Service can have one <code>retries</code> field.</p>
<p>So, the loop should include <code>destination</code> as array.</p>
<p>*: <a href="https://istio.io/latest/docs/reference/config/networking/virtual-service/" rel="nofollow noreferrer">https://istio.io/latest/docs/reference/config/networking/virtual-service/</a></p>
