The output from export-bundle should put this into an overlay, as it's unique to the deployment and not to underlying bundle itself.
The issue becomes where to put it within the bundle. We unfortunately can't add it to the existing relations list, as that expects relations to be a list of list of strings ([][]string)[1], but we could create a new field that exposes what we would like, that allows us to look up the related via, although we're duplicating the exact same information to expose the key.
The output from export-bundle should put this into an overlay, as it's unique to the deployment and not to underlying bundle itself.
The issue becomes where to put it within the bundle. We unfortunately can't add it to the existing relations list, as that expects relations to be a list of list of strings ([][]string)[1], but we could create a new field that exposes what we would like, that allows us to look up the related via, although we're duplicating the exact same information to expose the key.
Potentially:
networks:
- endpoints:
- mattermost:db
- postgresql:db
via:
- 10.0.0.0/24
- 192.168.0.0/16
- endpoints:
- mattermost:admin
- postgresql:admin
via:
- 10.0.0.0/12
Alternatively we push this to 3.0 and make a breaking change in bundle syntax to support via correctly:
relations:
- endpoints:
- mattermost:db
- postgresql:db
via:
- 10.0.0.0/24
- 192.168.0.0/16
1. https:/ /github. com/juju/ charm/blob/ master/ bundledata. go#L61