title: How to use Kubeseal to seal a helm-templated secret?
body: <p>Imagine a secret like this:</p>
  
  <pre><code>apiVersion: v1
  kind: Secret
  metadata:
    name: {{ include "test-cicd.fullname" . }}
    labels:
      app.kubernetes.io/name: {{ include "test-cicd.name" . }}
      helm.sh/chart: {{ include "test-cicd.chart" . }}
      app.kubernetes.io/instance: {{ .Release.Name }}
      app.kubernetes.io/managed-by: {{ .Release.Service }}
  type: Opaque
  data:
    secret.yaml: |
      {{ if eq .Values.env "prod" }}
      foo: bar-prod
      foo2: bar2_prod
      {{ else if eq .Values.evn "dev" }}
      foo: bar-dev
      {{ end }}
  </code></pre>
  
  <p>Is it possible to seal this using <a href="https://github.com/bitnami-labs/sealed-secrets" rel="nofollow noreferrer">Kubeseal</a>? 
  Upon doing it now, I get <code>invalid map key: map[interface {}]interface {}{"include \"test-cicd.fullname\" .":interface {}(nil)}</code> which is probably because it is not a "valid" yaml file.</p>
  
  <p>One thing that I tried was:
  1. Removing the helm templating lines 
  2. Generating the sealedsecret
  3. Templating the sealedsecret using helm</p>
  
  <p>But by doing this, the sealedsecret could not be decrypted by the cluster-side operator on deployment time. </p>