1

Had Kubernetes secret file in cluster of type opaque which has base64 encoded values. How to use this file to refer secrets in helm file which pulls helm chart for deployment?

Below is my helm file format

bases: 
- ../environments.yaml
- ../defaults.yaml
releases:
- name: {{ env "AST" | default "astenv" }}-appname
  chart: HelmChart_Name
  version: 1.0
  labels: 
    tier: configData
    service: webapp
  namespace: {{ .Namespace }}
  values:
  - ../../values/common.gotmpl
Nazeer_hanne
  • 213
  • 6
  • 20
  • Did you had time to check my answer? It helped you to solve your problem? If yes, please consider to accept and upvote it. [What should I do when someone answers my question?](https://stackoverflow.com/help/someone-answers). – Mark Watney Jun 25 '20 at 07:37

1 Answers1

0

This is explained in the documentation and introduces this as an example:

apiVersion: v1
kind: Secret
metadata:
  name: {{ .Release.Name }}-secret
type: Opaque
data:
  token: |-
    {{ .Files.Get "config1.toml" | b64enc }}
Mark Watney
  • 5,268
  • 2
  • 11
  • 33