chart-testing icon indicating copy to clipboard operation
chart-testing copied to clipboard

When using "helm secrets" get executing "<chart-name>/templates/tls-certificate-secret.yaml" at <.Values.tlsSecret.ca>: nil pointer evaluating interface {}.ca**

Open gaure opened this issue 3 years ago • 0 comments

Is this a request for help?: NO


Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST

  • We are using the "helm secrets" plug-in that stores values in a secrets.yaml encrypted file. When you use the "helm secrets" plug-in the file is decrypted on the fly so helm can access these values using .Values..
  • When you try to run the "ct" command it complains that the .Values. is missing because:
  • (1) Is not in the default values.yaml.
  • (2) The secrets.yaml is encrypted and the helm commands needs the "secrets" sub-command to decrypt it on the fly.
  • The question is:
  • (1) Is it possible to configure "ct" so it passes "secrets" to the helm command.
  • (2) Can I pass and addition values file to "ct" before the default one ?

Version of Helm and Kubernetes:

helm version 3 kubectl version 1.17.0 ct version 3.5.0

What happened: Execute "ct lint" got the error:

==> Linting helm-charts/charts/ [ERROR] templates/: template: /templates/tls-certificate-secret.yaml:4:11: executing "/templates/tls-certificate-secret.yaml" at <.Values.tlsSecret.ca>: nil pointer evaluating interface {}.ca

What you expected to happen: That "ct" command finds the secrets.yaml file and use the .Values.tlsSecret.ca included in that file.

How to reproduce it (as minimally and precisely as possible):

  1. Create a template with a .Values.
  2. Create the .Values. in a file called secrets.yaml.
  3. Using the "helm" "secrets" plug-in encrypt the secrets.yaml file.
  4. Run "ct lint"

Anything else we need to know: NA

gaure avatar Jan 31 '22 22:01 gaure