<p>I need to add Java command in container. For it I use Helm Chart.</p>
<pre><code>helm install mychart chart/mychart --set &quot;command.cmd={java,-Disurz_dir=/mnt/isurz,-Dnifi_url=http://srv-ft-ads-01:9090/nifi-api/processors/20e6a079-3721-a43a-0fed7a8f1236,-Des_host_and_port=xxx:9200,-jar,*.jar}&quot;
</code></pre>
<p>The result isn't what I expected:</p>
<pre><code> spec:                                                                                                                                                                                     
   containers:                                                                                                                                                                             
   - command:                                                                                                                                                                              
     - java                                                                                                                                                                                
     - -Disurz_dir=/mnt/isurz                                                                                                                                                              
     - -Dnifi_url=http://srv-ft-ads-01:9090/nifi-api/processors/20e6a079-3721-a43a-0fed7a8f1236                                                                                   
     - -Des_host_and_port=xxx:9200                                                                                                                                                
     - -jar                                                                                                                                                                                
     - '*.jar'
</code></pre>
<p>I don't understand why Kubernetes puts quotes in <code>*.jar</code>.</p>
<p>If instead <code>*.jar</code> specify <code>myapp.jar</code> then Kubernetes don't add quotes:</p>
<pre><code>helm install mychart chart/mychart --set &quot;command.cmd={java,-Disurz_dir=/mnt/isurz,-Dnifi_url=http://srv-ft-ads-01:9090/nifi-api/processors/20e6a079-3721-a43a-0fed7a8f1236,-Des_host_and_port=xxx:9200,-jar,myapp.jar}&quot;
</code></pre>
<p>Result:</p>
<pre><code> spec:                                                                                                                                                                                     
   containers:                                                                                                                                                                             
   - command:                                                                                                                                                                              
     - java                                                                                                                                                                                
     - -Disurz_dir=/mnt/isurz                                                                                                                                                              
     - -Dnifi_url=http://srv-ft-ads-01:9090/nifi-api/processors/20e6a079-3721-a43a-0fed7a8f1236                                                                                   
     - -Des_host_and_port=xxx:9200                                                                                                                                                
     - -jar                                                                                                                                                                                
     - myapp.jar
</code></pre>

<p>Posting this as a community wiki, feel free to edit and expand.</p>
<hr />
<p>As @larsks correctly mentioned in the comment:</p>
<blockquote>
<p>The quotes are necessary because an unquoted * can't start a YAML
value. They are not part of the value itself.</p>
</blockquote>
<p>For example, this is from <a href="https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html#gotchas" rel="nofollow noreferrer">YAML syntax</a> document:</p>
<blockquote>
<p>In addition to ' and &quot; there are a number of characters that are
special (or reserved) and cannot be used as the first character of an
unquoted scalar: [] {} &gt; | * &amp; ! % # ` @ ,.</p>
</blockquote>
<p>And in much more details with examples it's available in <a href="https://yaml.org/spec/1.2.2/#53-indicator-characters" rel="nofollow noreferrer">YAML spec</a>.</p>
