<p>I have a <strong>Deployment</strong> that I'm writing in a <strong>helm</strong> template and am getting an error when including part of a <strong>command</strong> line:</p>

<pre><code>command: ["/cloud_sql_proxy",
              printf "-instances=%s=tcp:0.0.0.0:3306" .Values.sqlproxy.instanceName,
              "-credential_file=/secrets/cloudsql/credentials.json"]
</code></pre>

<p>on linting the deployment (<code>helm lint .</code>) I get the following error:</p>

<blockquote>
  <p>error converting YAML to JSON: yaml: line 25: found unexpected ':'</p>
</blockquote>

<p>If I remove the part of the <strong>command:</strong> <code>=tcp:0.0.0.0:3306</code> the deployment lints fine but I need it :)</p>

<p>Is there a way of escaping the colons?</p>

<p>Or should I rewrite the <strong>command</strong> array?</p>

<p>I've uploaded the complete yaml to a gist: <a href="https://gist.github.com/theGC/f04ba400d2d622a746470c79cee611c4" rel="nofollow noreferrer">sqlproxy-deployment.yaml</a></p>

<p>You need to wrap template directives in <code>{{ }}</code></p>

<pre><code>"{{ printf "-instances=%s=tcp:0.0.0.0:3306" .Values.sqlproxy.instanceName }}"
</code></pre>
