Skip to content

[PostGIS] How to pass POSTGRES_PASSWORD from my own secrets #40

Description

@fullonic

Hey,
I'm having issues when overriding the PostgreSQL password from my own secrets. I'm using the postgis v0.2.4 helm charts.

I'm trying to read the password from my secrets in this way:

...
  postgresqlPassword:
    valueFrom:
      secretKeyRef:
        name: secrets
        key: POSTGRES_PASSWORD
  existingSecret: secrets
...
[my secrets]
secrets:
  - name: secrets
    data:
      POSTGRES_PASSWORD: #######

After applying the values.yaml I'm getting the following error:

Error: UPGRADE FAILED: template: go/charts/postgis/templates/tests/postgres-connection.yaml:1:4: executing "go/charts/postgis/templates/tests/postgres-connection.yaml" at <include "common.pod" (list . "postgis.test.connection")>: 
error calling include: template: go/charts/postgis/charts/common/templates/_common.pod.yaml:8:3: executing "common.pod" at <include "common.util.merge" (append . "common.pod.tpl")>: 
error calling include: template: go/charts/postgis/charts/common/templates/_helpers.tpl:117:28: executing "common.util.merge" at <include (index . 1) $top>: 
error calling include: template: go/charts/postgis/templates/tests/postgres-connection.yaml:20:13: executing "postgis.test.connection" at <include "common.secretFrom" $param>: 
error calling include: template: go/charts/postgis/charts/common/templates/_helpers.tpl:68:13: executing "common.secretFrom" at <include "common.secretName" .>: 
error calling include: template: go/charts/postgis/charts/common/templates/_helpers.tpl:82:35: executing "common.secretName" at <.valueFrom.secretKeyRef.name>: nil pointer evaluating interface {}.secretKeyRef

Basically postgresqlPassword is not being populated from my own secrets. Maybe I doing something wrong or missing something, but I can't spot what.

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions