bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.88k stars 9.16k forks source link

[bitnami/ejbca] Failure to render or install chart due to invalid character in deployment.yaml #3584

Closed danclough closed 4 years ago

danclough commented 4 years ago

Which chart: EJBCA

Describe the bug Chart fails to render using an external database.

******@********** bitnami % helm template my-release --debug --values=./ejbca-values.yaml ./ejbca --dry-run
install.go:149: [debug] Original chart version: ""
install.go:166: [debug] CHART PATH: ************************/ejbca

Error: YAML parse error on ejbca/templates/deployment.yaml: error converting YAML to JSON: yaml: line 52: found character that cannot start any token
helm.go:76: [debug] error converting YAML to JSON: yaml: line 52: found character that cannot start any token
YAML parse error on ejbca/templates/deployment.yaml

To Reproduce Steps to reproduce the behavior:

  1. Populate values.yaml with an external database option
  2. Attempt to render chart using helm template or helm install

Expected behavior Chart renders or installs successfully

Version of Helm and Kubernetes:

version.BuildInfo{Version:"v3.0.2", GitCommit:"19e47ee3283ae98139d98460de796c1be1e3975f", GitTreeState:"clean", GoVersion:"go1.13.5"}
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:20:10Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitCommit:"9f2892aab98fe339f3bd70e3c470144299398ace", GitTreeState:"clean", BuildDate:"2020-08-13T16:04:18Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}

Additional context I downloaded the EJBCA chart and tried to figure out where it was tripping up. When I comment out the EJBCA_DATABASE_PORT entry in deployment.yaml, the chart renders fine. Here's what it shows:

#            - name: EJBCA_DATABASE_PORT
#              value: %!d(string="3306")

My values.yaml:

ejbcaHttpsServerHostname: my-ca.local.xyz
ejbcaAdminUsername: nimda
existingSecret: ejbca
mariadb:
  enabled: false
externalDatabase:
  host: mysql.local.xyz
  user: ejbca_user
  existingSecret: ejbca-externaldb
  database: ejbca
carrodher commented 4 years ago

Hi, thanks for reporting the issue, there was a typo in the template used to render this value; I just fixed it in the above PR. Once merged the PR this issue is going to be automatically closed, please, feel free to reopen it if needed. In the same way, the ejbcaHttpsServerHostname was removed as it was documented in the README but not used anywhere.

Also, take into account that once merged the PR our test & release process is launched and it could take some time for the new chart version to be available in the chart registry.