I am working creating virtual service with helm my goal is to create vs that accept single or multiple match block with help of helm right now I am stuck at very last part , I want to read httpmatch uri dynamically for eg values.yaml (apologies for bad indentation in yaml not able to input format in this editor)
paths:
- uri:
prefix: "/process-devlopment/projects"
rewrite: "/process-devlopment/projects"
servicePort: 80
method: "POST"
- uri:
exact: "/process-devlopment/projects"
rewrite: "/process-devlopment/modules"
code from vs.yaml
{{- range $key, $value := $path }}
match:
uri: "{{- toYaml $key.uri }}": "{{- toYaml $value.uri }}"
rewrite:
uri: "{{- toYaml $value.rewrite }}"
Here I want to get prefix/exact/regex under URI from values.yaml but it appears keys are not read in helm I can only get values by iterating through loop using range block can anyone help me to get key from values.yaml dynamically Any suggestions would be highly appreciated