1

I am trying to launch two different Helm charts that share a common dependency (a MySQL database in this case).

Let's consider two different helm charts with the following setup in Chart.yaml:

Service A:

dependencies:
  - name: mysql
    version: ^8.0.20
    repository: https://charts.bitnami.com/bitnami

Service B:

dependencies:
  - name: mysql
    version: ^8.0.20
    repository: https://charts.bitnami.com/bitnami

Even though both services are independent, they share the same database. However, the problem arises when the deployment initiates, since this will trigger two independent databases as well.

As an alternative, I have also tried to chase the umbrella approach referenced here, by defining everything under the same parent helm chart with a setup similar to this one:

Parent Helm Chart:

dependencies:
  - name: service_a
    version: 0.1.0
    repository: repo_for_service_a
  - name: service_b
    version: 0.1.0
    repository: repo_for_service_b

The problem is that, even though the same database is shared as dependency once again, duplicated code is created for the database when attempting the deploy, which results in a failed deployment state. As a solution for it, I took advantage of Helm --post-renderer flag, through ded. Despite the fact that this works, I was looking for a more viable solution.

0 Answers0