<p>I am new to the whole Kubernetes-Helm thing, please bear with me and I'll try to give as much clarity to my question as possible</p>
<p>So I have this ConfigMap.yaml file that does this:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: envread-settings
  namespace: {{ .Values.environment.namespace }}
data:
  appsettings.environment.json: |-
    {
      &quot;featureBranch&quot;: {{ .Values.component.vars.featureId | quote }},
      &quot;BFFServiceUrl&quot;: {{ .Values.environment.BFFServiceUrl | quote }}
    }
---
</code></pre>
<p>Where the Values are:</p>
<ul>
<li>.Values.component.vars.featureId = 123</li>
<li>.Values.environment.BFFServiceUrl = api.dev.integrations/bff-service</li>
</ul>
<p>This creates an appsettings.environment.json file in a volume path I specified. I need to dynamically create this json file because I need to insert the above variables in there (can't use environment variables sadly for my app).</p>
<p>When I ssh into the terminal and vim everything looks dandy on that file i.e:</p>
<pre><code>{
   &quot;featureBranch&quot;: &quot;123&quot;,
   &quot;BFFServiceUrl&quot;: &quot;api.dev.integration/bff-service&quot;
}
</code></pre>
<p>But when I curl this file I get:</p>
<pre><code>{
   &quot;featureBranch&quot;: &quot;123&quot;,
</code></pre>
<p>and the same can be said when I browse directly to this file (I am running an Angular SPA app using ASP.NET Core 3.1).</p>
<p>Is there something horribly wrong I am doing in the yaml file?</p>
<p><strong>Edit</strong>
The curl command that I am running is:
<code>curl https://api.integrations.portal/assets/appsettings.json</code>.
There is a NGINX Ingress running in between the request and response.</p>

user13731870
<p>I used to have a similar problem. In my case, curl returned error code 18. You can <a href="https://stackoverflow.com/questions/7248031/meaning-of-dollar-question-mark-in-shell-scripts">check this</a> for yourself by running  your <code>curl</code> and then <code>echo $?</code>. As I mentioned I had error code 18 which means:</p>
<blockquote>
<p>CURLE_PARTIAL_FILE (18)
A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn't match the previously given size.</p>
</blockquote>
<p><a href="https://curl.se/libcurl/c/libcurl-errors.html" rel="nofollow noreferrer">Here</a> you will find a link to the description of any errors that curl may return. In case you get another error.</p>
<p>This seems to be a server side issue. You might try to work it around by forcing HTTP 1.0 connection (to avoid chunked transfer which might cause this problem) with the --http1.0 option.</p>
<p>Additionally, if you have a Reverse Proxy or Load Balancer using Nginx and your /var (or your partition where Nginx logging happens) is full, Nginx's server response might be cut off.</p>
<p>You can also read <a href="https://stackoverflow.com/questions/10557927/server-response-gets-cut-off-half-way-through">this question</a>.</p>
