title: Assign same helm value to more than one targets
body: <p>I am working on a Helm chart, which should spin up a database as well a client which consumes the database. To avoid redundancy I only wanna provide one value (username, password), which should be assigned to the client and the DB.
  And only if it's not the default value, all other values should be overridden.</p>
  
  <p>So, when I create the chart and pass a different value to the <code>db.env.POSTGRES_PASSWORD</code> it should override the <code>users.env.DB_PASSWORD</code> as well</p>
  
  <pre><code>helm install --debug --dry-run --set db.env.POSTGRES_PASSWORD=test
  </code></pre>
  
  <p>Here a short snippet from my values.yml</p>
  
  <pre><code>db:
    env:
      POSTGRES_PASSWORD: "default123"
  
  users:
    env:
      DB_PASSWORD: "default123"
  </code></pre>
  
  <p>I think I have to do this somehow int the <code>_helpers.tpl</code> file.
  Something like this, but it is not working.</p>
  
  <pre><code>{{- define "db.env.POSTGRES_PASSWORD" -}}
  {{- default "password123" -}}
  {{- end -}}
  
  {{- if ne db.env.POSTGRES_PASSWORD "default123" }} # =&gt; This line causes the error
  {{- define "users.env.DB_PASSWORD" -}}
  {{- default .Values.db.env.POSTGRES_PASSWORD -}}
  {{- end -}}
  {{- end }}
  </code></pre>
  
  <p>ERROR:</p>
  
  <pre><code>unexpected &lt;define&gt; in command
  </code></pre>
  
  <p>Please point me to the right direction, thank you</p>