0

I'm using helm chart to deploy pods to multiple environments. I would like to have one secret file for each environment like dev, sit. I have created secrets.yaml file which is referencing values.yaml of each environment.

apiVersion: v1
kind: Secret
metadata:
 name: my-secret
type: Opaque
data:

 DB_URL: {{ .Values.secret.db.url }}

And values.yaml for each environment looks like:

templates:
 env:
 - name: DB_URL
   valueFrom:
     secretKeyRef:
       name: my-secret
       key: DB_URL
secret:
 db:
   url: <base64Encoded_value>

The secret is not getting applied into the environment. What wrong am I doing here?

heart_coder
  • 189
  • 13
  • 3
    What command are you actually running; how does the value fragment get included in the deployment sequence? When you do install it, what results do you see? – David Maze Mar 12 '21 at 00:03
  • Please provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) – akop Mar 17 '21 at 18:51

0 Answers0