helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

[Migration] chart: timescaledb-single. Migrating secrets as per v0.10.0 upgrade guide fails: templates/secret-certificate.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 2: did not find expected node content

Open davidandreoletti opened this issue 3 years ago • 1 comments

Have a look at Troubleshooting or some Common Issues

Describe the bug

Empty secret templates such as service-patroni.yaml prevent helm from successfully completing the templates rendering when following k8s secrets migration from v0.10.0 upgrade guide.

Changes:

  • Deleted: Secrets provided via Kustomize.
  • Added: secrets.credentialsSecretName: "foobar-credentials" (+ 2 credentials params)

To Reproduce Both commands fail with the same error (the 1st command being the most important as it prevents proper chart deployment: we do helm template ... and then kubectl apply ...)

Note: foobar-timescaledb-timescaledb-single-original is simply the original chart folder name being renamed by a script on my end.

Command 1:

helm template foobar-timescaledb-timescaledb-single-original --values foobar-timescaledb-timescaledb-single-custom/values.yaml --name-template foobar --output-dir foobar-timescaledb-timescaledb-single-final/

Command 2:

helm lint foobar-timescaledb-timescaledb-single-original --values foobar-timescaledb-timescaledb-single-custom/values.yaml

Expected behavior Template rendering to not fail for this configuration.

Deployment

  • Chart: timescaledb-single
  • values.yaml: See bug description section.
  • Chart: 0.10.0
  • k8s: 1.20.x

Deployment None, the template rendering fails on a local machine, without ever needing to talk to the k8s cluster.

Logs

+ helm lint foobar-timescaledb-timescaledb-single-original --values foobar-timescaledb-timescaledb-single-custom/values.yaml
==> Linting foobar-timescaledb-timescaledb-single-original
[INFO] Chart.yaml: icon is recommended
[ERROR] templates/secret-certificate.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 2: did not find expected node content
[ERROR] templates/secret-patroni.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 2: did not find expected node content
[ERROR] templates/secret-pgbackrest.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 2: did not find expected node content

Error: 1 chart(s) linted, 1 chart(s) failed

Additional context Deleting those files allows the command to successfully complete: secret-certificate.yaml, secret-patron.yaml, secret-pgbackrest.yaml

davidandreoletti avatar Dec 07 '21 05:12 davidandreoletti

@feikesteenbergen @thedodd Pinging you guys :-)

davidandreoletti avatar Dec 07 '21 05:12 davidandreoletti

This should've been fixed in latest helm chart release after https://github.com/timescale/helm-charts/pull/327 was merged. If you find that the problem is still happening in your environment, please reopen this ticket.

paulfantom avatar Aug 18 '22 10:08 paulfantom