4

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"}
1
  • 1
    the error is probably saying exactly what is wrong, the Postgres chart creates a secrets “${x}-secret” to store a generated password. you have identical releases and they are creating clashing secrets. read the docs for the chart to see how to give it a unique name for the release and it is likely to use that name as a prefix to the resources. worst case read the actual chart templates it’s a very readable format.
    – simbo1905
    Commented Mar 31, 2019 at 18:15

1 Answer 1

2

Finnaly, I found the solution, thanks to @simbo1905.

All that I need to fix that problem: values.yaml Child Chart 1 (or two)

postgresql:
  nameOverride: chart-1-postgres

In the Child Chart 2 nameOverride became to chart-2-postgres.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.