<p>I'm using an if-else statement inside my <strong>deployment.yaml</strong> to determine which key to use from my <strong>values.yaml</strong> file, in the following way:</p>
<pre><code>{{ - if .Values.some_key}}
          some_key:
{{ toYaml .Values.some_key| indent 12 }}
{{ else if .Values.global.some_key}}
          some_key:
{{ toYaml .Values.global.some_key| indent 12 }}
{{ - end }}
</code></pre>
<p>I got a &quot;Key 'some_key' is duplicated&quot; error from IntelliJ, and was wondering what is the correct way of using the condition in this situation.</p>

peleg
<p>I was able to remove IntelliJ's errors by installing the Go Template plugin and the Kubernetes plugin for Intellij.</p>
