How to orginaze same dependecy(Postgres) in many charts

3/29/2019

For example, I have this charts structure:

├── parentChart
│   ├── charts
│   │   ├── childChart1
│   │   │   ├── charts
│   │   │   │   └── postgresql-3.11.6.tgz
│   │   │   ├── Chart.yaml
│   │   │   ├── requirements.lock
│   │   │   ├── requirements.yaml
│   │   │   ├── templates
...
│   │   │   └── values.yaml
│   │   ├── childChart2
│   │   │   ├── charts
│   │   │   │   └── postgresql-3.11.6.tgz
│   │   │   ├── Chart.yaml
│   │   │   ├── requirements.lock
│   │   │   ├── requirements.yaml
│   │   │   ├── templates
...
│   │   │   └── values.yaml
│   └── Chart.yaml
...

In the childChart1 and childChart2 I have this dependency: Child1:

dependencies:
  - name: postgresql
    version: 3.11.6
    repository: alias:stable
    alias: child1-postgres
...

Child2:

dependencies:
  - name: postgresql
    version: 3.11.6
    repository: alias:stable
    alias: child2-postgres
...

First problem: I expect that after deploy parent chart I will have 4 deployment:

  1. childChart1
  2. childChart1 Postgresql
  3. childChart2
  4. childChart2 Postgresql

Am I right?

If I don't do anything wrong with a first problem, why I see this message when I trying to deploy this charts:

$ helm install $opts --name $NAME --namespace $NAME $package --wait --timeout 9999
Error: release test failed: secrets "test-postgresql" already exists

P.S. I have this helm version:

$ helm version
Client: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
-- Alexey Vinogradov
kubernetes-helm

1 Answer

4/4/2019

The answer is here: https://devops.stackexchange.com/a/6756/13146 So, we need to set nameOverride property of dependency (Postgres) to make it work.

-- Alexey Vinogradov
Source: StackOverflow