<p>I have a jsonnet file </p>

<pre><code>local version = std.extVar('version');
local entities = std.extVar('entities');

{

    appname::'app-dev',
    version::version,
    entities::entities,

}
</code></pre>

<p>The version field seems to be a string, but "entities" field is an array that is located near jsonnet file.
I am using <code>kubecfg show</code> to create json file and substitute variables like this:</p>

<pre><code>kubecfg show test.jsonnet --ext-str "version=$VERSION" --ext-str "entities=$(cat entities.txt)"  
</code></pre>

<p>Of course, during this command I receive an error:</p>

<pre><code>got "string", expected "array";
</code></pre>

<p>Is there any way to substitute array using <code>kubecfg show</code>?</p>

Uladzislau Kaminski
<p>The solution was found.</p>

<p>kubecfg 0.15.3 has a flag that provides the way to inject jsonnet from the command line, file or environment.</p>

<pre><code>--ext-code      | jsonnet      | commandline    | std.extVar(...) | 
--ext-code-env  | jsonnet      | environment    | std.extVar(...) |
--ext-code-file | jsonnet      | file           | std.extVar(...) |
</code></pre>

<p>So, as a result, the solution looks like that:</p>

<pre><code>kubecfg show test.jsonnet --ext-str "version=$VERSION" --ext-code "entities=$(cat entities.txt)"  
</code></pre>
