<p>I am not sure if the issue is related to promtail (helm chart used) or to helm itself.</p>
<p>I want to update the default host value for loki chart to a local host used on kubernetes, so I tried with this:</p>
<pre><code>helm upgrade --install --namespace loki promtail grafana/promtail --set client.url=http://loki:3100/loki/api/v1/push
</code></pre>
<p>And with a custom values.yaml like this:</p>
<pre><code>helm upgrade --install --namespace loki promtail grafana/promtail -f promtail.yaml
</code></pre>
<p>But it still uses wrong default url:</p>
<pre><code>level=warn ts=2021-10-08T11:51:59.782636939Z caller=client.go:344 component=client host=loki-gateway msg=&quot;error sending batch, will retry&quot; status=-1 error=&quot;Post \&quot;http://loki-gateway/loki/api/v1/push\&quot;: dial tcp: lookup loki-gateway on 10.43.0.10:53: no such host&quot;
</code></pre>
<p>If I inspect the config.yaml its using it doesnt use the internal url I gave during the installation:</p>
<pre><code>root@promtail-69hwg:/# cat /etc/promtail/promtail.yaml 
server:
  log_level: info
  http_listen_port: 3101

client:
  url: http://loki-gateway/loki/api/v1/push
</code></pre>
<p>Any ideas? or anything I am missing?</p>
<p>Thanks</p>

<p>I don't think <code>client.url</code> is a value in the helm chart, but rather one inside a config file that your application is using.</p>
<p>Try setting <a href="https://github.com/grafana/helm-charts/blob/main/charts/promtail/values.yaml#L223-L239" rel="nofollow noreferrer"><code>config.lokiAddress</code></a>:</p>
<pre><code>config:
  lokiAddress: http://loki-gateway/loki/api/v1/push
</code></pre>
<p>It <a href="https://github.com/grafana/helm-charts/blob/main/charts/promtail/values.yaml#L339-L353" rel="nofollow noreferrer">gets templated</a> into the config file I mentioned.</p>
