Helm Chart Deployment Failing with error: Converting JSON to YAML: yaml: control character are not allowed
search cancel

Helm Chart Deployment Failing with error: Converting JSON to YAML: yaml: control character are not allowed

book

Article ID: 273706

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

We are using Gateway Helm chart 3.0.14 & Gateway version 10.1 with Gateway Image

10.1.00_20230731

We tried re deploying with an update action in the pipeline & we noticed it started failing. We then tried to reproduce the same behavior in another environment with same helm chart version & yaml and that is also failing with same error.

Error: unable to write YAML output: error converting JSON to YAML: yaml: control characters are not allowed
2023-09-11T16:26:57.5141426Z helm.go:84: [debug] error converting JSON to YAML: yaml: control characters are not allowed
2023-09-11T16:26:57.5141774Z unable to write YAML output

After reviewing we believe the issues is from https://github.com/CAAPIM/apim-charts/blob/stable/charts/gateway/templates/ssl-secret.yaml file SSG_SSL_KEY setting.

 

 

Environment

Release : 10.1

Resolution

Removing the debug flag solves the problem, this is a Helm specific issue that is not related to the Gateway, Gateway Helm Chart or the way either are used.

 

The debug flag is useful to the users for other applications that they deploy and so it was recommended in creating the tls-secret and referencing it vs. including it directly in values.yaml (this is currently recommended in values.yaml - so no changes from CA is required). This means that the p12 will not be rendered in binary.

 

The setting SSG_SSL_KEY and SSG_SSL_KEY_PASS is only useful if the ssg database (for mysql backed gateways) has not yet been created. It has no effect after the database has been created and is therefore only useful for provisioning new environments.