Add secret key to chart template

1/5/2020

I'm using HELM and I want to edit the 'deployment.yaml' file inside the 'templates' directory under a specific chart. But the content of the file looks like that:

{{- template "common.deployment" . -}}

How can I add a k8s secret key if I don't have the Containers spec section in this file and I don't want to edit the Common deployment? should I copy the secret yaml from my k8s environment to a file at the 'templates' directory as well?

-- Capobar
kubernetes
kubernetes-helm

1 Answer

1/7/2020

What you specify as template "common.deployment" . is defined in your _helpers.tpl file (or some other file with Helm kind-of macros). So you can edit it there.

-- RafaƂ Leszko
Source: StackOverflow