Given the follow values.yaml
configurations:
endpoints:
- firstEndpoint
- firstPath
- secondPath
- secondEndpoint
- thirdPath
- fourthPath
I need to generate different resources from those values in the following way:
- name: firstEndpoint
paths:
- firstPath
- secondPath
- name: secondEndpoint
paths:
- thirdPath
- fourthPath
I can do this if "endpoints" were to be a map, instead of a list/array, but in this case, I need "endpoints" to be a list of endpoints, and "paths" to be a list of paths for each endpoint.
How could this be achieved?
As David Maze said. Your proposed endpoints: isn't valid.
You may try this:
values.yaml
(Note the
:afterfirstEndpointandsecondEndpoint)template/cm.yaml
output