0

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

ammy
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 24 '23 at 17:55

0 Answers0