<p>I deploy kong via helm on my kubernetes cluster but I can't configure it as I want.</p>

<pre><code>helm install stable/kong -f values.yaml
</code></pre>

<p>value.yaml:</p>

<pre><code>{
   "persistence.size":"1Gi",
   "persistence.storageClass":"my-kong-storage"
}
</code></pre>

<p>Unfortunately, the created persistenceVolumeClaim stays at 8G instead of 1Gi. Even adding "persistence.enabled":false has no effect on deployment. So I think my all my configuration is bad.</p>

<p>What should be a good configuration file?</p>

<p>I am using kubernetes rancher deployment on bare metal servers.
I use Local Persistent Volumes. (working well with mongo-replicaset deployment)</p>

<p>What you are trying to do is to configure a dependency chart (a.k.a subchart ) which is a little different from a main chart when it comes to writing <code>values.yaml</code>. Here is how you can do it:</p>
<p>As <code>postgresql</code> is a dependency chart for <code>kong</code> so you have to use the name of the dependency chart as a key then the rest of the options you need to modify in the following form:</p>
<blockquote>
<p>The content of <code>values.yaml</code> does not need to be surrounded with curly braces. so you need to remove it from the code you posted in the question.</p>
</blockquote>
<pre class="lang-yaml prettyprint-override"><code>&lt;dependcy-chart-name&gt;:
  &lt;configuration-key-name&gt;: &lt;configuration-value&gt;
</code></pre>
<p>For Rancher you have to write it as the following:</p>
<pre class="lang-yaml prettyprint-override"><code>#values.yaml for rancher
postgresql.persistence.storageClass: &quot;my-kong-storage&quot;
postgresql.persistence.size: &quot;1Gi&quot;
</code></pre>
<p>Unlike if you are using helm itself with vanilla kubernetes - at least - you can write the <code>values.yml</code> as below:</p>
<pre class="lang-yaml prettyprint-override"><code>#values.yaml for helm
postgresql:
  persistence:
    storageClass: &quot;my-kong-storage&quot;
    size: &quot;1Gi&quot;
</code></pre>
<blockquote>
<ul>
<li><p>More about <a href="https://github.com/helm/helm/blob/master/docs/chart_template_guide/subcharts_and_globals.md#overriding-values-of-a-child-chart" rel="nofollow noreferrer">Dealing with SubChart values</a></p>
</li>
<li><p>More about <a href="https://github.com/helm/charts/tree/master/stable/postgresql#configuration" rel="nofollow noreferrer">Postgresql chart configuration</a></p>
</li>
</ul>
</blockquote>
