eclipse / packages

IoT Packages project
https://eclipse.org/packages
Eclipse Public License 2.0
46 stars 66 forks source link

Enable using non-Hono-chart mongoDB with name based on ReleaseName #506

Closed calohmn closed 1 year ago

calohmn commented 1 year ago

When installing the Hono chart as part of a package that already includes a MongoDB installation (like in the cloud2edge chart, where the Ditto mongoDB is used), the name of the mongoDB host currently has to be set to a fixed value. E.g.

  deviceRegistryExample:
    type: mongodb
    mongoDBBasedDeviceRegistry:
      mongodb:
        host: ditto-mongodb

It would be better however, if the name of the mongoDB host could contain the release name for example. In the case of the cloud2edge chart, this would enable the mongoDB resources to have the same naming scheme as the other resoures.

A solution here would be to let the deviceRegistryExample.mongoDBBasedDeviceRegistry.mongodb map be evaluated via the tpl function. The host could then be configured as host: '{{ .Release.Name }}-mongodb'.