Complex passwords cause Ruby templating to fail

Summary

I've been trying to deploy GitLab on Kubernetes with an external postgres DB using this chart. I was seeing these errors from the unicorn & migrations dependencies init containers:

YAML syntax error occurred while parsing /srv/gitlab/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): did not find expected alphabetic or numeric character while scanning an anchor at line 7 column 13

The problem was that the password for my external postgres DB was a complex password (32 chars with letters, numbers and symbols) and the Ruby templating used in the gitlab containers couldn't handle the symbols in the password.

A DB password should be complex - it's important infrastructure so ideally the templating should handle it but at the very least it's worth documenting that it can't.

Steps to reproduce

Use a complex password for postgres

Current behavior

Containers crash with YAML parse error

Expected behavior

Containers run successfully