<p>I am trying to use a constant in skaffold, and to access it in skaffold profile:</p>
<p>example <code>export SOME_IP=199.99.99.99 &amp;&amp; skaffold run -p dev</code></p>
<p>skaffold.yaml</p>
<pre><code>...
deploy:
  helm:
    flags:
      global:
      - &quot;--debug&quot; 
    releases:
    - name: ***
      chartPath: ***
      imageStrategy:
        helm:
          explicitRegistry: true
      createNamespace: true
      namespace: &quot;***&quot;
      setValueTemplates:
        SKAFFOLD_SOME_IP: &quot;{{.SOME_IP}}&quot;
</code></pre>
<p>and in dev.yaml profile I need somehow to access it,<br />
something like:<br />
<code>{{ .Template.SKAFFOLD_SOME_IP }}</code>  and it should be rendered as <code>199.99.99.99</code></p>
<p>I tried to use skaffold <strong>envTemplate</strong> and <strong>setValueTemplates</strong> fields, but could not get success, and could not find any example on web</p>

Binzari Catalin
<p>Basically found a solution which I truly don't like, but it works:</p>
<p>in <strong>dev</strong> profile: <strong>values.dev.yaml</strong> I added a placeholder</p>
<pre><code>  _anchors_:
    - &amp;_IPAddr_01 &quot;&lt;IPAddr_01_TAG&gt;&quot; # will be replaced with SOME_IP
</code></pre>
<p>The <strong>&lt;IPAddr_01_TAG&gt;</strong> will be replaced with const <strong>SOME_IP</strong> which will become <strong>199.99.99.99</strong> at the skaffold run</p>
<p>Now to run skaffold I will do:</p>
<pre><code>export SOME_IP=199.99.99.99
sed -i &quot;s/&lt;IPAddr_01_TAG&gt;/$SOME_IP/g&quot; values/values.dev.yaml
skaffold run -p dev
</code></pre>
<p>so after the above sed, in <strong>dev</strong> profile: <strong>values.dev.yaml</strong>, we will see the SOME_IP const instead of placeholder</p>
<pre><code>  _anchors_:
    - &amp;_IPAddr_01 &quot;199.99.99.99&quot;
</code></pre>
