Score:0

Share a dependency across helm charts

in flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.