- Helm repo url
- Helm chart name
- Values.yaml
Interacting with the chart and its internal services:
Say you want to run Postgresql as a service using its Helm chart.Case 1: Other services to use chart’s services
Say you want your NodeJS app to use Postgres as its database. The other service (NodeJS service) from the same environment can use Postgresql database running as part of the Helm Chart installation. Using “service alias” of the helm chart, one can frame the hostname for the chart’s service (postgresql) using the format below.hostname
for the corresponding service.
<service-name>
is the name of the service that is running as part of Helm chart installation and is of type NodePort
or ClusterIP
. Refer to your Helm chart’s documentation to find the <service-name>
.
For our current example: You can add this as DB_HOST secret under secrets section of the NodeJS app service and use it in your code via env var.
Case 2: Charts to use another chart’s services
Say you want to use Temporal and want it to use Postgres as its database. A Helm chart running within the same environment as a service, can use services running as part of another helm chart by using their service alias as an alias for hostname. And provide them as below in Values.yaml configuration.{{
and }}
.
hosts
here is a helper function we support today that can bring the internal dns hostname of any service running within the same LocalOps environment.
For current example, run Temporal chart and Postgres chart as services within your LocalOps environemnt. And provide the following in Temporal chart’s values.yaml configuration.