<p>I'm trying to build a Multi-container POD via a Pipeline and release via Helm Charts. </p>

<p>For a single container pod I can do this which works, pass the version and the location of the container to the helm chart:</p>

<pre><code>    helm upgrade --install \
   --set image.repository=${CI_REGISTRY}/${ENVIRONMENT,,}/${CI_PROJECT_NAME} \
   --set image.tag=${CI_COMMIT_SHA} \
   ${CI_PROJECT_NAME} \
</code></pre>

<p>How do I pass a version or a location for a specific container if the help chart is a multi container pod  ? </p>

<pre><code>containers:
        - repo: myrepo/qa/helloworld1
          tag: e2fd70931d264490b2d25012e884897f970f5916
          pullPolicy: Always
          ports:
            container: 8090
          livenessProbe:
            initialDelaySeconds: 6
            tcpSocket:
              port: 8090
          resources:
              requests:
                memory: 128Mi
                cpu: 50m
              limits:
                memory: 128Mi
                cpu: 100m
        - repo: myrepo/qa/helloworld2
          tag: 6bb39948f2a5f926f7968480435ec39a4e07e721
          pullPolicy: Always
          ports:
            container: 8080
          livenessProbe:
            initialDelaySeconds: 6
            tcpSocket:
              port: 8080
          resources:
              requests:
                memory: 128Mi
                cpu: 50m
              limits:
                memory: 128Mi
                cpu: 100m



</code></pre>

FreshMike
<p>That depends on your helm chart. The reason you can pass the image.tag and image.repository sections is because inside of the helm chart templates there is a section specifying the following:</p>

<pre><code>containers:
  - image: {{ .Values.image.repository }}/app-name:{{ .Values.image.tag }}
</code></pre>

<p>Helm templates a deployment.yaml. By default it replaces each of the Values in a chart with whatever defaults where specified in the values.yaml file that is part of that chart. Whenever you run a helm command such as <code>helm install</code> or <code>helm upgrade --install</code> and specify the <code>--set</code> flag, you are overriding the defaults specified in the values.yaml. See the <a href="https://github.com/helm/helm/blob/master/docs/helm/helm_upgrade.md" rel="nofollow noreferrer">docs on helm upgrade for more info on overriding the values in a chart</a>.</p>

<p>To answer your question: it depends on how that chart is defined. What you often see is that in the values.yaml of a multi-container pod you define two sets of images, e.g.:</p>

<pre><code># values.yaml
image1:
  tag: &lt;sha-here&gt;
  repository: &lt;repo-here&gt;

image2:
  tag: &lt;sha-here&gt;
  repository: &lt;repo-here&gt;
</code></pre>

<p>and in the chart you can then refer to those values by specifying:</p>

<pre><code>containers:
  - image: {{ .Values.image1.repository }}/app-name:{{ .Values.image1.tag }}
</code></pre>

<p>However, it depends on your specific Helm chart where you specify these values. Are you able to update your Helm Chart? Or is it an external Chart?</p>
